给按钮绑定方法
<el-popover placement="bottom" width="100" trigger="click" @show="handleStatus(scope)" :ref="`popover-${scope.$index}`">
<el-button
slot="reference"
size="mini"
style="border: 0; font-size: 13px; padding: revert"
type="text"
>隐患上报</el-button
>
<label style="float: left">填报人:</label>
<el-select v-model="value" clearable placeholder="请选择">
<el-option
v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
<div style="text-align: right; margin: 0">
<el-button size="mini" type="text" @click="cancelClick(scope)"
>取消</el-button
>
<el-button type="text" size="mini" @click="sureClick(scope)"
>确定</el-button
>
</div>
</el-popover>
// 取消按钮
cancelClick(scope) {
this.$message("点击了取消操作");
scope._self.$refs[`popover-${scope.$index}`].doClose();
},
sureClick(scope) {
// 可以在这里执行删除数据的回调操作.......删除操作......
this.$message({
message: "点击了确定操作了",
type: "success",
});
scope._self.$refs[`popover-${scope.$index}`].doClose();
},
取消popover标签上v-model绑定