From 0944d4c82e31a69a9f079e691f549e00bd7a0eca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=93=E8=B6=85?= <2325690622@qq.com> Date: Wed, 19 Nov 2025 15:50:19 +0800 Subject: [PATCH] Add parentId and sort fields to formData --- src/views/mall/product/category/CategoryForm.vue | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/views/mall/product/category/CategoryForm.vue b/src/views/mall/product/category/CategoryForm.vue index 8e89ae25..5059bed0 100644 --- a/src/views/mall/product/category/CategoryForm.vue +++ b/src/views/mall/product/category/CategoryForm.vue @@ -62,8 +62,10 @@ const formLoading = ref(false) // 表单的加载中:1)修改时的数据加 const formType = ref('') // 表单的类型:create - 新增;update - 修改 const formData = ref({ id: undefined, + parentId: 0, // root parent id name: '', picUrl: '', + sort: 0, status: CommonStatusEnum.ENABLE }) const formRules = reactive({ @@ -126,8 +128,10 @@ const submitForm = async () => { const resetForm = () => { formData.value = { id: undefined, + parentId: 0, // root parent id name: '', picUrl: '', + sort: 0, status: CommonStatusEnum.ENABLE } formRef.value?.resetFields()