在main.js中

import {MessageBox } from 'element-ui';
Vue.use(MessageBox );
Vue.prototype.$msgbox = MessageBox;

导致一进入页面,就会出现一个消息弹框

vue 按需引入element-ui的MessageBox或者Message默认弹出消息框的问题解决

 

原因是:不应该写第二句 Vue.use(MessageBox );正确的写法是,就可以了,使用了use就会默认的执行一次

import {MessageBox } from 'element-ui';

Vue.prototype.$msgbox = MessageBox;

 

 

 
vue 按需引入element-ui的MessageBox或者Message默认弹出消息框的问题解决
 

相关文章:

  • 2022-01-08
  • 2022-12-23
  • 2022-01-22
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-08-17
  • 2022-12-23
猜你喜欢
  • 2021-09-19
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案