import { use } from '../utils'; import Cell from '../cell'; const [sfc, bem, t] = use('contact-card'); export default sfc({ functional: true, props: { tel: String, name: String, addText: String, editable: { type: Boolean, default: true }, type: { type: String, default: 'add' } }, render(h, context, inherit) { const { props, listeners } = context; const { type, editable } = props; return ( { if (editable && listeners.click) { listeners.click(event); } }} {...inherit} > {type === 'add' ? props.addText || t('addText') : [
{`${t('name')}:${props.name}`}
,
{`${t('tel')}:${props.tel}`}
]}
); } });