fix: 修复属性分组新增之后再次点击属性列表还在的bug

- 删除重复的 id 字段定义
- 优化表单重置方法,使用深拷贝确保数据正确重置
This commit is contained in:
fhysy 2025-10-13 15:59:40 +08:00
parent ec29e6d110
commit 4541f97faf
1 changed files with 4 additions and 3 deletions

View File

@ -22,7 +22,6 @@ import PropertySelectionModal from './PropertySelectionModal.vue';
interface PropertyGroupData {
id: string;
name: string;
id: string;
sort: number;
description: string;
properties: any[];
@ -106,8 +105,10 @@ const propertyColumns = [
//
const resetForm = () => {
formData.value = { ...defaultPropertyGroupData };
formRef.value?.resetFields();
Object.assign(
formData.value,
JSON.parse(JSON.stringify(defaultPropertyGroupData)),
);
};
//