提交 616b0954 authored 作者: 王鹏飞's avatar 王鹏飞

bug fixes

上级 b1cf0392
......@@ -22,7 +22,8 @@ const logout = async () => {
}
function genNavClassName(data: IMenuItem) {
return route.fullPath.includes(data.path) ? 'is-active' : ''
const reg = new RegExp(`^${data.path}`)
return reg.test(route.fullPath) ? 'is-active' : ''
}
</script>
......@@ -40,8 +41,7 @@ function genNavClassName(data: IMenuItem) {
v-for="(item, index) in menus"
:key="index"
:class="genNavClassName(item)"
v-permission="item.tag"
>
v-permission="item.tag">
<router-link :to="item.path">{{ item.name }}</router-link>
</div>
</div>
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论