fix: get slot bug (#1256)

pull/1255/head
zkwolf 2019-10-09 04:07:35 -07:00 committed by tangjinzhou
parent 6b3de60163
commit 598f41f098
1 changed files with 4 additions and 0 deletions

View File

@ -129,6 +129,10 @@ const getComponentFromProp = (instance, prop, options = instance, execute = true
if (temp !== undefined) {
return typeof temp === 'function' && execute ? temp(h, options) : temp;
}
const slotScope = getScopedSlots(instance)[prop];
if (slotScope !== undefined) {
return typeof slotScope === 'function' && execute ? slotScope(h, options) : slotScope;
}
const slotsProp = [];
const componentOptions = instance.componentOptions || {};
(componentOptions.children || []).forEach(child => {