File tree 1 file changed +18
-1
lines changed
1 file changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ export default {
15
15
} ,
16
16
props : Object . assign ( { } , T . props , {
17
17
rowKey : {
18
- type : String ,
18
+ type : [ String , Function ] ,
19
19
default : 'id'
20
20
} ,
21
21
data : {
@@ -83,6 +83,23 @@ export default {
83
83
this . loadData ( ) ;
84
84
} ,
85
85
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
+
86
103
this . localLoading = true
87
104
var result = this . data (
88
105
Object . assign ( {
You can’t perform that action at this time.
0 commit comments