From 15f7a30120b449992d013ade691e3fb114907cf6 Mon Sep 17 00:00:00 2001 From: fit2cloud-chenyw Date: Thu, 8 May 2025 09:48:21 +0800 Subject: [PATCH] perf: Frontend build error --- frontend/src/views/system/model/index.vue | 14 +++++++++++--- frontend/src/views/system/user/index.vue | 6 ++++-- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/frontend/src/views/system/model/index.vue b/frontend/src/views/system/model/index.vue index 276aaec8..f5bc24c8 100644 --- a/frontend/src/views/system/model/index.vue +++ b/frontend/src/views/system/model/index.vue @@ -222,9 +222,17 @@ const openDialog = () => { } const resetForm = () => { if (!termFormRef) return - Object.keys(state.form).forEach((key) => { - state.form[key as keyof typeof state.form] = null - }) + state.form = { + id: '', + name: '', + type: 0, + api_key: '', + endpoint: '', + max_context_window: 0, + temperature: 0, + status: false, + description: '' + } } const closeForm = () => { diff --git a/frontend/src/views/system/user/index.vue b/frontend/src/views/system/user/index.vue index 60165523..050ba615 100644 --- a/frontend/src/views/system/user/index.vue +++ b/frontend/src/views/system/user/index.vue @@ -147,6 +147,7 @@ const handleSearch = (e: any) => { console.log('search', e); } const editHandler = (id: any) => { + console.log('editHandler', id) /* userApi.query(id).then((res: any) => { console.log('term detail', res) state.form = res @@ -154,6 +155,7 @@ const editHandler = (id: any) => { }) */ } const deleteHandler = (id: any) => { + console.log('deleteHandler', id) ElMessageBox.confirm( 'Are you sure to delete?', 'Warning', @@ -181,9 +183,9 @@ const deleteHandler = (id: any) => { }) } -const openDialog = () => { +/* const openDialog = () => { dialogFormVisible.value = true -} +} */ const resetForm = () => { if (!termFormRef) return Object.keys(state.form).forEach((key) => {