mint-ui使用出错
使用mint-ui的Toast时候,出现以下错误,且Toast无法显示。
我看到有同学提问过这个问题,但是没有得到解决,希望老师能重视,可能其他同学还会遇到。

另外,注意到在main.js中引入mint-ui的时候,好像也有报错,不知道是否有影响。
mint-ui是按照老师说方法安装的,npm i mint-ui --save

demo17/index.vue
<template>
<div>
<div>移动组件库Mint UI</div>
<div>------------------------------------------</div>
</div>
</template>
<script>
import { Toast } from 'mint-ui';
export default {
data() {
return {
};
},
mounted() {
Toast('提示信息');
}
};
</script>main.js
// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import VueResource from 'vue-resource'
import App from './App'
import router from './router'
import store from './store'
import MintUI from 'mint-ui'
//全局使用
Vue.use(VueResource);
Vue.use(MintUI);
Vue.config.productionTip = false
/* eslint-disable no-new */
new Vue({
el: '#app',
router,
store,
components: { App },
template: '<App/>'
})1
收起
正在回答
2回答
同学你好,如下,是到这一步,在页面查看效果的时候,没有显示,并报错了吗?

这里使用你的代码测试,是可以显示的哦,例:

你这个没有找到mint-ui模块,建议使用npm install mint-ui --save重新安装下!
祝学习愉快!
热门框架Vue开发WebApp 18版
- 参与学习 人
- 提交作业 209 份
- 解答问题 3299 个
本路径是通过ES6基础知识、运用Zepto、Swiper、fullPag等移动端常用工具包、以及当下流行框架Vue,结合多个实战案例,还原真实开发场景,最终实现手机端购物商城网页开发。
了解课程
恭喜解决一个难题,获得1积分~
来为老师/同学的回答评分吧
0 星