过滤数据慢,添加loading效果
This commit is contained in:
@@ -55,12 +55,17 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
getAllGrids() {
|
||||
uni.showLoading({title: '加载中'})
|
||||
this.$http.post('/app/appgirdinfo/listByInfo').then((res) => {
|
||||
if (res?.data) {
|
||||
let parents = res.data.map(e => e.parentGirdId)
|
||||
this.allData = res.data.map(e => ({...e, hasChildren: parents.includes(e.id)}))
|
||||
this.gridInit()
|
||||
}
|
||||
}).then(()=> {
|
||||
uni.hideLoading()
|
||||
}).finally(()=> {
|
||||
uni.hideLoading()
|
||||
})
|
||||
},
|
||||
gridInit() {
|
||||
|
||||
Reference in New Issue
Block a user