File tree Expand file tree Collapse file tree 1 file changed +18
-1
lines changed Expand file tree Collapse file tree 1 file changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ export default {
1515 } ,
1616 props : Object . assign ( { } , T . props , {
1717 rowKey : {
18- type : String ,
18+ type : [ String , Function ] ,
1919 default : 'id'
2020 } ,
2121 data : {
@@ -83,6 +83,23 @@ export default {
8383 this . loadData ( ) ;
8484 } ,
8585 loadData ( pagination , filters , sorter ) {
86+
87+ /* region
88+ * 由于 Pagination 修改分页下拉选项触发了 showSizeChange 和 change 事件 ,
89+ * 而 a-table 中将 showSizeChange 转为 change 事件 , 导致 change 事件重复触发了 2 次 ,
90+ * 此处临时处理 , 待作者修复后移除 */
91+ let _paramStr = JSON . stringify ( {
92+ pagination,
93+ filters,
94+ sorter
95+ } )
96+ if ( this . _lastChangeParamStr === _paramStr && ( Date . now ( ) - this . _lastChangeTimestamp ) < 10 ) {
97+ return
98+ }
99+ this . _lastChangeParamStr = _paramStr ;
100+ this . _lastChangeTimestamp = Date . now ( ) ;
101+ /* regionend */
102+
86103 this . localLoading = true
87104 var result = this . data (
88105 Object . assign ( {
You can’t perform that action at this time.
0 commit comments