008A功能开始
This commit is contained in:
@ -1,11 +1,12 @@
|
||||
var MsgType = {
|
||||
error: "error",
|
||||
succ: "succ",
|
||||
warn: "warn"
|
||||
warn: "warn",
|
||||
info:'info'
|
||||
}
|
||||
var time = null;
|
||||
// 显示成功
|
||||
export const MsgSuccess = (msg, btnTxt, ev) => {
|
||||
export const MsgSuccess = (msg, btnTxt, ev,tapCallback) => {
|
||||
|
||||
if (!ev) {
|
||||
|
||||
@ -15,13 +16,13 @@ export const MsgSuccess = (msg, btnTxt, ev) => {
|
||||
|
||||
return null;
|
||||
}
|
||||
let option = ev.$refs.msgPop.showMsg(msg, btnTxt, MsgType.succ);
|
||||
let option = ev.$refs.msgPop.showMsg(msg, btnTxt, MsgType.succ,tapCallback);
|
||||
|
||||
createClear(ev);
|
||||
return option;
|
||||
}
|
||||
//显示失败
|
||||
export const MsgError = (msg, btnTxt, ev) => {
|
||||
export const MsgError = (msg, btnTxt, ev,tapCallback) => {
|
||||
|
||||
if (!ev) {
|
||||
|
||||
@ -32,12 +33,12 @@ export const MsgError = (msg, btnTxt, ev) => {
|
||||
return null;
|
||||
}
|
||||
|
||||
let option = ev.$refs.msgPop.showMsg(msg, btnTxt, MsgType.error);
|
||||
let option = ev.$refs.msgPop.showMsg(msg, btnTxt, MsgType.error,tapCallback);
|
||||
createClear(ev);
|
||||
return option;
|
||||
}
|
||||
//显示警告
|
||||
export const MsgWarning = (msg, btnTxt, ev, isClear) => {
|
||||
export const MsgWarning = (msg, btnTxt, ev, isClear,tapCallback) => {
|
||||
if (!ev) {
|
||||
|
||||
return null;
|
||||
@ -46,7 +47,7 @@ export const MsgWarning = (msg, btnTxt, ev, isClear) => {
|
||||
|
||||
return null;
|
||||
}
|
||||
let option = ev.$refs.msgPop.showMsg(msg, btnTxt, MsgType.warn);
|
||||
let option = ev.$refs.msgPop.showMsg(msg, btnTxt, MsgType.warn,tapCallback);
|
||||
if (isClear === undefined || isClear) {
|
||||
createClear(ev);
|
||||
}
|
||||
@ -55,7 +56,25 @@ export const MsgWarning = (msg, btnTxt, ev, isClear) => {
|
||||
|
||||
|
||||
}
|
||||
//显示警告
|
||||
export const MsgInfo = (msg, btnTxt, ev, isClear,btnCallback) => {
|
||||
if (!ev) {
|
||||
|
||||
return null;
|
||||
}
|
||||
if (!ev.$refs.msgPop) {
|
||||
|
||||
return null;
|
||||
}
|
||||
let option = ev.$refs.msgPop.showMsg(msg, btnTxt, MsgType.info,btnCallback);
|
||||
if (isClear === undefined || isClear) {
|
||||
createClear(ev);
|
||||
}
|
||||
|
||||
return option;
|
||||
|
||||
|
||||
}
|
||||
|
||||
// 隐藏loading
|
||||
export const MsgClose = (options, ev) => {
|
||||
@ -109,7 +128,7 @@ const createClear = (ev) => {
|
||||
showPop({
|
||||
key: key,
|
||||
message: "消息太多, 是否全部关闭",
|
||||
iconUrl: "/static/images/6155/DeviceDetail/uploadErr.png",
|
||||
iconUrl: "/static/images/common/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
buttonBgColor: "#E03434",
|
||||
buttonText: '全部关闭',
|
||||
|
||||
Reference in New Issue
Block a user