1.编辑表格
<el-table-column prop="sort" label="排序" align="center">
<template slot-scope="scope">
<span v-show="NoEdit != scope.row.relationshipId">{{scope.row.sort}}<i class="el-icon-edit ml10 cursor" @click="NoEdit=scope.row.relationshipId"></i></span>
<span v-show="NoEdit == scope.row.relationshipId">
<el-input-number size='mini' :min='1' v-model="sort"></el-input-number>
<i class="cursor ml10 colorblue" @click="savaSort(scope.row)">保存</i>
<i class="cursor ml10 colorblue" @click="NoEdit=''">取消</i>
</span>
</template>
</el-table-column>
2.删除确认提示
<template slot-scope="scope">
<el-popover
placement="top"
width="160"
:ref="scope.row.id"
>
<p>确认删除吗?</p>
<div style="text-align: right; margin: 0">
<el-button size="mini" type="text" @click="$refs[scope.row.id].doClose()">取消</el-button>
<el-button type="text" size="mini" @click="edit(scope.row)">确定</el-button>
</div>
<el-button type="text" size="small" slot="reference" >删除</el-button>
</el-popover>
<el-divider direction="vertical" ></el-divider>
<el-button type="text" size="small" >查看</el-button>
</template>
edit(row){
this.$refs[row.id].doClose()
},