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

使用路由守卫功能,点击返回,标题显示错误 #462

Open
a531267910 opened this issue Apr 28, 2024 · 2 comments
Open

使用路由守卫功能,点击返回,标题显示错误 #462

a531267910 opened this issue Apr 28, 2024 · 2 comments

Comments

@a531267910
Copy link

问题描述
1、页面A uni.navigateTO 页面B,页面B uni.navigateTO 页面C,页面C uni.reLaunch 页面A。
2、页面A 局部路由守卫中beforeRouteLeave,设置了页面A只能跳转至页面B,别的页面都无法跳转。
3、点击页面A的返回按钮,此时页面(由于路由守卫)并没有返回上一页面,路由也没有变动,但是页面的标题已经切换成页面B的标题。

疑问
产生这个的原因,是什么?uniapp本省的问题?

@SilurianYang
Copy link
Owner

如果路由表现正常,那可能是新版uni-app改变了设置标题的方式 或者是老版的插件和新版的uni-app 不兼容 需要手动处理下即可

@a531267910
Copy link
Author

我现在修改的方式,next(false)后面获取title标签,修改dom的innerText重新设置标题,您这边还有别的方式么?

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