Skip to content

路由缓存问题 #842

Closed
Closed
@aleiliuwei

Description

@aleiliuwei
版本号:2.1.2
问题描述:是这样的,我菜单配置了打开路由缓存,但是这样的话,tab切换时不会重新刷新是正确的,但是我关闭了tab页时再打开就不会刷新了,还是走缓存,我觉得应该在打开tab页的时候判断是否已经在打开的列表里,已打开的则可以走缓存,没打开的需要重新刷新(能提供下在哪里可以修改吗)
截图&代码:

友情提示: 未按格式要求发帖,会直接删掉。

Activity

zhangdaiscott

zhangdaiscott commented on Dec 25, 2019

@zhangdaiscott
Member

目前还不支持这种模式,我们看看

xiuxiuyifan

xiuxiuyifan commented on Dec 26, 2019

@xiuxiuyifan

你可以在代码里面对activated钩子里面做判断,这个钩子是当被缓存页面激活的时候会执行的。

zhangdaiscott

zhangdaiscott commented on Dec 27, 2019

@zhangdaiscott
Member

sjlei

sjlei commented on Jan 3, 2020

@sjlei

问题已修复,将在下个版本同步。


在下个版本发布之前可以先手动在TabLayout.vue文件中添加如下几行代码即可。

image

          if (newRoute.meta.keepAlive) {
            this.routeReload()
          }
zhangdaiscott

zhangdaiscott commented on Oct 15, 2020

@zhangdaiscott
Member

已经重新改造,下个版本2.3.1 更新代码

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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

        Participants

        @zhangdaiscott@aleiliuwei@xiuxiuyifan@sjlei

        Issue actions

          路由缓存问题 · Issue #842 · jeecgboot/JeecgBoot