diff --git a/src/components/core/d2-multiple-page-control/index.vue b/src/components/core/d2-multiple-page-control/index.vue index 9472db4c..6f5c795d 100644 --- a/src/components/core/d2-multiple-page-control/index.vue +++ b/src/components/core/d2-multiple-page-control/index.vue @@ -97,12 +97,9 @@ export default { handleClick (tab, event) { // 找到点击的页面在 tag 列表里是哪个 const page = this.pageOpenedList.find(page => page.name === tab.name) + const { name, params, query } = page if (page) { - this.$router.push({ - name: page.name, - params: page.params, - query: page.query - }) + this.$router.push({ name, params, query }) } }, /** diff --git a/src/main.js b/src/main.js index c0bda36a..7579b2e5 100755 --- a/src/main.js +++ b/src/main.js @@ -128,19 +128,19 @@ new Vue({ */ getAllTagFromRoutes () { // 所有加载在主框架内的页面 - const tagPool = [] + const pool = [] const push = function (routes) { routes.forEach(route => { if (route.children) { push(route.children) } else { const { meta, name, path } = route - tagPool.push({ meta, name, path }) + pool.push({ meta, name, path }) } }) } push(frameInRoutes) - this.$store.commit('d2adminTagPoolSet', tagPool) + this.$store.commit('d2adminTagPoolSet', pool) } } })