在main.js里面不是已经全局引入并用Vue.use安装了mint-ui(意味toast不也安装了?),但是在直接使用toast报undefined,这是为什么? 作用域问题么?
main.js
import Vue from 'vue'
import MintUI from 'mint-ui'
import 'mint-ui/lib/style.css'
Vue.use(MintUI)
new Vue({
created(){
new Toast('hello'); //toast is undefined
}
})
this.toast(....)
看看文档好不了