Skip to content

Commit

Permalink
fix(vue): keep origin SlotProps pass in ReactiveField (#3623)
Browse files Browse the repository at this point in the history
  • Loading branch information
frehaiku committed Dec 14, 2022
1 parent 82ca678 commit 200af68
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions packages/vue/src/components/ReactiveField.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,11 @@ const mergeSlots = (
}
}
}
const patchSlot = (slotName: string) => () =>
slots[slotName]?.({ field, form: field.form }) ?? []
const patchSlot =
(slotName: string) =>
(originSlotScope: Record<string, any> = {}) =>
slots[slotName]?.({ field, form: field.form, ...originSlotScope }) ?? []

const patchedSlots: Record<string, (...args: any) => unknown[]> = {}
slotNames.forEach((name) => {
patchedSlots[name] = patchSlot(name)
Expand Down

0 comments on commit 200af68

Please sign in to comment.