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 @@