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' }); + } + } + }) }; // 发送消息