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

父路由进入子路由(或者反过来)都会导致父页面再次加载 #3520

Open
boringtu opened this issue Nov 30, 2020 · 0 comments

Comments

@boringtu
Copy link

Bug report(问题描述)

父路由进入子路由(或者反过来)都会导致父页面再次加载
Bug原因:

./src/layout/components/AppMain.vue

为了动画效果,在 router-view 上加了 :key="key",而 key 的值为:$route.path
所以无论是从父路由到子路由还是反过来,都会导致 key 值变化,key 不同,当然就会被认为不是同一个页面所以导致重新加载

但去掉了 router-view 上的 :key="key",动画效果就没了。

目前的框架是无法让 父页面只加载一次页面切换动画 共存的,只能舍掉一个。所以还是希望这个 Bug 能解决一下~

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

1 participant