【发布时间】:2018-08-27 08:03:34
【问题描述】:
toast 是 mint-ui 组件,我已经导入 mint-ui,但是在 vue 实例中使用 toast 时会报错?为什么?
import Vue from 'vue';
import MintUi from 'mint-ui';
import 'mint-ui/lib/style.css'
Vue.use(MintUi);
new Vue({
el:'#app',
render:(creater)=> creater(app),
created(){
new Toast('hello') //toast is not defined
}
})
【问题讨论】: