npm i vant -S
在main.js中加入
//引入Vant【安装方法】cnpm i vant -S
import Vant from 'vant';
import 'vant/lib/index.css';
import 'vant/lib/icon/local.css'; //解决离线无网络环境中使用icon不显示的问题
Vue.use(Vant);
//引入常用调用组件
import { Toast, Loading, Notify } from 'vant';
Vue.prototype.$toast = Toast;
Vue.prototype.$loading = Loading;
Vue.prototype.$notify = Notify;