fix: Descriptions Item support v-for #2793

This commit is contained in:
tanjinzhou 2020-09-07 13:26:22 +08:00
parent 8024469b88
commit b616823353

View File

@ -9,6 +9,7 @@ import {
getOptionProps, getOptionProps,
getComponent, getComponent,
isValidElement, isValidElement,
getSlot,
} from '../_util/props-util'; } from '../_util/props-util';
import BaseMixin from '../_util/BaseMixin'; import BaseMixin from '../_util/BaseMixin';
@ -213,7 +214,7 @@ const Descriptions = {
const prefixCls = getPrefixCls('descriptions', customizePrefixCls); const prefixCls = getPrefixCls('descriptions', customizePrefixCls);
const column = this.getColumn(); const column = this.getColumn();
const children = this.$slots.default && this.$slots.default(); const children = getSlot(this);
const cloneChildren = toArray(children) const cloneChildren = toArray(children)
.map(child => { .map(child => {
if (isValidElement(child)) { if (isValidElement(child)) {