app.component('resume-list', {
    template: `
    <div class="resume-list">
        <div class="resume-item" v-for="item in list">
            <div class="title">
                <div class="name">{{item.name}} <span class="mobile">({{item.mobile}})</span></div>
                <div class="status">{{item.status_text}}</div>
            </div>
            <div class="content">
                <div class="remark">{{item.last_msg}}</div>
                <div class="time">{{item.last_msg_time}}</div>
            </div>
            <div class="tool" v-if="!is_select">
                <van-tag type="primary" plain size="large" @click="onFollow(item.id)">跟进</van-tag>
                <van-tag type="success" plain size="large" @click="onEdit(item.id)">编辑</van-tag>
            </div>
            <div class="tool" v-if="is_select">
                <van-tag type="primary" plain size="large" @click="onDeal(item)">选择</van-tag>
            </div>
        </div>
    </div>
    `,
    data() {
        return {}
    },
    props: {
        list: {
            type: Array,
            default: [],
        },
        is_select: {
            type: Boolean,
            default: false,
        },
    },
    methods: {
        onFollow(id) {
            this.$emit('follow',id);
        },
        onEdit(id) {
            this.$emit('edit',id);
        },
        onDeal(info) {
            this.$emit('deal',info);
        },
    },
});