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

router exprot导出 vuex的permissionimport 值为undefined #3306

Open
tom1jack opened this issue Jul 6, 2020 · 3 comments
Open

router exprot导出 vuex的permissionimport 值为undefined #3306

tom1jack opened this issue Jul 6, 2020 · 3 comments

Comments

@tom1jack
Copy link

tom1jack commented Jul 6, 2020

Question(提问)

Steps to reproduce(问题复现步骤)

Screenshot or Gif(截图或动态图)

Link to minimal reproduction(最小可在线还原demo)

src.zip
Uploading QQ截图20200706115201.png…
QQ图片20200706115058

Other relevant information(格外信息)

  • Your OS:1
  • Node.js version:1
  • vue-element-admin version:1
@tom1jack
Copy link
Author

tom1jack commented Jul 6, 2020

vue的router export导出 router在vuex的permission本来可以import引入
在页面的代码添加 import ResizeMixin from './mixin/ResizeHandler' 与 mixins: [ResizeMixin],
之后 import引入值就变成了undefined
在去掉ResizeHandler.js的 import store from '@/store'又可以正常导出

@tom1jack
Copy link
Author

tom1jack commented Jul 6, 2020

我发现我与作者代码相比少一些编译插件,请问如何引入编译插件?

@tom1jack
Copy link
Author

tom1jack commented Jul 6, 2020

弄明白了,貌似是main.js里需要先引入store再引入router就不会报错了 保证store可以随便引入router的index的export。。。

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

1 participant