|
|
@@ -466,6 +466,8 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
|
+ // 解决脚本串行问题
|
|
|
+ JTemplate.cleanEvents()
|
|
|
const params = this.$route.params
|
|
|
// 防抖防止脚本有调用加载数据方法被默认请求覆盖
|
|
|
this.loadData = this.debounce(this.loadData1, 300)
|
|
|
@@ -926,13 +928,14 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
getSelection(position, data) {
|
|
|
- const selection = []
|
|
|
+ let selection = []
|
|
|
if (position === 'toolbar') {
|
|
|
this.checkedIds.forEach(d => {
|
|
|
selection.push(d[this.idKey])
|
|
|
})
|
|
|
} else {
|
|
|
- selection.push(data[this.idKey])
|
|
|
+ // 单个按钮时取的单个
|
|
|
+ selection = data[this.idKey]
|
|
|
}
|
|
|
return selection
|
|
|
},
|
|
|
@@ -1044,7 +1047,8 @@ export default {
|
|
|
})
|
|
|
|
|
|
// TODO:目前版本支持按钮
|
|
|
- const allowButtons = ['edit', 'detail', 'remove']
|
|
|
+ // 增加自定义按钮实现
|
|
|
+ const allowButtons = ['edit', 'detail', 'remove', 'custom']
|
|
|
|
|
|
this.defaultToolbars = toolbars
|
|
|
this.toolbars = toolbars.filter(b => {
|