zhulizhen1111 4 år sedan
förälder
incheckning
92d41a14fe
1 ändrade filer med 3 tillägg och 2 borttagningar
  1. 3 2
      src/views/index.vue

+ 3 - 2
src/views/index.vue

@@ -44,16 +44,17 @@ export default {
         /**
          * @name handleRoute
          * @param newRoute 当前路由
-         * @description 路由处理函数, 当前路由为home下的legendLibrary(图例)时,隐藏 menuList组件
+         * @description 路由处理函数, 当前路由为home下的legendLibrary和legendRules(图例)时,隐藏 menuList组件
          */
         handleRoute(newRoute) {
             let path = ''
+            let ignoreRoute = ['legendRules', 'legendLibrary']
             newRoute.path && (path = newRoute.path)
             if (!path) {
                 return true
             }
             let lastPath = path.split('home/')[1]
-            if (lastPath === 'legendLibrary') {
+            if (ignoreRoute.includes(lastPath)) {
                 this.showMenu = false
             } else {
                 this.showMenu = true