From b84c983727260c57cd50024a2587e2ab45b9f21b Mon Sep 17 00:00:00 2001 From: zhengkunwang223 <31820853+zhengkunwang223@users.noreply.github.com> Date: Wed, 24 May 2023 21:40:35 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E7=BD=91=E7=AB=99=E6=97=A5=E5=BF=97?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=B8=85=E7=A9=BA=E5=8A=9F=E8=83=BD=20(#1134?= =?UTF-8?q?)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../website/config/log/log-fiile/index.vue | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/frontend/src/views/website/website/config/log/log-fiile/index.vue b/frontend/src/views/website/website/config/log/log-fiile/index.vue index a80a4b22d..45e101aa0 100644 --- a/frontend/src/views/website/website/config/log/log-fiile/index.vue +++ b/frontend/src/views/website/website/config/log/log-fiile/index.vue @@ -16,6 +16,9 @@ > {{ $t('file.download') }} + + {{ $t('commons.button.clean') }} +
@@ -43,6 +46,7 @@ import { oneDark } from '@codemirror/theme-one-dark'; import { computed, nextTick, onMounted, onUnmounted, ref, shallowRef } from 'vue'; import { OpWebsiteLog } from '@/api/modules/website'; import { dateFormatForName } from '@/utils/util'; +import { useDeleteData } from '@/hooks/use-delete-data'; const extensions = [javascript(), oneDark]; const props = defineProps({ @@ -124,6 +128,20 @@ const updateEnable = () => { }); }; +const cleanLog = async () => { + const req = { + id: id.value, + operate: 'delete', + logType: logType.value, + }; + try { + await useDeleteData(OpWebsiteLog, req, 'commons.msg.delete'); + getContent(); + } catch (error) { + } finally { + } +}; + const onDownload = async () => { const downloadUrl = window.URL.createObjectURL(new Blob([data.value.content])); const a = document.createElement('a');