Commit e8182895 authored by 田翔's avatar 田翔

fix: 关联选择优化

parent d289a0ae
{ {
"name": "panda-xform", "name": "panda-xform",
"version": "6.0.26", "version": "6.0.27",
"description": "6.0.26 关联选择一个选项自动赋值", "description": "6.0.27 关联选择优化",
"keywords": [ "keywords": [
"panda-xform" "panda-xform"
], ],
......
...@@ -291,13 +291,23 @@ export const getWatch = ({ schema, form, startTime, initField }) => { ...@@ -291,13 +291,23 @@ export const getWatch = ({ schema, form, startTime, initField }) => {
RelevanceSelect.forEach(v => { RelevanceSelect.forEach(v => {
let path = getPath(schema, v.fieldParent) let path = getPath(schema, v.fieldParent)
if (path) { if (path) {
let someType = paths.find(s => s.path === path)?.type let some = paths.find(s => s.path === path)
paths.push({ if (some && some.type) {
type: someType?.length ? [...someType, 'RelevanceSelect'] : ['RelevanceSelect'], paths.push({
dictionary: v.dictionary, dictionary: v.dictionary,
path, path,
targetPath: v.targetPath, targetPath: v.targetPath,
}) ...some,
type: [...some?.type, 'RelevanceSelect'],
})
} else {
paths.push({
type: ['RelevanceSelect'],
dictionary: v.dictionary,
path,
targetPath: v.targetPath,
})
}
} }
}) })
} }
......
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