Skip to content

Vue router-link 跳转到同一个路由下,参数不同,重新创建Component解决办法 #4

Open
@WeihanLi

Description

@WeihanLi

Vue router-link 跳转到同一个路由下参数不同或者路由不同,但是同一个Component,是不会重新创建 Component,这就导致一些问题,解决方案如下:

<router-view :key="$route.fullPath"></router-view>

参考:

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions