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

main.js 直接调用组件 #1330

Closed
kaikaige opened this issue Apr 27, 2017 · 1 comment
Closed

main.js 直接调用组件 #1330

kaikaige opened this issue Apr 27, 2017 · 1 comment

Comments

@kaikaige
Copy link

main.js文件

import Vux from 'vux'
Vux.alert.show({一些代码})

我的意图主要想在main.js入口文件处写一个axios(ajax请求)的拦截器,拦截到常规错误直接调用VUX的插件alert 弹出提示?

@airyland
Copy link
Owner

先引入 alert 插件

Vue.$vux.alert.show

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

No branches or pull requests

2 participants