This commit is contained in:
@jyuhsin
2025-05-06 17:54:09 +08:00
parent 9100234923
commit 3a2e992774
2 changed files with 29 additions and 1 deletions
@@ -93,6 +93,25 @@ layout("/layouts/platform_1.html"){
}
},
methods: {
onTableRowDelete(id) {
if (!id) {
return
}
this.$confirm('确定删除该数据吗?', '提示', {
type: 'warning',
confirmButtonText: '确定',
cancelButtonText: '取消'
}).then(() => {
$.post(this.tableDeleteUrl, {id}).then((res) => {
if (res.code === 0) {
this.$message.success("删除成功")
this.pageData()
} else {
this.$message.error(res.msg)
}
})
}).catch(() => {})
},
publishedChange(val, row) {
const params = JSON.parse(JSON.stringify(row))
this.$set(params, 'published', val)