Commit 8ad5aeac authored by 田翔's avatar 田翔

fix: 初始化分组不隐藏问题

parent fac1e062
{
"name": "panda-xform",
"version": "5.3.9",
"description": "5.3.9 输入框输入无效问题",
"version": "5.4.0",
"description": "5.4.0 初始化分组不隐藏问题",
"keywords": [
"panda-xform"
],
......
......@@ -41,6 +41,7 @@ const XRender = (props, ref) => {
let array = []
if (isObject(parent)) {
for (let v in parent) {
let hidden = true
let child = parent[v]?.properties
let childObj = {}
if (isObject(child)) {
......@@ -65,6 +66,10 @@ const XRender = (props, ref) => {
if (disabledField) {
required = false
}
//分组中有一个显示就将分组设置显示
if (!child[s].hidden) {
hidden = false
}
if (child[s].isDoing) {
array.push(s)
}
......@@ -73,12 +78,16 @@ const XRender = (props, ref) => {
presetValue: disabled ? (value || '') : (value || child[s].presetValue),
textDefalut: child[s].presetValue,
disabled: disabledField,
required
required,
}
}
}
if (JSON.stringify(childObj) !== '{}') {
parentObj[v] = { ...parent[v], properties: childObj }
parentObj[v] = {
...parent[v],
properties: childObj,
hidden,
}
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment