fix: browser suspended when form-item is slot #1271

pull/1281/head
tanjinzhou 2019-10-14 15:49:40 +08:00
parent af33c68f0c
commit 3b45c7e128
1 changed files with 3 additions and 1 deletions

View File

@ -47,7 +47,9 @@ function comeFromSlot(vnodes = [], itemVnode) {
if (vnode && (vnode === itemVnode || vnode.$vnode === itemVnode)) {
isSlot = true;
} else {
const children = vnode.componentOptions ? vnode.componentOptions.children : vnode.children;
const componentOptions =
vnode.componentOptions || (vnode.$vnode && vnode.$vnode.componentOptions);
const children = componentOptions ? componentOptions.children : vnode.$children;
isSlot = comeFromSlot(children, itemVnode);
}
if (isSlot) {