日照项目的居民端小程序
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

41 lines
1.1 KiB

"use strict";
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
var tempReslove = function () { };
Component({
data: {
hidden: true,
showCancel: true,
title: "",
content: "",
confirmText: "确认",
cancelText: "取消"
},
methods: {
show: function (opts) {
this.setData(__assign(__assign({}, opts), { hidden: false }));
return new Promise(function (reslove) {
tempReslove = reslove;
});
},
hide: function () {
this.setData({ hidden: true });
},
confirm: function () {
tempReslove(true);
},
cancel: function () {
tempReslove(false);
this.hide();
}
}
});