import PropTypes from '../_util/vue-types' import { getComponentFromProp } from '../_util/props-util' export default { name: 'Meta', props: { prefixCls: PropTypes.string.def('ant-card'), title: PropTypes.string, description: PropTypes.string, }, render () { const { prefixCls = 'ant-card', title, description, ...others } = this.$props const classString = { [`${prefixCls}-meta`]: true, } const avatar = getComponentFromProp(this, 'avatar') const avatarDom = avatar ?
{avatar}
: null const titleDom = title ?
{title}
: null const descriptionDom = description ?
{description}
: null const MetaDetail = titleDom || descriptionDom ?
{titleDom} {descriptionDom}
: null return (
{avatarDom} {MetaDetail}
) }, }