elementUI 让table某一列不显示或显示指定内容
利用scope获取所在行索引,拿到数据后进行判断赋值或制定是否显示
<el-table-column label="级别" width="180">
<template slot-scope="scope">
<span v-if="tableData[scope.$index].Id%10000==0">省</span>
<span v-else-if="tableData[scope.$index].Id%100==0">市</span>
<span v-else>区</span>
</template>
</el-table-column>
Popconfirm 气泡确认框 确认按钮监听事件@onConfirm
<el-popconfirm title="确定删除吗?" @onConfirm="sure(scope.row)">
<el-button
slot="reference"
size="mini"
type="danger"
@click="handleDelete(scope.$index, scope.row)"
>删除</el-button>
</el-popconfirm>