Browse Source

关联选项设置会在标签名称改变时清空bug修改

lwx_v21
liwenxuan 8 months ago
parent
commit
70f18603db
  1. 18
      src/components/DesignForm/formControlPropertiNew.vue

18
src/components/DesignForm/formControlPropertiNew.vue

@ -1288,11 +1288,16 @@ const controlChange = (obj: any, val: any) => {
obj.path && getPropByPath(controlData.value, obj.path, newVal); 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) => { const getPropByPath = (obj: any, path: string, val: any) => {
let tempObj = obj; let tempObj = obj;
const keyArr = path.split("."); 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); console.log("修改指定路径下的值", keyArr, tempObj);
let i = 0; let i = 0;
for (i; i < keyArr.length - 1; i++) { for (i; i < keyArr.length - 1; i++) {

Loading…
Cancel
Save