This commit is contained in:
2026-01-05 12:47:14 +08:00
commit 1fc846fae3
1614 changed files with 162035 additions and 0 deletions

View File

@@ -0,0 +1,132 @@
"use strict";
const uni_modules_zPaging_components_zPaging_js_zPagingStatic = require("../z-paging/js/z-paging-static.js");
const common_vendor = require("../../../../common/vendor.js");
const _sfc_main = {
name: "z-paging-empty-view",
data() {
return {};
},
props: {
// 空数据描述文字
emptyViewText: {
type: String,
default: "没有数据哦~"
},
// 空数据图片
emptyViewImg: {
type: String,
default: ""
},
// 是否显示空数据图重新加载按钮
showEmptyViewReload: {
type: Boolean,
default: false
},
// 空数据点击重新加载文字
emptyViewReloadText: {
type: String,
default: "重新加载"
},
// 是否是加载失败
isLoadFailed: {
type: Boolean,
default: false
},
// 空数据图样式
emptyViewStyle: {
type: Object,
default: function() {
return {};
}
},
// 空数据图img样式
emptyViewImgStyle: {
type: Object,
default: function() {
return {};
}
},
// 空数据图描述文字样式
emptyViewTitleStyle: {
type: Object,
default: function() {
return {};
}
},
// 空数据图重新加载按钮样式
emptyViewReloadStyle: {
type: Object,
default: function() {
return {};
}
},
// 空数据图z-index
emptyViewZIndex: {
type: Number,
default: 9
},
// 空数据图片是否使用fixed布局并铺满z-paging
emptyViewFixed: {
type: Boolean,
default: true
},
// 空数据图中布局的单位默认为rpx
unit: {
type: String,
default: "rpx"
}
},
computed: {
emptyImg() {
return this.isLoadFailed ? uni_modules_zPaging_components_zPaging_js_zPagingStatic.zStatic.base64Error : uni_modules_zPaging_components_zPaging_js_zPagingStatic.zStatic.base64Empty;
},
finalEmptyViewStyle() {
this.emptyViewStyle["z-index"] = this.emptyViewZIndex;
return this.emptyViewStyle;
}
},
methods: {
// 点击了reload按钮
reloadClick() {
this.$emit("reload");
},
// 点击了空数据view
emptyViewClick() {
this.$emit("viewClick");
}
}
};
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return common_vendor.e({
a: !$props.emptyViewImg.length
}, !$props.emptyViewImg.length ? {
b: $props.unit === "rpx" ? 1 : "",
c: $props.unit === "px" ? 1 : "",
d: common_vendor.s($props.emptyViewImgStyle),
e: $options.emptyImg
} : {
f: $props.unit === "rpx" ? 1 : "",
g: $props.unit === "px" ? 1 : "",
h: common_vendor.s($props.emptyViewImgStyle),
i: $props.emptyViewImg
}, {
j: common_vendor.t($props.emptyViewText),
k: $props.unit === "rpx" ? 1 : "",
l: $props.unit === "px" ? 1 : "",
m: common_vendor.s($props.emptyViewTitleStyle),
n: $props.showEmptyViewReload
}, $props.showEmptyViewReload ? {
o: common_vendor.t($props.emptyViewReloadText),
p: $props.unit === "rpx" ? 1 : "",
q: $props.unit === "px" ? 1 : "",
r: common_vendor.s($props.emptyViewReloadStyle),
s: common_vendor.o((...args) => $options.reloadClick && $options.reloadClick(...args))
} : {}, {
t: $props.emptyViewFixed ? 1 : "",
v: common_vendor.s($options.finalEmptyViewStyle),
w: common_vendor.o((...args) => $options.emptyViewClick && $options.emptyViewClick(...args))
});
}
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-b7999e14"]]);
wx.createComponent(Component);
//# sourceMappingURL=../../../../../.sourcemap/mp-weixin/uni_modules/z-paging/components/z-paging-empty-view/z-paging-empty-view.js.map

View File

@@ -0,0 +1,4 @@
{
"component": true,
"usingComponents": {}
}

View File

@@ -0,0 +1 @@
<view class="{{['data-v-b7999e14', 'zp-container', t && 'zp-container-fixed']}}" style="{{v}}" bindtap="{{w}}"><view class="zp-main data-v-b7999e14"><image wx:if="{{a}}" class="{{['data-v-b7999e14', b && 'zp-main-image-rpx', c && 'zp-main-image-px']}}" style="{{d}}" src="{{e}}"/><image wx:else class="{{['data-v-b7999e14', f && 'zp-main-image-rpx', g && 'zp-main-image-px']}}" mode="aspectFit" style="{{h}}" src="{{i}}"/><text class="{{['zp-main-title', 'data-v-b7999e14', k && 'zp-main-title-rpx', l && 'zp-main-title-px']}}" style="{{m}}">{{j}}</text><text wx:if="{{n}}" class="{{['data-v-b7999e14', 'zp-main-error-btn', p && 'zp-main-error-btn-rpx', q && 'zp-main-error-btn-px']}}" style="{{r}}" catchtap="{{s}}">{{o}}</text></view></view>

View File

@@ -0,0 +1,62 @@
.zp-container.data-v-b7999e14{
display: flex;
align-items: center;
justify-content: center;
}
.zp-container-fixed.data-v-b7999e14 {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
.zp-main.data-v-b7999e14{
display: flex;
flex-direction: column;
align-items: center;
padding: 50rpx 0rpx;
}
.zp-main-image-rpx.data-v-b7999e14 {
width: 240rpx;
height: 240rpx;
}
.zp-main-image-px.data-v-b7999e14 {
width: 120px;
height: 120px;
}
.zp-main-title.data-v-b7999e14 {
color: #aaaaaa;
text-align: center;
}
.zp-main-title-rpx.data-v-b7999e14 {
font-size: 28rpx;
margin-top: 10rpx;
padding: 0rpx 20rpx;
}
.zp-main-title-px.data-v-b7999e14 {
font-size: 14px;
margin-top: 5px;
padding: 0px 10px;
}
.zp-main-error-btn.data-v-b7999e14 {
border: solid 1px #dddddd;
color: #aaaaaa;
}
.zp-main-error-btn-rpx.data-v-b7999e14 {
font-size: 28rpx;
padding: 8rpx 24rpx;
border-radius: 6rpx;
margin-top: 50rpx;
}
.zp-main-error-btn-px.data-v-b7999e14 {
font-size: 14px;
padding: 4px 12px;
border-radius: 3px;
margin-top: 25px;
}