1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89
| module.exports = {
showToast: function(n) {
return new Promise(function(o, t) {
wx.showToast({
title: n.title,
icon: n.icon || "none",
image: n.image,
duration: n.duration || 2e3,
mask: n.mask || !1,code
success: function() {
o();
},
fail: function() {
t();
}
});
});
},
showLoading: function(n) {
return new Promise(function(o, t) {
wx.showLoading({
title: n.title,
mask: n.mask,
success: function() {
o();
},
fail: function() {
t();
}
});
});
},
hideToast: function() {
return new Promise(function(n, o) {
wx.hideToast(), n();
});
},
hideLoading: function() {
return new Promise(function(n, o) {
wx.hideLoading(), n();
});
},
showModal: function(n) {
return new Promise(function(o, t) {
wx.showModal({
title: n.title || "",
content: n.content || "",
showCancel: n.showCancel || !1,
cancelText: n.cancelText || "取消",
cancelColor: n.cancelColor || "#202020",
confirmText: n.confirmText || "确定",
confirmColor: n.confirmColor || "#0084ff",
success: function(n) {
o({
confirm: n.confirm,
cancel: n.cancel
});
},
fail: function(n) {
t(n);
}
});
});
},
showActionSheet: function(n) {
return new Promise(function(o, t) {
wx.showActionSheet({
itemList: n.itemList,
itemColor: n.itemColor,
success: function(n) {
o({
tapIndex: n.tapIndex
});
},
fail: function() {
t();
}
});
});
}
};
在做微信小程序的时候 打开js 包看代码的时候里面有个code 关键字,找到后是在export 模块里面但是里面有个code 不知道怎么来的不知道这个语法啥意思,求人指教,谢谢
就在这行代码(mask: n.mask || !1,code)
请问这个是什么意思?有人知道吗? |