-
Notifications
You must be signed in to change notification settings - Fork 33
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
fix: single breadcrumb item display separator #88
fix: single breadcrumb item display separator #88
Conversation
✅ Deploy Preview for vue-hbs-admin ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
close #80 |
大佬,我看到你把 sort 改为非必填了,你顺便测试一下 meta.single 不是 true 的子路由,如果不填 sort 会不会出现问题,因为我当时写动态渲染菜单的时候做了一下根据 sort 强排列顺序 |
要写在描述里,才会关联并在合并后自动取消。 |
有warning,未设置sort时,进行比较时,默认值为多少合适 function sortBySortKey(routerModuleList: RouteModuleList | RouteModule['children']) {
return routerModuleList!.sort((a: RouteModule, b: RouteModule) => (a.meta?.sort || 0) - (b.meta?.sort || 0))
} |
100 吧,默认不设置就放在后面 |
我觉得0也没问题,有的设置有的不设置,随便哪个作为缺省好像都说得过去 |
既然你觉得应该放最后,那么我就缺省值为Number.MAX_VALUE |
哈哈,都行,你说了算,没问题就行 |
只通过 meta 里面的 title 去渲染面包屑,如果不存在直接过滤掉。这样处理感觉怎么样? |
Description
通过在路由的meta里增加hideBreadcrumb,避免单个面包屑显示分隔符
close #80
What is the purpose of this pull request?
Before submitting the PR, please make sure you do the following
fixes #123
).