"use strict"; const common_vendor = require("../../common/vendor.js"); if (!Array) { const _easycom_uni_card2 = common_vendor.resolveComponent("uni-card"); const _easycom_uni_section2 = common_vendor.resolveComponent("uni-section"); const _easycom_uni_popup2 = common_vendor.resolveComponent("uni-popup"); const _easycom_uni_popup_message2 = common_vendor.resolveComponent("uni-popup-message"); const _easycom_uni_popup_dialog2 = common_vendor.resolveComponent("uni-popup-dialog"); const _easycom_uni_popup_share2 = common_vendor.resolveComponent("uni-popup-share"); (_easycom_uni_card2 + _easycom_uni_section2 + _easycom_uni_popup2 + _easycom_uni_popup_message2 + _easycom_uni_popup_dialog2 + _easycom_uni_popup_share2)(); } const _easycom_uni_card = () => "../../uni_modules/uni-card/components/uni-card/uni-card.js"; const _easycom_uni_section = () => "../../uni_modules/uni-section/components/uni-section/uni-section.js"; const _easycom_uni_popup = () => "../../uni_modules/uni-popup/components/uni-popup/uni-popup.js"; const _easycom_uni_popup_message = () => "../../uni_modules/uni-popup/components/uni-popup-message/uni-popup-message.js"; const _easycom_uni_popup_dialog = () => "../../uni_modules/uni-popup/components/uni-popup-dialog/uni-popup-dialog.js"; const _easycom_uni_popup_share = () => "../../uni_modules/uni-popup/components/uni-popup-share/uni-popup-share.js"; if (!Math) { (_easycom_uni_card + _easycom_uni_section + _easycom_uni_popup + _easycom_uni_popup_message + _easycom_uni_popup_dialog + _easycom_uni_popup_share)(); } const _sfc_main = { __name: "popup", setup(__props) { const state = common_vendor.reactive({ type: "center", msgType: "success", messageText: "这是一条成功提示", showClose: true }); const value = common_vendor.ref(""); const popup = common_vendor.ref(null); const message = common_vendor.ref(null); const alertDialog = common_vendor.ref(null); const inputDialog = common_vendor.ref(null); const share = common_vendor.ref(null); const change = (e) => { common_vendor.index.__f__("log", "at pages/popup/popup.vue:116", "当前模式:" + e.type + ",状态:" + e.show); }; const toggle = (type) => { state.type = type; popup.value.open(type); }; const messageToggle = (type) => { state.msgType = type; state.messageText = `这是一条${type}消息提示`; message.value.open(); }; const dialogToggle = (type) => { state.msgType = type; alertDialog.value.open(); }; const dialogConfirm = () => { common_vendor.index.__f__("log", "at pages/popup/popup.vue:137", "点击确认"); state.messageText = `点击确认了 ${state.msgType} 窗口`; message.value.open(); }; const inputDialogToggle = () => { inputDialog.value.open(); }; const dialogClose = () => { common_vendor.index.__f__("log", "at pages/popup/popup.vue:147", "点击关闭"); }; const dialogInputConfirm = (val) => { common_vendor.index.showLoading({ title: "3秒后会关闭" }); common_vendor.index.__f__("log", "at pages/popup/popup.vue:152", val); setTimeout(() => { common_vendor.index.hideLoading(); value.value = val; inputDialog.value.close(); }, 3e3); }; const shareToggle = () => { share.value.open(); }; return (_ctx, _cache) => { return { a: common_vendor.p({ ["is-full"]: true, ["is-shadow"]: false }), b: common_vendor.o(($event) => toggle("top")), c: common_vendor.o(($event) => toggle("bottom")), d: common_vendor.o(($event) => toggle("center")), e: common_vendor.o(($event) => toggle("left")), f: common_vendor.o(($event) => toggle("right")), g: common_vendor.p({ title: "基本示例", type: "line", ["sub-title"]: "自定义顶部圆角" }), h: common_vendor.o(($event) => messageToggle("success")), i: common_vendor.o(($event) => messageToggle("error")), j: common_vendor.o(($event) => messageToggle("warn")), k: common_vendor.o(($event) => messageToggle("info")), l: common_vendor.p({ title: "提示消息", type: "line" }), m: common_vendor.o(($event) => dialogToggle("success")), n: common_vendor.o(($event) => dialogToggle("error")), o: common_vendor.o(($event) => dialogToggle("warn")), p: common_vendor.o(($event) => dialogToggle("info")), q: common_vendor.p({ title: "对话框示例", type: "line" }), r: common_vendor.t(value.value), s: common_vendor.o(inputDialogToggle), t: common_vendor.p({ title: "输入框示例", type: "line", padding: true }), v: common_vendor.o(shareToggle), w: common_vendor.p({ title: "底部分享示例", type: "line", padding: true }), x: _ctx.type === "left" || _ctx.type === "right" ? 1 : "", y: common_vendor.sr(popup, "532c023e-6", { "k": "popup" }), z: common_vendor.o(change), A: common_vendor.p({ ["background-color"]: "#fff", ["border-radius"]: "10px 10px 0 0" }), B: common_vendor.p({ type: _ctx.msgType, message: _ctx.messageText, duration: 2e3 }), C: common_vendor.sr(message, "532c023e-7", { "k": "message" }), D: common_vendor.p({ type: "message" }), E: common_vendor.o(dialogConfirm), F: common_vendor.o(dialogClose), G: common_vendor.p({ showClose: _ctx.showClose, type: _ctx.msgType, cancelText: "关闭", confirmText: "同意", title: "通知", content: "欢迎使用 uni-popup!" }), H: common_vendor.sr(alertDialog, "532c023e-9", { "k": "alertDialog" }), I: common_vendor.p({ type: "dialog" }), J: common_vendor.sr("inputClose", "532c023e-12,532c023e-11"), K: common_vendor.o(dialogInputConfirm), L: common_vendor.o(($event) => value.value = $event), M: common_vendor.p({ maxlength: 10, mode: "input", title: "输入内容", placeholder: "请输入内容,限制10个字", modelValue: value.value }), N: common_vendor.sr(inputDialog, "532c023e-11", { "k": "inputDialog" }), O: common_vendor.p({ type: "dialog" }), P: common_vendor.sr(share, "532c023e-13", { "k": "share" }), Q: common_vendor.p({ type: "share", safeArea: true, backgroundColor: "#fff" }) }; }; } }; wx.createPage(_sfc_main); //# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/popup/popup.js.map