纯js中使用Message、MessageBox的方法


常规是在全局引入message,但是如果我想在二次封装的纯.js文件里面使用:

 import { Message } from 'element-ui'
 
 
function(){ 
    Message({
          showClose: true,
          message: ‘消息提示’,
          type: 'error',
          duration: 1000 })
}

同样MessageBox也可以这样使用
 
import { MessageBox } from 'element-ui';
function(){
       MessageBox.alert(
              res.data.errorDescription,
               '',
              { customClass:'ajax-error',
                 showConfirmButton:false,
             });
   }
 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM