kui-vue 3.2.8-rc3 → 3.2.8-rc4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -30,18 +30,25 @@ export default {
30
30
  watch: {
31
31
  pageSize(v) {
32
32
  this.defaultPageSize = v
33
+ this.resetPage()
33
34
  },
34
35
  current(v) {
35
- this.page = v
36
+ this.resetPage()
36
37
  },
37
38
  total(v) {
38
- this.pageCount = Math.ceil(this.total / this.defaultPageSize) || 1;
39
+ this.resetPage()
39
40
  }
40
41
  },
41
42
  mounted() {
42
43
  this.pageCount = Math.ceil(this.total / this.defaultPageSize) || 1;
43
44
  },
44
45
  methods: {
46
+ resetPage() {
47
+ this.pageCount = Math.ceil(this.total / this.defaultPageSize) || 1;
48
+ if (this.page > this.pageCount) {
49
+ this.page = this.pageCount
50
+ }
51
+ },
45
52
  renderPage() {
46
53
  const groupCount = 7,
47
54
  page = Number(this.page),
package/dist/k-ui.css CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * kui-vue v3.2.8rc3
2
+ * kui-vue v3.2.8rc4
3
3
  * Copyright 2017-present, kui-vue.
4
4
  * All rights reserved.
5
5
  * Author: chuchur@qq.com / www.chuchur.com