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
package/src/common/common.js
CHANGED
|
@@ -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
|
-
|
|
53
|
-
|
|
54
|
-
this.
|
|
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(
|
|
70
|
+
resetData(pageStart = 1, pageNums){
|
|
71
71
|
if(this.ifPage) {
|
|
72
|
-
this.$refs.ElePage.
|
|
72
|
+
this.$refs.ElePage.change(pageStart, pageNums)
|
|
73
73
|
} else {
|
|
74
74
|
this.getData({})
|
|
75
75
|
}
|