lshcom 1.0.8 → 1.0.9

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lshcom",
3
- "version": "1.0.8",
3
+ "version": "1.0.9",
4
4
  "files": [
5
5
  "src/assets/*",
6
6
  "src/common/common.js",
@@ -530,6 +530,7 @@ Date.prototype.Format = function (fmt = 'yyyy-MM-dd hh:mm:ss') {
530
530
  var o = {
531
531
  "M+": this.getMonth() + 1,
532
532
  "d+": this.getDate(),
533
+ "H+": this.getHours(),
533
534
  "h+": this.getHours(),
534
535
  "m+": this.getMinutes(),
535
536
  "s+": this.getSeconds(),
@@ -43,22 +43,19 @@
43
43
  this.currentPage = val
44
44
  this.change()
45
45
  },
46
- change(){
46
+ change(pageStart, pageNums){
47
+ if(pageStart || pageNums){
48
+ this.reset(pageStart, pageNums)
49
+ }
47
50
  this.$emit('change', {
48
51
  pageStart: this.currentPage,
49
52
  pageNums: this.pageSize
50
53
  })
51
54
  },
52
- reset(){
53
- this.currentPage = this.pageStart
54
- this.pageSize = this.pageNums
55
- },
56
- resetCurrent(currentPage){
57
- if (this.currentPage != currentPage) {
58
- this.currentPage = currentPage
59
- } else {
60
- this.change()
61
- }
55
+ // 重置页数和个数,但不触发change
56
+ reset(pageStart, pageNums){
57
+ this.currentPage = pageStart ? pageStart : this.pageStart
58
+ this.pageSize = pageNums ? pageNums : this.pageNums
62
59
  },
63
60
  }
64
61
  };
@@ -67,9 +67,9 @@
67
67
  });
68
68
  },
69
69
  // 从默认第一页开始获取数据
70
- resetData(currentPage = 1){
70
+ resetData(pageStart = 1, pageNums){
71
71
  if(this.ifPage) {
72
- this.$refs.ElePage.resetCurrent(currentPage)
72
+ this.$refs.ElePage.change(pageStart, pageNums)
73
73
  } else {
74
74
  this.getData({})
75
75
  }