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