feat:初始提交uni-app项目

This commit is contained in:
2026-01-14 18:19:33 +08:00
commit 0dcbd340e6
515 changed files with 38560 additions and 0 deletions

View File

@@ -0,0 +1,65 @@
"use strict";
var _a, _b;
const common_vendor = require("../../../../common/vendor.js");
const props = {
props: {
// 内置图标名称,或图片路径,建议绝对路径
icon: {
type: String,
default: ""
},
// 提示文字
text: {
type: String,
default: ""
},
// 文字颜色
textColor: {
type: String,
default: "#c0c4cc"
},
// 文字大小
textSize: {
type: [String, Number],
default: 14
},
// 图标的颜色
iconColor: {
type: String,
default: "#c0c4cc"
},
// 图标的大小
iconSize: {
type: [String, Number],
default: 90
},
// 选择预置的图标类型
mode: {
type: String,
default: "data"
},
// 图标宽度单位px
width: {
type: [String, Number],
default: 160
},
// 图标高度单位px
height: {
type: [String, Number],
default: 160
},
// 是否显示组件
show: {
type: Boolean,
default: true
},
// 组件距离上一个元素之间的距离默认px单位
marginTop: {
type: [String, Number],
default: 0
},
...(_b = (_a = common_vendor.index.$uv) == null ? void 0 : _a.props) == null ? void 0 : _b.empty
}
};
exports.props = props;
//# sourceMappingURL=../../../../../.sourcemap/mp-weixin/uni_modules/uv-empty/components/uv-empty/props.js.map

View File

@@ -0,0 +1,83 @@
"use strict";
const uni_modules_uvUiTools_libs_mixin_mpMixin = require("../../../uv-ui-tools/libs/mixin/mpMixin.js");
const uni_modules_uvUiTools_libs_mixin_mixin = require("../../../uv-ui-tools/libs/mixin/mixin.js");
const uni_modules_uvEmpty_components_uvEmpty_props = require("./props.js");
const common_vendor = require("../../../../common/vendor.js");
const _sfc_main = {
name: "uv-empty",
mixins: [uni_modules_uvUiTools_libs_mixin_mpMixin.mpMixin, uni_modules_uvUiTools_libs_mixin_mixin.mixin, uni_modules_uvEmpty_components_uvEmpty_props.props],
data() {
return {
icons: {
car: "购物车为空",
page: "页面不存在",
search: "没有搜索结果",
address: "没有收货地址",
"wifi-off": "没有WiFi",
order: "订单为空",
coupon: "没有优惠券",
favor: "暂无收藏",
permission: "无权限",
history: "无历史记录",
news: "无新闻列表",
message: "消息列表为空",
list: "列表为空",
data: "数据为空",
comment: "暂无评论"
}
};
},
computed: {
// 组件样式
emptyStyle() {
const style = {};
style.marginTop = this.$uv.addUnit(this.marginTop);
return this.$uv.deepMerge(style, this.$uv.addStyle(this.customStyle));
},
// 文本样式
textStyle() {
const style = {};
style.color = this.textColor;
style.fontSize = this.$uv.addUnit(this.textSize);
return style;
},
// 判断icon是否图片路径
isImg() {
const isBase64 = this.icon.indexOf("data:") > -1 && this.icon.indexOf("base64") > -1;
return this.icon.indexOf("/") !== -1 || isBase64;
}
}
};
if (!Array) {
const _easycom_uv_icon2 = common_vendor.resolveComponent("uv-icon");
_easycom_uv_icon2();
}
const _easycom_uv_icon = () => "../../../uv-icon/components/uv-icon/uv-icon.js";
if (!Math) {
_easycom_uv_icon();
}
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return common_vendor.e({
a: _ctx.show
}, _ctx.show ? common_vendor.e({
b: !$options.isImg
}, !$options.isImg ? {
c: common_vendor.p({
name: _ctx.mode === "message" ? "chat" : `empty-${_ctx.mode}`,
size: _ctx.iconSize,
color: _ctx.iconColor,
["margin-top"]: "14"
})
} : {
d: _ctx.$uv.addUnit(_ctx.width),
e: _ctx.$uv.addUnit(_ctx.height),
f: _ctx.icon
}, {
g: common_vendor.t(_ctx.text ? _ctx.text : $data.icons[_ctx.mode]),
h: common_vendor.s($options.textStyle),
i: common_vendor.s($options.emptyStyle)
}) : {});
}
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-6efcec67"]]);
wx.createComponent(Component);
//# sourceMappingURL=../../../../../.sourcemap/mp-weixin/uni_modules/uv-empty/components/uv-empty/uv-empty.js.map

View File

@@ -0,0 +1,6 @@
{
"component": true,
"usingComponents": {
"uv-icon": "../../../uv-icon/components/uv-icon/uv-icon"
}
}

View File

@@ -0,0 +1 @@
<view wx:if="{{a}}" class="uv-empty data-v-6efcec67" style="{{i}}"><uv-icon wx:if="{{b}}" class="data-v-6efcec67" u-i="6efcec67-0" bind:__l="__l" u-p="{{c}}"></uv-icon><image wx:else class="data-v-6efcec67" style="{{'width:' + d + ';' + ('height:' + e)}}" src="{{f}}" mode="widthFix"></image><text class="uv-empty__text data-v-6efcec67" style="{{h}}">{{g}}</text><view class="uv-empty__wrap data-v-6efcec67"><slot/></view></view>

View File

@@ -0,0 +1,55 @@
/**
* 这里是uni-app内置的常用样式变量
*
* uni-app 官方扩展插件及插件市场https://ext.dcloud.net.cn上很多三方插件均使用了这些样式变量
* 如果你是插件开发者建议你使用scss预处理并在插件代码中直接使用这些变量无需 import 这个文件方便用户通过搭积木的方式开发整体风格一致的App
*
*/
/**
* 如果你是App开发者插件使用者你可以通过修改这些变量来定制自己的插件主题实现自定义主题功能
*
* 如果你的项目同样使用了scss预处理你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
*/
/* 颜色变量 */
/* 行为相关颜色 */
/* 文字基本颜色 */
/* 背景颜色 */
/* 边框颜色 */
/* 尺寸变量 */
/* 文字尺寸 */
/* 图片尺寸 */
/* Border Radius */
/* 水平间距 */
/* 垂直间距 */
/* 透明度 */
/* 文章场景相关 */
view.data-v-6efcec67, scroll-view.data-v-6efcec67, swiper-item.data-v-6efcec67 {
display: flex;
flex-direction: column;
flex-shrink: 0;
flex-grow: 0;
flex-basis: auto;
align-items: stretch;
align-content: flex-start;
}
.uv-empty.data-v-6efcec67 {
display: flex;
flex-direction: row;
flex-direction: column;
justify-content: center;
align-items: center;
}
.uv-empty__text.data-v-6efcec67 {
display: flex;
flex-direction: row;
justify-content: center;
align-items: center;
margin-top: 20rpx;
}
.uv-slot-wrap.data-v-6efcec67 {
display: flex;
flex-direction: row;
justify-content: center;
align-items: center;
margin-top: 20rpx;
}