Skip to content
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

楼主这个项目框架的动态面包屑该怎么设置呢,我看了下代码不太好设置,楼主有好的解决思路么 #3

Closed
xinyueyijiu opened this issue May 13, 2024 · 2 comments
Assignees

Comments

@xinyueyijiu
Copy link

No description provided.

@wangyupo
Copy link
Owner

wangyupo commented May 14, 2024

嗯,你把你的业务场景,组织一下发出来,我看下。

或者你看下这个是不是你想要的动态面包屑效果:示例-v3s动态设置面包屑。这是实现动态面包屑的 示例代码,使用 onBeforeRouteLeave 在离开当前页面时,判断目标路由,然后动态设置目标路由 meta 的 alias 属性即可 动态设置路由别名,面包屑会优先显示别名,且刷新页面不失效。

注意:一定要判断 目标路由 后,再设置 meta 的 alias 属性,否则会导致跳转其它页面也会设置别名。

@wangyupo wangyupo self-assigned this May 14, 2024
@wangyupo wangyupo added good first issue Good for newcomers and removed good first issue Good for newcomers labels May 14, 2024
@xinyueyijiu
Copy link
Author

好的,多谢啦

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants