Open
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.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
💬 In discussion