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

fix: 关联表单必填逻辑问题

parent 3683972f
{ {
"name": "panda-xform", "name": "panda-xform",
"version": "5.9.3", "version": "5.9.4",
"description": "5.9.3 增加压缩文件配置默认为压缩", "description": "5.9.4 关联表单必填逻辑问题",
"keywords": [ "keywords": [
"panda-xform" "panda-xform"
], ],
......
...@@ -170,7 +170,9 @@ const RelationForm = (props) => { ...@@ -170,7 +170,9 @@ const RelationForm = (props) => {
let tableData = data?.jsonData ? JSON.parse(data?.jsonData) : [] let tableData = data?.jsonData ? JSON.parse(data?.jsonData) : []
if (Array.isArray(tableData)) { if (Array.isArray(tableData)) {
setDataSource(tableData) setDataSource(tableData)
onChange(`${tableData.length}`) if (tableData.length) {
onChange(`${tableData.length}`)
}
let relationForm = addons.getValue('relationForm') || { configs: [], data: [], table: [] } let relationForm = addons.getValue('relationForm') || { configs: [], data: [], table: [] }
window.tableLocal.push({ config, dataSource: tableData, schema }) window.tableLocal.push({ config, dataSource: tableData, schema })
addons.setValue('relationForm', { addons.setValue('relationForm', {
...@@ -180,7 +182,7 @@ const RelationForm = (props) => { ...@@ -180,7 +182,7 @@ const RelationForm = (props) => {
}) })
} else { } else {
setDataSource([]) setDataSource([])
onChange(`${0}`) onChange('')
} }
} else { } else {
message.error(msg) message.error(msg)
......
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