修复分支判定;

优化代码生成器,统一删除提示
This commit is contained in:
yubaolee
2021-03-09 09:36:23 +08:00
parent d899553c8c
commit 96362550c7
3 changed files with 35 additions and 31 deletions

View File

@@ -57,9 +57,11 @@
import permissionBtn from '@/components/PermissionBtn'
import Pagination from '@/components/Pagination'
import elDragDialog from '@/directive/el-dragDialog'
import extend from "@/extensions/delRows.js"
export default {
name: '{TableName}',
components: { Sticky, permissionBtn, Pagination },
mixins: [extend],
directives: {
waves,
elDragDialog
@@ -242,18 +244,7 @@
})
},
handleDelete(rows) { // 多行删除
{TableName}s.del(rows.map(u => u.id)).then(() => {
this.$notify({
title: '成功',
message: '删除成功',
type: 'success',
duration: 2000
})
rows.forEach(row => {
const index = this.list.indexOf(row)
this.list.splice(index, 1)
})
})
this.delrows({TableName}s, rows)
}
}
}