Commit e8182895 authored by 田翔's avatar 田翔

fix: 关联选择优化

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