Merge pull request #160 from x19990416/master

增加对 FormSchema slots 属性支持的优化
This commit is contained in:
Archer 2022-09-21 10:10:02 +08:00 committed by GitHub
commit 6fbf260468
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -181,6 +181,10 @@ export default defineComponent({
item?.componentProps?.options
) {
slotsMap.default = () => renderOptions(item)
} else if (item.componentProps?.slots) {
// Optionsslots
// componentProps{slots:{append: ()=>h('span',null,'appendComponent')}}
Object.entries(item.componentProps.slots).forEach((slot) => (slotsMap[slot[0]] = slot[1]))
}
const formItemSlots: Recordable = setFormItemSlots(slots, item.field)