Browse Source

修改deepmate删除功能

dongqian/feature-20251022181325-deepmate简版
dongqian 3 weeks ago
parent
commit
67c58355f5
  1. 17
      pages/deepMate/deepMate.vue

17
pages/deepMate/deepMate.vue

@ -237,7 +237,7 @@
<view class="delete-all-container">
<image
class="delete-icon"
src="/static/icons/Group_48095481.svg"
src="/static/icons/Group_48095481.svg" @click="clearAllHistory"
></image>
<text class="delete-all" @click="clearAllHistory">删除全部</text>
</view>
@ -571,8 +571,21 @@ const groupedHistory = computed(() => {
});
const clearAllHistory = () => {
searchHistory.value = [];
uni.showModal({
title: '确认删除',
content: '确定要删除全部历史记录吗?该操作不可撤销。',
confirmText: '删除',
cancelText: '取消',
success: (res) => {
if (res.confirm) {
// historyList searchHistory
historyList.value = [];
// 使
// uni.setStorageSync("search_history", []);
uni.showToast({ title: '历史已清空', icon: 'none' });
}
}
})
};
//

Loading…
Cancel
Save