From 3b45c7e128ebdad74ef513e994c0823542b86187 Mon Sep 17 00:00:00 2001 From: tanjinzhou <415800467@qq.com> Date: Mon, 14 Oct 2019 15:49:40 +0800 Subject: [PATCH] fix: browser suspended when form-item is slot #1271 --- components/form/FormItem.jsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/components/form/FormItem.jsx b/components/form/FormItem.jsx index 064774a49..cfd049ed9 100644 --- a/components/form/FormItem.jsx +++ b/components/form/FormItem.jsx @@ -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) {