在vue 中 element-ui table结合Popover使用
在vue 中 element-ui table结合Popover使用
<el-table-column label="操作" > <template slot-scope="scope"> <el-link type="primary" :underline="false" icon="el-icon-view" @click="deviceToDetail(scope.row)">详情</el-link> <el-popover placement="top" width="300" :ref="`popover-${scope.$index}`"> <p>确定删除这个{{scope.row.name}}产品吗?</p> <div style="text-align: right; margin: 0"> <el-button size="mini" @click="scope._self.$refs[`popover-${scope.$index}`].doClose()" >取消</el-button> <el-button type="primary" size="mini" @click="makeSure(scope)">确定</el-button> </div> <el-link slot="reference" :underline="false" icon="el-icon-delete" type="danger" >删除</el-link> </el-popover> </el-table-column>