Skip to content

Commit 598f41f

Browse files
zkwolftangjinzhou
authored andcommitted
fix: get slot bug (#1256)
1 parent 6b3de60 commit 598f41f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

components/_util/props-util.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,10 @@ const getComponentFromProp = (instance, prop, options = instance, execute = true
129129
if (temp !== undefined) {
130130
return typeof temp === 'function' && execute ? temp(h, options) : temp;
131131
}
132+
const slotScope = getScopedSlots(instance)[prop];
133+
if (slotScope !== undefined) {
134+
return typeof slotScope === 'function' && execute ? slotScope(h, options) : slotScope;
135+
}
132136
const slotsProp = [];
133137
const componentOptions = instance.componentOptions || {};
134138
(componentOptions.children || []).forEach(child => {

0 commit comments

Comments
 (0)