"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(); } } });