From 6d9ac376626a2d81f2341f034c449da1c77e2781 Mon Sep 17 00:00:00 2001 From: Pan Date: Mon, 4 Mar 2019 11:43:14 +0800 Subject: [PATCH] perf[TagsView]: refine code --- src/views/layout/components/TagsView.vue | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/views/layout/components/TagsView.vue b/src/views/layout/components/TagsView.vue index 7b7be8f7..66059816 100644 --- a/src/views/layout/components/TagsView.vue +++ b/src/views/layout/components/TagsView.vue @@ -75,9 +75,10 @@ export default { let tags = [] routes.forEach(route => { if (route.meta && route.meta.affix) { + const tagPath = path.resolve(basePath, route.path) tags.push({ - fullPath: path.resolve(basePath, route.path), - path: path.resolve(basePath, route.path), + fullPath: tagPath, + path: tagPath, name: route.name, meta: { ...route.meta } })