elementui的el-table的插槽功能,添加判断值,在单元格添加输入框,点击事件等等
<el-table ref="multipleTable" :data="data" tooltip-effect="dark" border style="width: 100%" @selection-
<el-table-column prop="is_ban" label="是否" show-overflow-tooltip>
<template slot-scope="scope">
<span v-if="scope.row.is_ban">是</span>
<span v-if="!scope.row.is_ban">否</span>
</template>
</el-table-column>
<el-table-column prop="address" label="图片" show-overflow-tooltip>
<template slot-scope="scope">
<span class="seeCode" @click="getCodeImg(scope.row.account_id)" style="font-size:14px;color:rgb(22, 155, 213);cursor: pointer;">点击查看图片</span>
</template>
</el-table-column>
<el-table-column prop="group_name" label="输入框" show-overflow-tooltip>
<template slot-scope="scope">
<el-input v-model="scope.row.group_name" @blur="addName" @input='getName' placeholder="请输入内容" class="group"></el-input>
</template>
</el-table-column>
<el-table-column label="状态" show-overflow-tooltip>
<template slot-scope="scope">
<span v-if="scope.row.status == 0">1</span>
<span v-else-if="scope.row.status == 1">2</span>
<span v-else-if="scope.row.status == 2">3</span>
<span v-else-if="scope.row.status == 3">4</span>
</template>
</el-table-column>
<el-table>