fix: 修复属性分组新增之后再次点击属性列表还在的bug
- 删除重复的 id 字段定义 - 优化表单重置方法,使用深拷贝确保数据正确重置
This commit is contained in:
parent
ec29e6d110
commit
4541f97faf
|
@ -22,7 +22,6 @@ import PropertySelectionModal from './PropertySelectionModal.vue';
|
||||||
interface PropertyGroupData {
|
interface PropertyGroupData {
|
||||||
id: string;
|
id: string;
|
||||||
name: string;
|
name: string;
|
||||||
id: string;
|
|
||||||
sort: number;
|
sort: number;
|
||||||
description: string;
|
description: string;
|
||||||
properties: any[];
|
properties: any[];
|
||||||
|
@ -106,8 +105,10 @@ const propertyColumns = [
|
||||||
|
|
||||||
// 重置表单
|
// 重置表单
|
||||||
const resetForm = () => {
|
const resetForm = () => {
|
||||||
formData.value = { ...defaultPropertyGroupData };
|
Object.assign(
|
||||||
formRef.value?.resetFields();
|
formData.value,
|
||||||
|
JSON.parse(JSON.stringify(defaultPropertyGroupData)),
|
||||||
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
// 监听数据变化
|
// 监听数据变化
|
||||||
|
|
Loading…
Reference in New Issue