列表优化

This commit is contained in:
仲么了
2023-11-06 11:01:29 +08:00
parent bb95331392
commit 7e90d2b6e1
12 changed files with 296 additions and 123 deletions

View File

@@ -41,7 +41,10 @@
</view>
</uni-card> -->
<Cn-empty v-if="store.empty" style="padding-top: 400rpx"></Cn-empty>
<uni-load-more v-if="store.data && store.data.length > 0" :status="store.status"></uni-load-more>
<uni-load-more
v-if="store.status == 'loading' || (store.data && store.data.length > 0)"
:status="store.status"
></uni-load-more>
</view>
</Cn-page>
</template>
@@ -79,11 +82,9 @@ export default {
this.staticIcon = '/static/device_bad2.png'
break
}
},
onShow() {
this.loading = true
this.init()
},
onShow() {},
onNavigationBarButtonTap(e) {
uni.showModal({
title: '提示',
@@ -109,6 +110,9 @@ export default {
this.store.params.type = this.type
this.store.loadedCallback = () => {
this.store.data.forEach((item) => {
if (this.type === '3') {
item.showName = '告警,告警码:' + item.code
}
if (this.type !== '0') {
item.subTitle = `${item.startTime}发生${item.showName}`
} else {
@@ -126,6 +130,7 @@ export default {
.join('')
}
})
console.log(this.store.data)
this.loading = false
}
this.store.reload()