11
This commit is contained in:
@@ -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>
|
||||
Reference in New Issue
Block a user