@@ -32,7 +32,6 @@ export default {
32
32
total : PropTypes . number . def ( 0 ) ,
33
33
pageSize : PropTypes . number ,
34
34
defaultPageSize : PropTypes . number . def ( 10 ) ,
35
- change : PropTypes . func . def ( noop ) ,
36
35
hideOnSinglePage : PropTypes . bool . def ( false ) ,
37
36
showSizeChanger : PropTypes . bool . def ( false ) ,
38
37
showLessItems : PropTypes . bool . def ( false ) ,
@@ -50,7 +49,7 @@ export default {
50
49
} ,
51
50
model : {
52
51
prop : 'current' ,
53
- event : 'change' ,
52
+ event : 'change.current ' ,
54
53
} ,
55
54
data ( ) {
56
55
const hasOnChange = this . onChange !== noop
@@ -174,6 +173,7 @@ export default {
174
173
} ,
175
174
changePageSize ( size ) {
176
175
let current = this . stateCurrent
176
+ const preCurrent = current
177
177
const newCurrent = this . calculatePage ( size )
178
178
current = current > newCurrent ? newCurrent : current
179
179
// fix the issue:
@@ -196,7 +196,9 @@ export default {
196
196
}
197
197
this . $emit ( 'update:pageSize' , size )
198
198
this . $emit ( 'showSizeChange' , current , size )
199
- this . $emit ( 'change' , current , size )
199
+ if ( current !== preCurrent ) {
200
+ this . $emit ( 'change.current' , current , size )
201
+ }
200
202
} ,
201
203
handleChange ( p ) {
202
204
let page = p
@@ -213,6 +215,7 @@ export default {
213
215
}
214
216
// this.$emit('input', page)
215
217
this . $emit ( 'change' , page , this . statePageSize )
218
+ this . $emit ( 'change.current' , page , this . statePageSize )
216
219
return page
217
220
}
218
221
return this . stateCurrent
0 commit comments