mirror of
https://gitee.com/ssssssss-team/magic-boot.git
synced 2025-01-31 17:12:49 +08:00
修复mb-table静态数据分页bug
This commit is contained in:
parent
3facdc9eba
commit
2aca3f0e78
@ -212,11 +212,15 @@ function handlerData() {
|
|||||||
listLoading.value = true
|
listLoading.value = true
|
||||||
total.value = props.data.length
|
total.value = props.data.length
|
||||||
var currPageData = []
|
var currPageData = []
|
||||||
props.data.forEach((it, i) => {
|
if(props.page){
|
||||||
if (i >= ((listCurrent.value - 1) * props.limit) && i < (listCurrent.value * props.limit) && currPageData.length < props.limit) {
|
props.data.forEach((it, i) => {
|
||||||
currPageData.push(it)
|
if (i >= ((listCurrent.value - 1) * props.limit) && i < (listCurrent.value * props.limit) && currPageData.length < props.limit) {
|
||||||
}
|
currPageData.push(it)
|
||||||
})
|
}
|
||||||
|
})
|
||||||
|
}else{
|
||||||
|
currPageData = props.data
|
||||||
|
}
|
||||||
list.value = currPageData
|
list.value = currPageData
|
||||||
props.done()
|
props.done()
|
||||||
listLoading.value = false
|
listLoading.value = false
|
||||||
|
Loading…
Reference in New Issue
Block a user