diff --git a/src/components/DesignForm/formControlPropertiNew.vue b/src/components/DesignForm/formControlPropertiNew.vue index faf4b6e..a5f78d0 100644 --- a/src/components/DesignForm/formControlPropertiNew.vue +++ b/src/components/DesignForm/formControlPropertiNew.vue @@ -1288,11 +1288,16 @@ const controlChange = (obj: any, val: any) => { obj.path && getPropByPath(controlData.value, obj.path, newVal); } - //liwenxuan 关联选项设置 修复bug:当字段标识改变时,关联选项设置的字段标识未同步更改 start - emits("formNameChange", val); - //liwenxuan 关联选项设置 修复bug:当字段标识改变时,关联选项设置的字段标识未同步更改 end }; +//liwenxuan 关联选项设置 修复bug:当字段标识改变时,关联选项设置的字段标识未同步更改 start +//关联选项设置会在标签名称改变时清空 +function formNameChange (){ + emits("formNameChange", 1); +} +//liwenxuan 关联选项设置 修复bug:当字段标识改变时,关联选项设置的字段标识未同步更改 end + + /** * 获取非负整数随机数 @@ -1314,6 +1319,13 @@ const Rand = (Min: number, Max: number) => { const getPropByPath = (obj: any, path: string, val: any) => { let tempObj = obj; const keyArr = path.split("."); + //liwenxuan 关联选项设置会在标签名称改变时清空 start 250410 + if(keyArr&&keyArr[0]&&keyArr[0]=='name'){ + if(tempObj.type=="select"||tempObj.type=="radio"||tempObj.type=="checkbox"||tempObj.type=="switch"){ + formNameChange() + } + } + // liwenxuan 关联选项设置会在标签名称改变时清空 end 250410 console.log("修改指定路径下的值", keyArr, tempObj); let i = 0; for (i; i < keyArr.length - 1; i++) {