fix: list not render children

pull/2682/head
tangjinzhou 2020-07-31 23:40:06 +08:00
parent 85fcb138a2
commit 841391019b
4 changed files with 5 additions and 5 deletions

@ -1 +1 @@
Subproject commit 549184a4fab38d9a234bc04e818ecc8b958ab4f4
Subproject commit c2bb61d21910b82f60b098d1468e24e6a9900344

View File

@ -342,7 +342,7 @@ export function isEmptyElement(c) {
}
export function isStringElement(c) {
return !c.tag;
return c && c.type === Text;
}
export function filterEmpty(children = []) {

View File

@ -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
? [
<div class={`${prefixCls}-item-main`} key="content">
{$slots.default}
{children}
{actionsContent}
</div>,
<div class={`${prefixCls}-item-extra`} key="extra">

View File

@ -4,7 +4,7 @@
</div>
</template>
<script>
import demo from '../antdv-demo/docs/input-number/demo/index';
import demo from '../antdv-demo/docs/list/demo/index';
export default {
components: {