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

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

parent fac1e062
{ {
"name": "panda-xform", "name": "panda-xform",
"version": "5.3.9", "version": "5.4.0",
"description": "5.3.9 输入框输入无效问题", "description": "5.4.0 初始化分组不隐藏问题",
"keywords": [ "keywords": [
"panda-xform" "panda-xform"
], ],
......
...@@ -41,6 +41,7 @@ const XRender = (props, ref) => { ...@@ -41,6 +41,7 @@ const XRender = (props, ref) => {
let array = [] let array = []
if (isObject(parent)) { if (isObject(parent)) {
for (let v in parent) { for (let v in parent) {
let hidden = true
let child = parent[v]?.properties let child = parent[v]?.properties
let childObj = {} let childObj = {}
if (isObject(child)) { if (isObject(child)) {
...@@ -65,6 +66,10 @@ const XRender = (props, ref) => { ...@@ -65,6 +66,10 @@ const XRender = (props, ref) => {
if (disabledField) { if (disabledField) {
required = false required = false
} }
//分组中有一个显示就将分组设置显示
if (!child[s].hidden) {
hidden = false
}
if (child[s].isDoing) { if (child[s].isDoing) {
array.push(s) array.push(s)
} }
...@@ -73,12 +78,16 @@ const XRender = (props, ref) => { ...@@ -73,12 +78,16 @@ const XRender = (props, ref) => {
presetValue: disabled ? (value || '') : (value || child[s].presetValue), presetValue: disabled ? (value || '') : (value || child[s].presetValue),
textDefalut: child[s].presetValue, textDefalut: child[s].presetValue,
disabled: disabledField, disabled: disabledField,
required required,
} }
} }
} }
if (JSON.stringify(childObj) !== '{}') { 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