Skip to content

nested keep-alive and router-view render last route path component not current route component  #3096

Closed
@ctwowt

Description

@ctwowt

Version

3.1.3

Reproduction link

https://codesandbox.io/s/peaceful-tdd-k2tvn

Steps to reproduce

see gif or
click buttons:
Home -> a.aa.aaa -> Home -> a.aa.bbb

What is expected?

router-view working correctly

What is actually happening?

router-view render last route component not current route path component


inactive = true

But I Change code

if (vnodeData.keepAlive && parent._inactive) {
     inactive = true
}

to

if (vnodeData.keepAlive) {
    inactive = parent._inactive
}

It's working.

keep-alive-router-view-bug3

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions