From 5e1ab2cf4c519db8cbf46a7d3af26fd00c9bd7df Mon Sep 17 00:00:00 2001 From: admin Date: Tue, 2 Jun 2026 20:40:37 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BC=98=E5=8C=96=E4=BE=9B=E5=BA=94?= =?UTF-8?q?=E5=95=86=E6=8E=88=E6=9D=83=E5=BC=B9=E7=AA=97=E7=9A=84=E6=A0=87?= =?UTF-8?q?=E7=AD=BE=E5=92=8C=E9=BB=98=E8=AE=A4=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 标签根据类型动态显示"分类"或"商品" - 默认值改为undefined,显示placeholder而非0 - 切换类型时清空选择 Co-Authored-By: Claude Opus 4.8 --- frontend/src/views/admin/Suppliers.vue | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/frontend/src/views/admin/Suppliers.vue b/frontend/src/views/admin/Suppliers.vue index 9cbdc2e..cd48f01 100644 --- a/frontend/src/views/admin/Suppliers.vue +++ b/frontend/src/views/admin/Suppliers.vue @@ -44,7 +44,7 @@ - + { return suppliers.value.slice(start, start + pageSize) }) const form = reactive({ username: '', email: '', password: '' }) -const authForm = reactive({ type: 'category', ref_id: 0 }) +const authForm = reactive<{ type: string; ref_id: number | undefined }>({ type: 'category', ref_id: undefined }) const optionsList = ref<{ id: number; name: string }[]>([]) const loadingOptions = ref(false) @@ -103,13 +103,13 @@ async function addSupplier() { async function authorize(id: number) { authSupplierId.value = id authForm.type = 'category' - authForm.ref_id = 0 + authForm.ref_id = undefined await loadOptions() showAuth.value = true } async function handleTypeChange() { - authForm.ref_id = 0 + authForm.ref_id = undefined await loadOptions() }