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

在菜单上面如果还有Tab可以切换整个左侧菜单和页面的话,项目有什么好办法 #3640

Open
LeslieZhang opened this issue Mar 17, 2021 · 2 comments

Comments

@LeslieZhang
Copy link

LeslieZhang commented Mar 17, 2021

Question(提问)

在菜单上面如果还有Tab可以切换整个左侧菜单和页面的话,项目有什么好办法

Screenshot or Gif(截图或动态图)

image

Other relevant information(格外信息)

  • Your OS:
  • Node.js version:
  • vue-element-admin version:
@ybf970928
Copy link

ybf970928 commented Mar 20, 2021

我做过类似的功能,首先切换选中(记得存下选中的ID)要先replace到 '/dashboard'页面,这样做的目的是为了触发路由守卫里通过ID获取左侧新菜单的接口

npm.run.serve.2021-03-03.17.59.39.mp4

@jade-liu
Copy link

  1. 把当前的Tab缓存到vuex里面,切换Tab时修改vuex中的Tab
  2. 在菜单中监听Tab的变化,显示当前Tab对应的菜单

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

3 participants