this.$confirm('此操作将永久删除该文件, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
customClass: 'demo1',
type: 'warning'
}).then(() => {
console.log('aaaaaaaa', row.row.id)
if (row.row.id !== null) {
deleteTable(row.row.id).then(response => {
console.log('aa')
if (response.code === 20000) {
this.$message({
message: '删除成功',
type: 'success'
})
this.getTableOneList()
} else {
this.$message.error('删除失败!')
}
})
} else {
console.log(row.$index + ':bucunzi')
this.tableData.splice(row.$index, 1)
}
}).catch(() => {
this.$message({
type: 'info',
message: '已取消删除'
})
})
vue中的确认框
最新推荐文章于 2024-05-17 11:40:43 发布