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

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>

View File

@@ -0,0 +1,81 @@
{
"id": "loading-state",
"displayName": "loading-state",
"version": "1.0.0",
"description": "loading-state",
"keywords": [
"loading-state"
],
"repository": "",
"engines": {
"HBuilderX": "^3.1.0"
},
"dcloudext": {
"type": "component-vue",
"sale": {
"regular": {
"price": "0.00"
},
"sourcecode": {
"price": "0.00"
}
},
"contact": {
"qq": ""
},
"declaration": {
"ads": "",
"data": "",
"permissions": ""
},
"npmurl": ""
},
"uni_modules": {
"dependencies": [],
"encrypt": [],
"platforms": {
"cloud": {
"tcb": "u",
"aliyun": "u"
},
"client": {
"Vue": {
"vue2": "u",
"vue3": "u"
},
"App": {
"app-vue": "u",
"app-nvue": "u"
},
"H5-mobile": {
"Safari": "u",
"Android Browser": "u",
"微信浏览器(Android)": "u",
"QQ浏览器(Android)": "u"
},
"H5-pc": {
"Chrome": "u",
"IE": "u",
"Edge": "u",
"Firefox": "u",
"Safari": "u"
},
"小程序": {
"微信": "u",
"阿里": "u",
"百度": "u",
"字节跳动": "u",
"QQ": "u",
"钉钉": "u",
"快手": "u",
"飞书": "u",
"京东": "u"
},
"快应用": {
"华为": "u",
"联盟": "u"
}
}
}
}
}

View File

@@ -0,0 +1 @@
# loading-state