From 67c58355f58d37179b25fc362244de7c9120b831 Mon Sep 17 00:00:00 2001 From: dongqian <3475123872@qq.com> Date: Thu, 30 Oct 2025 17:32:23 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9deepmate=E5=88=A0=E9=99=A4?= =?UTF-8?q?=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/deepMate/deepMate.vue | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/pages/deepMate/deepMate.vue b/pages/deepMate/deepMate.vue index 1e9c5e7..d3fab77 100644 --- a/pages/deepMate/deepMate.vue +++ b/pages/deepMate/deepMate.vue @@ -237,7 +237,7 @@ 删除全部 @@ -571,8 +571,21 @@ const groupedHistory = computed(() => { }); const clearAllHistory = () => { - searchHistory.value = []; - // uni.setStorageSync("search_history", []); + uni.showModal({ + title: '确认删除', + content: '确定要删除全部历史记录吗?该操作不可撤销。', + confirmText: '删除', + cancelText: '取消', + success: (res) => { + if (res.confirm) { + // 当前历史面板依赖 historyList,而非 searchHistory + historyList.value = []; + // 同步清空本地旧缓存(如果曾使用) + // uni.setStorageSync("search_history", []); + uni.showToast({ title: '历史已清空', icon: 'none' }); + } + } + }) }; // 发送消息