From a5651e394f5d006a52fc882ace0da6a556fe113c Mon Sep 17 00:00:00 2001 From: Dragon <> Date: Mon, 18 Mar 2024 13:32:50 +0800 Subject: [PATCH] =?UTF-8?q?=E6=90=9C=E7=B4=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/search/search.ts | 14 +++ src/assets/icons/delete-history.svg | 22 ++++ src/components/Search/Search.vue | 171 +++++++++++++++++++++------- 3 files changed, 168 insertions(+), 39 deletions(-) create mode 100644 src/assets/icons/delete-history.svg diff --git a/src/api/search/search.ts b/src/api/search/search.ts index 20230cb..9df567d 100644 --- a/src/api/search/search.ts +++ b/src/api/search/search.ts @@ -27,3 +27,17 @@ export async function historySearch(params) { return res } + +/** + * 清除历史记录 + * @returns + */ +export async function deleteSearch(params) { + const res = await http.request({ + url: `/ocr/history/searchdelete`, + method: 'delete', + params, + }) + + return res +} diff --git a/src/assets/icons/delete-history.svg b/src/assets/icons/delete-history.svg new file mode 100644 index 0000000..4260184 --- /dev/null +++ b/src/assets/icons/delete-history.svg @@ -0,0 +1,22 @@ + + + 删除 + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/components/Search/Search.vue b/src/components/Search/Search.vue index de59eac..da3b834 100644 --- a/src/components/Search/Search.vue +++ b/src/components/Search/Search.vue @@ -1,56 +1,97 @@