Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dashboard keep-alive 失效 #55

Closed
oevery opened this issue Aug 12, 2020 · 2 comments
Closed

dashboard keep-alive 失效 #55

oevery opened this issue Aug 12, 2020 · 2 comments

Comments

@oevery
Copy link
Contributor

oevery commented Aug 12, 2020

偶然发现框架 keep-alive 失效,经过了解后发现 路由 name 必须跟组件 name 一模一样。 希望在文档或代码中提及。
以及 dashboard 路由 name 应当与组件 name 一致。

  {
    path: '/',
    component: Layout,
    redirect: '/dashboard',
    children: [
      {
        path: 'dashboard',
        component: () => import('@/views/dashboard/index'),
-       name: '首页',
+       name: 'Dashboard',
        meta: { title: '首页', icon: 'dashboard', affix: true }
      }
    ]
  },

我还发现菜单的 noCache 是写死的不缓存,我认为可以在创建菜单时提供 cache 选项自定义是否缓存。

@wenjianzhang
Copy link
Member

非常感谢您提交的问题,我们将会在下一个版本做修正,谢谢!

@wenjianzhang
Copy link
Member

针对这个问题,noCache即使设置为false还是不能够被缓存,PanJiaChen/vue-element-admin#406 并没有比较好的方案,如果有好的方案可以提交pr,谢谢支持和关注

wenjianzhang added a commit that referenced this issue Mar 26, 2021
docs📝 :更新版本号,修复菜单名称问题(#55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants