We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent caa0a64 commit 73fce5fCopy full SHA for 73fce5f
components/vc-pagination/Pagination.jsx
@@ -120,6 +120,24 @@ export default {
120
}
121
});
122
},
123
+ total() {
124
+ const newState = {};
125
+ const newCurrent = calculatePage(this.pageSize, this.$data, this.$props);
126
+ if (hasProp(this, 'current')) {
127
+ const current = Math.min(this.current, newCurrent);
128
+ newState.stateCurrent = current;
129
+ newState.stateCurrentInputValue = current;
130
+ } else {
131
+ let current = this.stateCurrent;
132
+ if (current === 0 && newCurrent > 0) {
133
+ current = 1;
134
135
+ current = Math.min(this.stateCurrent, newCurrent);
136
+ }
137
138
139
+ this.setState(newState);
140
+ },
141
142
methods: {
143
getJumpPrevPage() {
0 commit comments