提交 00a3eea3 编写于 作者: hudan's avatar hudan

修复表格视图刷新和工具栏按钮启用逻辑问题

上级 c28dca65
...@@ -812,6 +812,11 @@ ${gridColumn.getName()} ...@@ -812,6 +812,11 @@ ${gridColumn.getName()}
const sort: string = this.minorSortPSDEF+","+this.minorSortDir; const sort: string = this.minorSortPSDEF+","+this.minorSortDir;
Object.assign(page, { sort: sort }); Object.assign(page, { sort: sort });
} }
//清空selections
if(this.selections && this.selections.length > 0) {
this.selections = [];
this.$emit('selectionchange', this.selections);
}
Object.assign(arg, page); Object.assign(arg, page);
const parentdata: any = {}; const parentdata: any = {};
this.$emit('beforeload', parentdata); this.$emit('beforeload', parentdata);
...@@ -831,7 +836,7 @@ ${gridColumn.getName()} ...@@ -831,7 +836,7 @@ ${gridColumn.getName()}
this.totalrow = response.total; this.totalrow = response.total;
this.items = JSON.parse(JSON.stringify(data)); this.items = JSON.parse(JSON.stringify(data));
// 清空selections,gridItemsModel // 清空selections,gridItemsModel
//this.selections = []; // this.selections = [];
this.gridItemsModel = []; this.gridItemsModel = [];
this.items.forEach(()=>{this.gridItemsModel.push(this.getGridRowModel())}); this.items.forEach(()=>{this.gridItemsModel.push(this.getGridRowModel())});
this.items.forEach((item:any)=>{ this.items.forEach((item:any)=>{
...@@ -1364,10 +1369,6 @@ ${gridColumn.getName()} ...@@ -1364,10 +1369,6 @@ ${gridColumn.getName()}
return; return;
} }
if(Object.is(action,'appRefresh')){ if(Object.is(action,'appRefresh')){
if(this.selections && this.selections.length > 0) {
this.selections = [];
this.$emit('selectionchange', this.selections);
}
this.refresh([data]); this.refresh([data]);
} }
}) })
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册