From 09bc7e13057493b27c049f10a941671c1aee57fa Mon Sep 17 00:00:00 2001 From: hwj Date: Fri, 26 Jun 2026 09:29:08 +0800 Subject: [PATCH] =?UTF-8?q?style=EF=BC=9A=E4=BA=A7=E5=93=81=E7=89=A9?= =?UTF-8?q?=E6=96=99=E5=88=86=E7=B1=BB-=E7=B1=BB=E5=9E=8B=E5=AD=97?= =?UTF-8?q?=E6=AE=B5=E9=BB=98=E8=AE=A4=E5=B8=A6=E5=85=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/erp/product/category/index.vue | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/views/erp/product/category/index.vue b/src/views/erp/product/category/index.vue index daf9407d..eab93d80 100644 --- a/src/views/erp/product/category/index.vue +++ b/src/views/erp/product/category/index.vue @@ -185,7 +185,9 @@ const resetQuery = () => { /** 添加/修改操作 */ const formRef = ref() const openForm = (type: string, id?: number) => { - formRef.value.open(type, id) + const currentType = queryParams.type ?? (activeTab.value ? Number(activeTab.value) : undefined) + const defaultData = type === 'create' && currentType !== undefined ? { type: currentType } : undefined + formRef.value.open(type, id, defaultData) } /** 删除按钮操作 */