New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
请问怎么生成不在侧边栏显示的router呢?比如详情页 #171
Comments
那么跳转后怎么选中跳转之前的菜单?hidden菜单要设置成跳转之前选中菜单的子菜单? |
@lllsmiling 不是很懂你想表达什么? |
就比如有个文章管理的菜单,进入一个页面以后,页面内有个添加按钮,点击添加按钮进入一个添加文章的页面,但是这时候菜单其实还是选中的文章管理的菜单。 |
所以到底要干嘛。。。 |
好吧,还是没描述清楚么…… |
暂时
|
好的,多谢了…… |
目前这个问题有好的解决办法了吗? |
|
假设左侧的导航最多两层
要让访问 查看产品/编辑产品 页面时,菜单高亮在 产品列表 上 activeMenu() {
const route = this.$route
const { meta, path } = route
// if set path, the sidebar will highlight the path you set
if (meta.activeMenu) {
return meta.activeMenu
}
return path
} 改为 activeMenu() {
const route = this.$route
const { meta, path } = route
// if set path, the sidebar will highlight the path you set
if (meta.activeMenu) {
return meta.activeMenu
}
// get the first and second parts of path
let n = path.indexOf('/', 1)
if (n > 0) {
n = path.indexOf('/', n+1)
}
return n > 0 ? path.substring(0, n) : path
} |
如题
The text was updated successfully, but these errors were encountered: