import { use, noop } from '../utils'; import { emit, inherit } from '../utils/functional'; import Icon from '../icon'; import Cell from '../cell'; import Button from '../button'; import Radio from '../radio'; import RadioGroup from '../radio-group'; const [sfc, bem, t] = use('contact-list'); function ContactList(h, props, slots, ctx) { const List = props.list.map((item, index) => ( (
{`${item.name},${item.tel}`}
), 'right-icon': () => ( { event.stopPropagation(); emit(ctx, 'edit', item, index); }} /> ) }} onClick={() => { emit(ctx, 'input', item.id); emit(ctx, 'select', item, index); }} /> )); return (
{List}
); } ContactList.props = { value: null, list: Array, addText: String }; export default sfc(ContactList);