Commit 4fe6190b authored by 田翔's avatar 田翔

fix: 关联表单隐藏分组也隐藏

parent f44d0929
{
"name": "panda-xform",
"version": "5.3.2",
"description": "5.3.2 其他附件形式会显示缩略图bug修复",
"version": "5.3.3",
"description": "5.3.3 关联表单隐藏分组也隐藏",
"keywords": [
"panda-xform"
],
......
......@@ -426,6 +426,28 @@ const RelationForm = (props) => {
getDataSourceOther({ pageIndex, pageSize })
}
useEffect(() => {
try {
let dataPath = addons?.dataPath?.split('.')[0]
let group = addons?.formData?.[dataPath]
let paths = Object.keys(group)
let hidden = true
paths.forEach(v => {
let info = addons?.getSchemaByPath(`${dataPath}.${v}`)
if (!info.hidden && addons?.dataPath !== `${dataPath}.${v}`) {
hidden = false
}
})
if (show) {
hidden = false
}
addons?.setSchemaByPath(dataPath, { hidden: hidden })
} catch {
}
}, [show])
useEffect(() => {
//初始化关联表单配置信息,初始显示隐藏
if (addons) {
......
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