|
@@ -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
|