diff --git a/src/router/modules/system.ts b/src/router/modules/system.ts index 493361d..1f5cdcf 100644 --- a/src/router/modules/system.ts +++ b/src/router/modules/system.ts @@ -332,7 +332,7 @@ ], }, { - path: '', + path: '/notice', component: Layout, redirect: '/notice/list', name: 'noticeManger', diff --git a/src/router/modules/system.ts b/src/router/modules/system.ts index 493361d..1f5cdcf 100644 --- a/src/router/modules/system.ts +++ b/src/router/modules/system.ts @@ -332,7 +332,7 @@ ], }, { - path: '', + path: '/notice', component: Layout, redirect: '/notice/list', name: 'noticeManger', diff --git a/src/store/modules/menu.ts b/src/store/modules/menu.ts index 7d910f4..2627622 100644 --- a/src/store/modules/menu.ts +++ b/src/store/modules/menu.ts @@ -188,7 +188,8 @@ } else { // 如果是 string 类型,则认为是路由,需要查找对应的主导航索引 - const findIndex = this.allMenus.findIndex(item => item.children.some(r => data.indexOf(`${r.path}/`) === 0 || data === r.path)) + // const findIndex = this.allMenus.findIndex(item => item.children.some(r => data.indexOf(`${r.path}/`) === 0 || data === r.path)) + const findIndex = this.allMenus.findIndex(item => item.children.some(r => data === r.path)) if (findIndex >= 0) { this.actived = findIndex } diff --git a/src/router/modules/system.ts b/src/router/modules/system.ts index 493361d..1f5cdcf 100644 --- a/src/router/modules/system.ts +++ b/src/router/modules/system.ts @@ -332,7 +332,7 @@ ], }, { - path: '', + path: '/notice', component: Layout, redirect: '/notice/list', name: 'noticeManger', diff --git a/src/store/modules/menu.ts b/src/store/modules/menu.ts index 7d910f4..2627622 100644 --- a/src/store/modules/menu.ts +++ b/src/store/modules/menu.ts @@ -188,7 +188,8 @@ } else { // 如果是 string 类型,则认为是路由,需要查找对应的主导航索引 - const findIndex = this.allMenus.findIndex(item => item.children.some(r => data.indexOf(`${r.path}/`) === 0 || data === r.path)) + // const findIndex = this.allMenus.findIndex(item => item.children.some(r => data.indexOf(`${r.path}/`) === 0 || data === r.path)) + const findIndex = this.allMenus.findIndex(item => item.children.some(r => data === r.path)) if (findIndex >= 0) { this.actived = findIndex } diff --git a/src/views/example/chartExample.vue b/src/views/example/chartExample.vue new file mode 100644 index 0000000..40066d2 --- /dev/null +++ b/src/views/example/chartExample.vue @@ -0,0 +1,60 @@ + + + + +