From 841391019be9a2ca99258b89a2bf2a8b5527e5c2 Mon Sep 17 00:00:00 2001 From: tangjinzhou <415800467@qq.com> Date: Fri, 31 Jul 2020 23:40:06 +0800 Subject: [PATCH] fix: list not render children --- antdv-demo | 2 +- components/_util/props-util.js | 2 +- components/list/Item.jsx | 4 ++-- examples/App.vue | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/antdv-demo b/antdv-demo index 549184a4f..c2bb61d21 160000 --- a/antdv-demo +++ b/antdv-demo @@ -1 +1 @@ -Subproject commit 549184a4fab38d9a234bc04e818ecc8b958ab4f4 +Subproject commit c2bb61d21910b82f60b098d1468e24e6a9900344 diff --git a/components/_util/props-util.js b/components/_util/props-util.js index 91b89ee24..5b719bc79 100644 --- a/components/_util/props-util.js +++ b/components/_util/props-util.js @@ -342,7 +342,7 @@ export function isEmptyElement(c) { } export function isStringElement(c) { - return !c.tag; + return c && c.type === Text; } export function filterEmpty(children = []) { diff --git a/components/list/Item.jsx b/components/list/Item.jsx index 0c0d5a831..7b5835381 100644 --- a/components/list/Item.jsx +++ b/components/list/Item.jsx @@ -88,7 +88,7 @@ export default { }, render() { const { grid, itemLayout } = this.listContext; - const { prefixCls: customizePrefixCls, $slots, $attrs } = this; + const { prefixCls: customizePrefixCls, $attrs } = this; const { class: _className, ...restAttrs } = $attrs; const getPrefixCls = this.configProvider.getPrefixCls; const prefixCls = getPrefixCls('list', customizePrefixCls); @@ -117,7 +117,7 @@ export default { {itemLayout === 'vertical' && extra ? [