仿互站小程序
This commit is contained in:
22
vant/notify/notify.js
Normal file
22
vant/notify/notify.js
Normal file
@@ -0,0 +1,22 @@
|
||||
function e(e) {
|
||||
return (0, n.isObj)(e) ? e : {
|
||||
text: e
|
||||
};
|
||||
}
|
||||
|
||||
function t() {
|
||||
var e = getCurrentPages();
|
||||
return e[e.length - 1];
|
||||
}
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: !0
|
||||
}), exports.default = function(n) {
|
||||
var r = ((n = Object.assign({}, o, e(n))).context || t()).selectComponent(n.selector);
|
||||
delete n.selector, r ? (r.set(n), r.show()) : console.warn("未找到 van-notify 节点,请确认 selector 及 context 是否正确");
|
||||
};
|
||||
|
||||
var n = require("../common/utils"), o = {
|
||||
selector: "#van-notify",
|
||||
duration: 3e3
|
||||
};
|
Reference in New Issue
Block a user