@@ -32,7 +32,6 @@ export default {
3232 total : PropTypes . number . def ( 0 ) ,
3333 pageSize : PropTypes . number ,
3434 defaultPageSize : PropTypes . number . def ( 10 ) ,
35- change : PropTypes . func . def ( noop ) ,
3635 hideOnSinglePage : PropTypes . bool . def ( false ) ,
3736 showSizeChanger : PropTypes . bool . def ( false ) ,
3837 showLessItems : PropTypes . bool . def ( false ) ,
@@ -50,7 +49,7 @@ export default {
5049 } ,
5150 model : {
5251 prop : 'current' ,
53- event : 'change' ,
52+ event : 'change.current ' ,
5453 } ,
5554 data ( ) {
5655 const hasOnChange = this . onChange !== noop
@@ -174,6 +173,7 @@ export default {
174173 } ,
175174 changePageSize ( size ) {
176175 let current = this . stateCurrent
176+ const preCurrent = current
177177 const newCurrent = this . calculatePage ( size )
178178 current = current > newCurrent ? newCurrent : current
179179 // fix the issue:
@@ -196,7 +196,9 @@ export default {
196196 }
197197 this . $emit ( 'update:pageSize' , size )
198198 this . $emit ( 'showSizeChange' , current , size )
199- this . $emit ( 'change' , current , size )
199+ if ( current !== preCurrent ) {
200+ this . $emit ( 'change.current' , current , size )
201+ }
200202 } ,
201203 handleChange ( p ) {
202204 let page = p
@@ -213,6 +215,7 @@ export default {
213215 }
214216 // this.$emit('input', page)
215217 this . $emit ( 'change' , page , this . statePageSize )
218+ this . $emit ( 'change.current' , page , this . statePageSize )
216219 return page
217220 }
218221 return this . stateCurrent
0 commit comments