main.js
Vue.prototype.$message = function (option) { option.offset = 70 option.showClose = true return Message(option) } Vue.prototype.$message.success = function (msg) { return Message.success({ message: msg, offset: 70, showClose: true }) } Vue.prototype.$message.warning = function (msg) { return Message.warning({ message: msg, offset: 70, showClose: true }) } Vue.prototype.$message.error = function (msg) { return Message.error({ message: msg, offset: 70, showClose: true }) }
标签:showClose,elment,offset,msg,Message,prototype,message From: https://www.cnblogs.com/dianzan/p/17787210.html