<el-table-column label="状态" align="center" key="status">
<template slot-scope="scope">
<el-switch v-model="scope.row.status" active-value="1" inactive-value="0"
@change="handleStatusChange(scope.row)"></el-switch>
</template>
</el-table-column>
// 用户状态修改
handleStatusChange(row) {
let text = row.status === "1" ? "启用" : "停用";
this.$confirm('确认要"' + text + '""' + row.phone + '"用户吗?', "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
center: true
}).then(function() {
return enableMember(row.uid, row.status);
}).then(() => {
this.msgSuccess(text + "成功");
}).catch(function() {
row.status = row.status === "1" ? "0" : "1";
});
},
原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。
原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。