// router.js
const routes = [
    { path: '/', component: MainPage },
    { path: '/config', component: ConfigPage }
];

const router = new VueRouter({
    routes
});

// app.js
new Vue({
    router,
    data: {
        // 全局共享数据
        operationCount: 0,
        lastOperationTime: '',
        logs: []
    },
    methods: {
        addLog(message, type) {
            // 全局日志方法
        }
    }
}).$mount('#app');