after the data is successfully requested when clicking button, you need to change the value in button. You need to change the value of value through this.$refs and cooperate with the this.$nexttick event, but it has no effect.
<el-table-column label="" width="100">
<template slot-scope="scope">
<button ref="releaseStatus" class="detach_btn" @click.prevent="issuePatrolPlan(scope.$index, scope.row)"></button>
</template>
</el-table-column>
//
issuePatrolPlan(index, row) {
this.$confirm("", {
confirmButtonText: "",
cancelButtonText: "",
type: "warning"
}).then(() => {
this.$http.put(this.$api.planPublish + row.id).then(res => {
this.initPatrolPlan();
this.$message({
type: "success",
message: "!"
});
console.log("row", row);
// buttonvalue
row.published == ""
? (this.$refs.releaseStatus.innerText = "")
: (this.$refs.releaseStatus.innerText = "");
console.log("this.$refs.releaseStatus.innerText", this.$refs.releaseStatus.innerText);
//
this.initPatrolPlan();
});
});
},
when publishing button is not clicked
button
, buttonvalue