fix: 修复属性分组新增之后再次点击属性列表还在的bug
- 删除重复的 id 字段定义 - 优化表单重置方法,使用深拷贝确保数据正确重置
This commit is contained in:
parent
ec29e6d110
commit
4541f97faf
|
@ -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)),
|
||||
);
|
||||
};
|
||||
|
||||
// 监听数据变化
|
||||
|
|
Loading…
Reference in New Issue