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

每次跳转页面都会重复执行main.ts方法 #8

Closed
kenny-yao opened this issue Aug 30, 2023 · 1 comment
Closed

每次跳转页面都会重复执行main.ts方法 #8

kenny-yao opened this issue Aug 30, 2023 · 1 comment
Assignees
Labels
invalid This doesn't seem right

Comments

@kenny-yao
Copy link

项目:examples/unplugin-vue-router
首次进入首页,见下图:
image

在此进入其它页面,比如about,见下图:
image

每次跳转页面,main.ts里面方法都重新执行了一遍

@markthree
Copy link
Member

@kenny-yao 靓仔你好,你需要使用 <router-link to="/">about</router-link> 去跳转,而非浏览器导航栏。导航栏进入会进行应用的重新加载,非 bug

@markthree markthree self-assigned this Aug 30, 2023
@markthree markthree added the invalid This doesn't seem right label Aug 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

2 participants