Commit 973b31a9 authored by zhengke's avatar zhengke

增加js

parent 9d0b6d67
Pipeline #55 canceled with stages
export default{
install(Vue,options){
//消息成功提示
Vue.prototype.Success = function (msg) {
this.$message({
message: msg,
duration: 2000,
type: "success"
});
},
//错误提示
Vue.prototype.Error = function (msg) {
this.$message({
message: msg,
duration: 2000,
type: "error"
});
},
//一般提示
Vue.prototype.Info = function (msg) {
this.$message({
message: msg,
duration: 2000,
type: "info"
});
},
//警告提示
Vue.prototype.Warning = function (msg) {
this.$message({
message: msg,
duration: 2000,
type: "warning"
});
},
//Confirm
Vue.prototype.Confirm = function (msg, callback) {
this.$confirm(msg, "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
if (typeof callback === 'function') {
callback();
}
})
.catch(() => {
this.Info("已取消操作");
});
}
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment