修复分页
parent
bee6a247bc
commit
87217334f8
|
@ -122,10 +122,13 @@ class Request extends Component {
|
||||||
let filter = this.#filter
|
let filter = this.#filter
|
||||||
let waited = this.#onlyShowWaited
|
let waited = this.#onlyShowWaited
|
||||||
|
|
||||||
this.list = this.#list
|
let list = this.#list.filter(
|
||||||
.filter(it => it.id.includes(filter) && (waited ? it.stat === 1 : true))
|
it => it.id.includes(filter) && (waited ? it.stat === 1 : true)
|
||||||
.slice(start, end)
|
)
|
||||||
this.total = (filter || waited ? this.list : this.#list).length
|
|
||||||
|
this.list = list.slice(start, end)
|
||||||
|
|
||||||
|
this.total = list.length
|
||||||
}
|
}
|
||||||
|
|
||||||
#pageChanged(ev) {
|
#pageChanged(ev) {
|
||||||
|
@ -140,10 +143,7 @@ class Request extends Component {
|
||||||
this.#filter = filter
|
this.#filter = filter
|
||||||
this.#onlyShowWaited = waited
|
this.#onlyShowWaited = waited
|
||||||
|
|
||||||
this.list = this.#list.filter(
|
this.#fetchPage()
|
||||||
it => it.id.includes(filter) && (waited ? it.stat === 1 : true)
|
|
||||||
)
|
|
||||||
this.total = this.list.length
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#openDialog() {
|
#openDialog() {
|
||||||
|
|
Loading…
Reference in New Issue