This commit is contained in:
wangjiahai
2023-11-22 16:04:05 +08:00
parent 50683ee7bd
commit 270d09af35
7 changed files with 250 additions and 33 deletions

View File

@@ -0,0 +1,47 @@
<template>
<view>
<view v-if="state === 0">
<uni-load-more status="loading"></uni-load-more>
</view>
<!-- 错误 -->
<z-paging-empty-view v-if="state === 1" emptyViewText="很抱歉,加载失败" :showEmptyViewReload="true"
:emptyViewImg="errorImg" @reload="reload">
</z-paging-empty-view>
<view v-if="state != 0 && state != 1">
<slot></slot>
</view>
</view>
</template>
<script>
import zStatic from '../../../z-paging/components/z-paging/js/z-paging-static.js'
export default {
data() {
return {
state: 0
};
},
computed: {
errorImg() {
return zStatic.base64Error
}
},
methods: {
setLoadState(state) {
this.state = state
},
getLoadState() {
return this.state
},
reload() {
this.request()
},
request() {
this.$emit('request');
}
}
}
</script>
<style>
</style>