From 97db9d11ff425583d2dece82a842a7766bb5e7e4 Mon Sep 17 00:00:00 2001 From: wlzboy <66905212@qq.com> Date: 星期五, 26 九月 2025 21:43:39 +0800 Subject: [PATCH] feat: 添加map --- app/plugins/modal.js | 20 ++++++++++++++++++++ 1 files changed, 20 insertions(+), 0 deletions(-) diff --git a/app/plugins/modal.js b/app/plugins/modal.js index 99b2215..fa5b4a1 100644 --- a/app/plugins/modal.js +++ b/app/plugins/modal.js @@ -48,6 +48,26 @@ }) }) }, + // 杈撳叆妗� + prompt(content, defaultValue) { + return new Promise((resolve, reject) => { + uni.showModal({ + title: '绯荤粺鎻愮ず', + content: content, + editable: true, + placeholderText: defaultValue || '', + cancelText: '鍙栨秷', + confirmText: '纭畾', + success: function(res) { + if (res.confirm) { + resolve(res.content) + } else { + reject() + } + } + }) + }) + }, // 鎻愮ず淇℃伅 showToast(option) { if (typeof option === "object") { -- Gitblit v1.9.1