diff --git a/src/App.vue b/src/App.vue index a612a21..d4e84ac 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1,8 +1,9 @@ - - + + + @@ -10,24 +11,11 @@ export default { name:'APP', - provide(){ //父组件中通过provide来提供变量,在子组件中通过inject来注入变量。 - return{ - reload:this.reload - } - }, data(){ return{ - isRouterAlive:true + } }, - methods: { - reload () { - this.isRouterAlive = false; //先关闭, - this.$nextTick(function () { - this.isRouterAlive = true; //再打开 - }) - } - } }; diff --git a/src/router/index.js b/src/router/index.js index 1fa032a..c3c40c4 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -31,6 +31,9 @@ const routes = [{ path: "/home", name: 'home', component: () => import('../views/Home/index.vue'), + meta: { + keepAlive: true + } }, { path: "/cityDistribution", @@ -51,14 +54,14 @@ const routes = [{ path: "/teamList", name: 'teamList', component: () => import('../views/teamList/index.vue'), - meta: { - // title: '列表' - } }, { path: "/teamPerformance", name: 'teamPerformance', component: () => import('../views/teamPerformance/index.vue'), + meta: { + keepAlive: true + } }, ]; diff --git a/src/views/PerformanceData/index.vue b/src/views/PerformanceData/index.vue index c9f592f..52b81e9 100644 --- a/src/views/PerformanceData/index.vue +++ b/src/views/PerformanceData/index.vue @@ -1,7 +1,8 @@ + - 2021年总业绩 + 轻未来2021年总业绩 ¥{{year_count_order_money | capitalize}}
2021年总业绩
轻未来2021年总业绩
¥{{year_count_order_money | capitalize}}