日照项目的居民端小程序
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
706 B

let tempReslove = () => {};
Component({
data: {
hidden: true,
title: "",
value: "",
confirmText: "确认",
cancelText: "取消",
},
methods: {
show(opts) {
this.setData({
...opts,
hidden: false,
});
return new Promise((reslove) => {
tempReslove = reslove;
});
},
hide() {
this.setData({ hidden: true });
},
confirm() {
tempReslove({
msg: "success",
data: {
value: this.data.value,
},
});
this.hide();
},
cancel() {
tempReslove({
msg: "cancel",
});
this.hide();
},
},
});