Commit a8b15019 authored by hewenhao's avatar hewenhao

feat: pkmath 1.1

parent e0aaaa1c
...@@ -14,6 +14,11 @@ Component({ ...@@ -14,6 +14,11 @@ Component({
value: [], value: [],
}, },
}, },
observers: {
'list' (val) {
this.reset()
}
},
data: { data: {
styles, styles,
assets, assets,
...@@ -28,6 +33,14 @@ Component({ ...@@ -28,6 +33,14 @@ Component({
this.loadMore() this.loadMore()
}, },
methods: { methods: {
reset () {
this.setData({ realList: [] }, () => {
this._hasNextPage = true
this._loading = false
this._currentPage = 0
this.loadMore()
})
},
async loadMore () { async loadMore () {
if (this._loading || !this._hasNextPage) return if (this._loading || !this._hasNextPage) return
this._loading = true this._loading = true
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment