From 70f18603dbf03f2ad99b7c0fd3cad66b954af2ef Mon Sep 17 00:00:00 2001 From: liwenxuan <1298531568@qq.com> Date: Thu, 10 Apr 2025 11:08:07 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=B3=E8=81=94=E9=80=89=E9=A1=B9=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE=E4=BC=9A=E5=9C=A8=E6=A0=87=E7=AD=BE=E5=90=8D=E7=A7=B0?= =?UTF-8?q?=E6=94=B9=E5=8F=98=E6=97=B6=E6=B8=85=E7=A9=BAbug=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DesignForm/formControlPropertiNew.vue | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) 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++) {