-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Open
vuejs/core
#12042Labels
externalThis depends on an external dependency but is kept opened to track itThis depends on an external dependency but is kept opened to track ithelp wantedExtra attention is neededExtra attention is needed
Description
Version
3.0.3
Reproduction link
https://codesandbox.io/s/nifty-roentgen-67uyr
without vue router
Steps to reproduce
There is 5 files in the project. These files are App.vue, UserCenter/Index.vue, UserCenter/Push.vue, List/Index.vue, List/Detail.vue. Two Index.vue files are the child routes of App.vue, and I wrote keep-alive in App.vue. Push.vue and Detail.vue are child routes of two Index.vue, and I wrote keep-alive in two Index.vue to cache them.Here is the step to reproduce:
- First, open the sandbox link and open console, you will find the console print 'app loading';
- Second, click 'push page' link, console print 'user center loading... ' and 'push loading... ';
- Third, click 'detail page' link, console print 'list loading...' and 'detail loading...' twice;
- Forth, navigate back to previous push page, console print 'push loading' again.
What is expected?
In step 3, I just expect it print once; In step4, it's not supposed to print again;
What is actually happening?
In these circumstance, I found the child route mount twice;And about step 4 in my project, I found the cache did function, but it did mount again, which was confusing.
danitatt, huijiewei, bmarz, natuan62, zrla and 47 morecricketthomas, MartinLoeper, jsxiaosi, nanarino, hardenb and 3 more
Metadata
Metadata
Assignees
Labels
externalThis depends on an external dependency but is kept opened to track itThis depends on an external dependency but is kept opened to track ithelp wantedExtra attention is neededExtra attention is needed
Type
Projects
Status
💬 In discussion