This commit is contained in:
2026-03-25 14:54:15 +08:00
commit ab4646b43a
827 changed files with 123812 additions and 0 deletions
@@ -0,0 +1,21 @@
"use strict";
const stringProp = (defaultVal) => ({
type: String,
default: defaultVal
});
const stringOrObjectProp = (defaultVal) => ({
type: [String, Object],
default: defaultVal
});
const baseProps = {
/**
* 自定义根节点样式
*/
customStyle: stringOrObjectProp(""),
/**
* 自定义根节点样式类
*/
customClass: stringProp("")
};
exports.baseProps = baseProps;
//# sourceMappingURL=../../../../../.sourcemap/mp-weixin/uni_modules/uview-pro/components/common/props.js.map
@@ -0,0 +1,31 @@
"use strict";
const uni_modules_uviewPro_components_common_props = require("../common/props.js");
const BadgeProps = {
...uni_modules_uviewPro_components_common_props.baseProps,
/** 使用预设的背景颜色 primary,warning,success,error,info */
type: { type: String, default: "error" },
/** Badge的尺寸,default, mini */
size: { type: String, default: "default" },
/** 是否是圆点 */
isDot: { type: Boolean, default: false },
/** 显示的数值内容 */
count: { type: [Number, String], default: void 0 },
/** 展示封顶的数字值 */
overflowCount: { type: Number, default: 99 },
/** 当数值为 0 时,是否展示 Badge */
showZero: { type: Boolean, default: false },
/** 位置偏移 [number, number] */
offset: { type: Array, default: () => [20, 20] },
/** 是否开启绝对定位,开启了offset才会起作用 */
absolute: { type: Boolean, default: true },
/** 字体大小 */
fontSize: { type: [String, Number], default: "24" },
/** 字体颜色 */
color: { type: String, default: "var(--u-white-color)" },
/** badge的背景颜色 */
bgColor: { type: String, default: "" },
/** 是否让badge组件的中心点和父组件右上角重合,配置的话,offset将会失效 */
isCenter: { type: Boolean, default: false }
};
exports.BadgeProps = BadgeProps;
//# sourceMappingURL=../../../../../.sourcemap/mp-weixin/uni_modules/uview-pro/components/u-badge/types.js.map
@@ -0,0 +1,75 @@
"use strict";
const common_vendor = require("../../../../common/vendor.js");
const uni_modules_uviewPro_components_uBadge_types = require("./types.js");
const uni_modules_uviewPro_libs_index = require("../../libs/index.js");
require("../../libs/util/logger.js");
require("../../libs/config/theme-tokens.js");
const __default__ = {
name: "u-badge",
options: {
addGlobalClass: true,
virtualHost: true,
styleIsolation: "shared"
}
};
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
...__default__,
props: uni_modules_uviewPro_components_uBadge_types.BadgeProps,
setup(__props) {
const props = __props;
const boxStyle = common_vendor.computed(() => {
let style = {};
if (props.isCenter) {
style.top = 0;
style.right = 0;
style.transform = "translateY(-50%) translateX(50%)";
} else {
style.top = props.offset[0] + "rpx";
style.right = props.offset[1] + "rpx";
style.transform = "translateY(0) translateX(0)";
}
if (props.size === "mini") {
style.transform = style.transform + " scale(0.8)";
}
return style;
});
const showText = common_vendor.computed(() => {
if (props.isDot)
return "";
else {
if (Number(props.count) > props.overflowCount)
return `${props.overflowCount}+`;
else
return props.count;
}
});
const show = common_vendor.computed(() => {
if (Number(props.count) === 0 && props.showZero === false)
return false;
else
return true;
});
return (_ctx, _cache) => {
return common_vendor.e({
a: show.value
}, show.value ? {
b: common_vendor.t(showText.value),
c: common_vendor.n(_ctx.isDot ? "u-badge-dot" : ""),
d: common_vendor.n(_ctx.size === "mini" ? "u-badge-mini" : ""),
e: common_vendor.n(_ctx.type ? "u-badge--bg--" + _ctx.type : ""),
f: common_vendor.n(_ctx.customClass),
g: common_vendor.s(common_vendor.unref(uni_modules_uviewPro_libs_index.$u).toStyle({
top: _ctx.offset[0] + "rpx",
right: _ctx.offset[1] + "rpx",
fontSize: _ctx.fontSize + "rpx",
position: _ctx.absolute ? "absolute" : "static",
color: _ctx.color,
backgroundColor: _ctx.bgColor
}, boxStyle.value, _ctx.customStyle))
} : {});
};
}
});
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-53906a69"]]);
wx.createComponent(Component);
//# sourceMappingURL=../../../../../.sourcemap/mp-weixin/uni_modules/uview-pro/components/u-badge/u-badge.js.map
@@ -0,0 +1,4 @@
{
"component": true,
"usingComponents": {}
}
@@ -0,0 +1 @@
<view wx:if="{{a}}" class="{{['u-badge', 'data-v-53906a69', c, d, e, f]}}" style="{{g}}">{{b}}</view>
@@ -0,0 +1,104 @@
/**
* 这里是uni-app内置的常用样式变量
*
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
*
*/
/**
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
*
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
*/
.data-v-53906a69:root,
page.data-v-53906a69 {
/* 纯色 */
--u-white-color: #ffffff;
--u-black-color: #000000;
--u-main-color: #303133;
--u-content-color: #606266;
--u-tips-color: #909399;
--u-light-color: #c0c4cc;
--u-border-color: #e4e7ed;
--u-divider-color: #e4e7ed;
--u-mask-color: rgba(0, 0, 0, 0.4);
--u-shadow-color: rgba(0, 0, 0, 0.1);
/* 背景色 */
--u-bg-color: #f3f4f6;
--u-bg-white: #ffffff;
--u-bg-gray-light: #f1f1f1;
--u-bg-gray-dark: #2f343c;
--u-bg-black: #000000;
/* 主色 */
--u-type-primary: #17447a;
--u-type-primary-light: #d5dde7;
--u-type-primary-disabled: #8fa6c3;
--u-type-primary-dark: #123662;
/* 警告色 */
--u-type-warning: #ff9900;
--u-type-warning-disabled: #fcbd71;
--u-type-warning-dark: #f29100;
--u-type-warning-light: #fdf6ec;
/* 成功色 */
--u-type-success: #19be6b;
--u-type-success-disabled: #71d5a1;
--u-type-success-dark: #18b566;
--u-type-success-light: #dbf1e1;
/* 错误色 */
--u-type-error: #fa3534;
--u-type-error-disabled: #fab6b6;
--u-type-error-dark: #dd6161;
--u-type-error-light: #fef0f0;
/* 信息色 */
--u-type-info: #909399;
--u-type-info-disabled: #c8c9cc;
--u-type-info-dark: #82848a;
--u-type-info-light: #f4f4f5;
}
/* 颜色变量 */
/* 行为相关颜色 */
/* 文字基本颜色 */
/* 背景颜色 */
/* 边框颜色 */
/* 尺寸变量 */
/* 文字尺寸 */
/* 图片尺寸 */
/* Border Radius */
/* 水平间距 */
/* 垂直间距 */
/* 透明度 */
/* 文章场景相关 */
.u-badge.data-v-53906a69 {
display: inline-flex;
justify-content: center;
align-items: center;
line-height: 24rpx;
padding: 4rpx 8rpx;
border-radius: 100rpx;
z-index: 9;
}
.u-badge--bg--primary.data-v-53906a69 {
background-color: var(--u-type-primary);
}
.u-badge--bg--error.data-v-53906a69 {
background-color: var(--u-type-error);
}
.u-badge--bg--success.data-v-53906a69 {
background-color: var(--u-type-success);
}
.u-badge--bg--info.data-v-53906a69 {
background-color: var(--u-type-info);
}
.u-badge--bg--warning.data-v-53906a69 {
background-color: var(--u-type-warning);
}
.u-badge-dot.data-v-53906a69 {
height: 16rpx;
width: 16rpx;
border-radius: 100rpx;
line-height: 1;
}
.u-badge-mini.data-v-53906a69 {
transform: scale(0.8);
transform-origin: center center;
}
@@ -0,0 +1,61 @@
"use strict";
const uni_modules_uviewPro_components_common_props = require("../common/props.js");
const ButtonProps = {
...uni_modules_uviewPro_components_common_props.baseProps,
/** 按钮文本 */
text: { type: String, default: "" },
/** 是否细边框 */
hairLine: { type: Boolean, default: true },
/** 按钮的预置样式,defaultprimaryerrorwarningsuccess */
type: { type: String, default: "default" },
/** 按钮尺寸,defaultmediummini */
size: { type: String, default: "default" },
/** 按钮形状,circle(两边为半圆),square(带圆角) */
shape: { type: String, default: "square" },
/** 按钮是否镂空 */
plain: { type: Boolean, default: false },
/** 是否禁止状态 */
disabled: { type: Boolean, default: false },
/** 是否加载中 */
loading: { type: Boolean, default: false },
/** 支付宝小程序,当 open-type 为 getAuthorize 时有效 */
scope: { type: String, default: "" },
/** 开放能力,具体请看uniapp稳定关于button组件部分说明 */
openType: { type: String, default: "" },
/** 用于 <form> 组件,点击分别会触发 <form> 组件的 submit/reset 事件 */
formType: { type: String, default: "" },
/** 打开 APP 时,向 APP 传递的参数,open-type=launchApp时有效 */
appParameter: { type: String, default: "" },
/** 指定是否阻止本节点的祖先节点出现点击态,微信小程序有效 */
hoverStopPropagation: { type: Boolean, default: false },
/** 指定返回用户信息的语言,zh_CN 简体中文,zh_TW 繁体中文,en 英文。只微信小程序有效 */
lang: { type: String, default: "en" },
/** 会话来源,open-type="contact"时有效。只微信小程序有效 */
sessionFrom: { type: String, default: "" },
/** 会话内消息卡片标题,open-type="contact"时有效 */
sendMessageTitle: { type: String, default: "" },
/** 会话内消息卡片点击跳转小程序路径,open-type="contact"时有效 */
sendMessagePath: { type: String, default: "" },
/** 会话内消息卡片图片,open-type="contact"时有效 */
sendMessageImg: { type: String, default: "" },
/** 是否显示会话内消息卡片,open-type="contact"时有效 */
showMessageCard: { type: Boolean, default: false },
/** 手指按(触摸)按钮时按钮时的背景颜色 */
hoverBgColor: { type: String, default: "" },
/** 水波纹的背景颜色 */
rippleBgColor: { type: String, default: "" },
/** 是否开启水波纹效果 */
ripple: { type: Boolean, default: false },
/** 按下的类名 */
hoverClass: { type: String, default: "" },
/** 额外传参参数,用于小程序的data-xxx属性,通过target.dataset.name获取 */
dataName: { type: String, default: "" },
/** 节流,一定时间内只能触发一次 */
throttleTime: { type: [String, Number], default: 0 },
/** 按住后多久出现点击态,单位毫秒 */
hoverStartTime: { type: [String, Number], default: 20 },
/** 手指松开后点击态保留时间,单位毫秒 */
hoverStayTime: { type: [String, Number], default: 150 }
};
exports.ButtonProps = ButtonProps;
//# sourceMappingURL=../../../../../.sourcemap/mp-weixin/uni_modules/uview-pro/components/u-button/types.js.map
@@ -0,0 +1,187 @@
"use strict";
const common_vendor = require("../../../../common/vendor.js");
const uni_modules_uviewPro_libs_index = require("../../libs/index.js");
require("../../libs/util/logger.js");
require("../../libs/config/theme-tokens.js");
const uni_modules_uviewPro_components_uButton_types = require("./types.js");
const __default__ = {
name: "u-button",
options: {
addGlobalClass: true,
virtualHost: true,
styleIsolation: "shared"
}
};
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
...__default__,
props: uni_modules_uviewPro_components_uButton_types.ButtonProps,
emits: [
"click",
"getuserinfo",
"contact",
"getphonenumber",
"error",
"launchapp",
"opensetting",
"chooseavatar",
"agreeprivacyauthorization"
],
setup(__props, { emit: __emit }) {
const emit = __emit;
const props = __props;
const rippleTop = common_vendor.ref(0);
const rippleLeft = common_vendor.ref(0);
const fields = common_vendor.ref({});
const waveActive = common_vendor.ref(false);
const getHoverClass = common_vendor.computed(() => {
if (props.loading || props.disabled || props.ripple)
return "";
if (props.hoverClass)
return props.hoverClass;
let hoverClass = "";
hoverClass = props.plain ? "u-" + props.type + "-plain-hover" : "u-" + props.type + "-hover";
return hoverClass;
});
const showHairLineBorder = common_vendor.computed(() => {
if (["primary", "success", "error", "warning"].indexOf(props.type) >= 0 && !props.plain) {
return "";
} else {
return "u-hairline-border";
}
});
function click(e) {
if (Number(props.throttleTime)) {
uni_modules_uviewPro_libs_index.$u.throttle(() => {
clickAction(e);
}, Number(props.throttleTime));
} else {
clickAction(e);
}
}
function clickAction(e) {
if (props.loading === true || props.disabled === true)
return;
if (props.ripple) {
waveActive.value = false;
common_vendor.nextTick$1(() => {
getWaveQuery(e);
});
}
emit("click", e);
}
function getWaveQuery(e) {
getElQuery().then((res) => {
let data = res[0];
if (!data.width || !data.width)
return;
data.targetWidth = data.height > data.width ? data.height : data.width;
if (!data.targetWidth)
return;
fields.value = data;
let touchesX = "", touchesY = "";
touchesX = e.touches[0].clientX;
touchesY = e.touches[0].clientY;
rippleTop.value = Number(touchesY) - data.top - data.targetWidth / 2;
rippleLeft.value = Number(touchesX) - data.left - data.targetWidth / 2;
common_vendor.nextTick$1(() => {
waveActive.value = true;
});
});
}
function getElQuery() {
return new Promise((resolve) => {
let queryInfo = "";
queryInfo = common_vendor.index.createSelectorQuery().in(null);
queryInfo.select(".u-btn").boundingClientRect();
queryInfo.exec((data) => {
resolve(data);
});
});
}
function getphonenumber(event) {
emit("getphonenumber", event);
}
function getuserinfo(event) {
emit("getuserinfo", event);
}
function error(event) {
emit("error", event);
}
function opensetting(event) {
emit("opensetting", event);
}
function launchapp(event) {
emit("launchapp", event);
}
function getAuthorize(event) {
if (props.scope === "phoneNumber") {
getphonenumber(event);
} else if (props.scope === "userInfo") {
getuserinfo(event);
}
}
function contact(event) {
emit("contact", event);
}
function chooseavatar(event) {
emit("chooseavatar", event);
}
function agreeprivacyauthorization(event) {
emit("agreeprivacyauthorization", event);
}
return (_ctx, _cache) => {
return common_vendor.e({
a: common_vendor.t(props.text),
b: _ctx.ripple
}, _ctx.ripple ? {
c: common_vendor.n(waveActive.value ? "u-wave-active" : ""),
d: rippleTop.value + "px",
e: rippleLeft.value + "px",
f: fields.value.targetWidth + "px",
g: fields.value.targetWidth + "px",
h: _ctx.rippleBgColor || "rgba(0, 0, 0, 0.15)"
} : {}, {
i: common_vendor.n("u-size-" + _ctx.size),
j: common_vendor.n(_ctx.plain ? "u-btn--" + _ctx.type + "--plain" : ""),
k: common_vendor.n(_ctx.loading ? "u-loading" : ""),
l: common_vendor.n(_ctx.shape === "circle" ? "u-round-circle" : ""),
m: common_vendor.n(_ctx.hairLine ? showHairLineBorder.value : "u-btn--bold-border"),
n: common_vendor.n("u-btn--" + _ctx.type),
o: common_vendor.n(_ctx.disabled ? `u-btn--${_ctx.type}--disabled` : ""),
p: common_vendor.n(_ctx.customClass),
q: Number(_ctx.hoverStartTime),
r: Number(_ctx.hoverStayTime),
s: _ctx.disabled,
t: _ctx.formType,
v: _ctx.disabled || _ctx.loading ? void 0 : _ctx.openType,
w: _ctx.appParameter,
x: _ctx.hoverStopPropagation,
y: _ctx.sendMessageTitle,
z: _ctx.sendMessagePath,
A: _ctx.lang,
B: _ctx.dataName,
C: _ctx.sessionFrom,
D: _ctx.sendMessageImg,
E: _ctx.showMessageCard,
F: common_vendor.o(getAuthorize, "73"),
G: common_vendor.o(getuserinfo, "10"),
H: common_vendor.o(contact, "34"),
I: common_vendor.o(getphonenumber, "a9"),
J: common_vendor.o(error, "8a"),
K: common_vendor.o(launchapp, "dc"),
L: common_vendor.o(opensetting, "4e"),
M: common_vendor.o(chooseavatar, "c5"),
N: common_vendor.o(agreeprivacyauthorization, "fa"),
O: common_vendor.s(common_vendor.unref(uni_modules_uviewPro_libs_index.$u).toStyle({
overflow: _ctx.ripple ? "hidden" : "visible"
}, _ctx.customStyle)),
P: common_vendor.o(($event) => click($event), "1c"),
Q: getHoverClass.value,
R: _ctx.loading
});
};
}
});
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-a44cf897"]]);
wx.createComponent(Component);
//# sourceMappingURL=../../../../../.sourcemap/mp-weixin/uni_modules/uview-pro/components/u-button/u-button.js.map
@@ -0,0 +1,4 @@
{
"component": true,
"usingComponents": {}
}
@@ -0,0 +1 @@
<button id="u-wave-btn" class="{{['u-btn', 'u-line-1', 'u-fix-ios-appearance', 'data-v-a44cf897', i, j, k, l, m, n, o, p]}}" hover-start-time="{{q}}" hover-stay-time="{{r}}" disabled="{{s}}" form-type="{{t}}" open-type="{{v}}" app-parameter="{{w}}" hover-stop-propagation="{{x}}" send-message-title="{{y}}" send-message-path="{{z}}" lang="{{A}}" data-name="{{B}}" session-from="{{C}}" send-message-img="{{D}}" show-message-card="{{E}}" bindgetAuthorize="{{F}}" bindgetuserinfo="{{G}}" bindcontact="{{H}}" bindgetphonenumber="{{I}}" binderror="{{J}}" bindlaunchapp="{{K}}" bindopensetting="{{L}}" bindchooseavatar="{{M}}" bindagreeprivacyauthorization="{{N}}" style="{{O}}" catchtap="{{P}}" hover-class="{{Q}}" loading="{{R}}"><block wx:if="{{$slots.d}}"><slot></slot></block><block wx:else>{{a}}</block><view wx:if="{{b}}" class="{{['u-wave-ripple', 'data-v-a44cf897', c]}}" style="{{'top:' + d + ';' + ('left:' + e) + ';' + ('width:' + f) + ';' + ('height:' + g) + ';' + ('background-color:' + h)}}"></view></button>
@@ -0,0 +1,273 @@
/**
* 这里是uni-app内置的常用样式变量
*
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
*
*/
/**
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
*
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
*/
.data-v-a44cf897:root,
page.data-v-a44cf897 {
/* 纯色 */
--u-white-color: #ffffff;
--u-black-color: #000000;
--u-main-color: #303133;
--u-content-color: #606266;
--u-tips-color: #909399;
--u-light-color: #c0c4cc;
--u-border-color: #e4e7ed;
--u-divider-color: #e4e7ed;
--u-mask-color: rgba(0, 0, 0, 0.4);
--u-shadow-color: rgba(0, 0, 0, 0.1);
/* 背景色 */
--u-bg-color: #f3f4f6;
--u-bg-white: #ffffff;
--u-bg-gray-light: #f1f1f1;
--u-bg-gray-dark: #2f343c;
--u-bg-black: #000000;
/* 主色 */
--u-type-primary: #17447a;
--u-type-primary-light: #d5dde7;
--u-type-primary-disabled: #8fa6c3;
--u-type-primary-dark: #123662;
/* 警告色 */
--u-type-warning: #ff9900;
--u-type-warning-disabled: #fcbd71;
--u-type-warning-dark: #f29100;
--u-type-warning-light: #fdf6ec;
/* 成功色 */
--u-type-success: #19be6b;
--u-type-success-disabled: #71d5a1;
--u-type-success-dark: #18b566;
--u-type-success-light: #dbf1e1;
/* 错误色 */
--u-type-error: #fa3534;
--u-type-error-disabled: #fab6b6;
--u-type-error-dark: #dd6161;
--u-type-error-light: #fef0f0;
/* 信息色 */
--u-type-info: #909399;
--u-type-info-disabled: #c8c9cc;
--u-type-info-dark: #82848a;
--u-type-info-light: #f4f4f5;
}
/* 颜色变量 */
/* 行为相关颜色 */
/* 文字基本颜色 */
/* 背景颜色 */
/* 边框颜色 */
/* 尺寸变量 */
/* 文字尺寸 */
/* 图片尺寸 */
/* Border Radius */
/* 水平间距 */
/* 垂直间距 */
/* 透明度 */
/* 文章场景相关 */
.u-btn.data-v-a44cf897::after {
border: none;
}
.u-btn.data-v-a44cf897 {
position: relative;
border: 0;
display: inline-flex;
overflow: visible;
line-height: 1;
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
cursor: pointer;
padding: 0 40rpx;
z-index: 1;
box-sizing: border-box;
transition: all 0.15s;
}
.u-btn--bold-border.data-v-a44cf897 {
border: 1px solid var(--u-white-color);
}
.u-btn--default.data-v-a44cf897 {
color: var(--u-content-color);
border-color: var(--u-light-color);
background-color: var(--u-bg-white);
}
.u-btn--primary.data-v-a44cf897 {
color: var(--u-white-color);
border-color: var(--u-type-primary);
background-color: var(--u-type-primary);
}
.u-btn--success.data-v-a44cf897 {
color: var(--u-white-color);
border-color: var(--u-type-success);
background-color: var(--u-type-success);
}
.u-btn--error.data-v-a44cf897 {
color: var(--u-white-color);
border-color: var(--u-type-error);
background-color: var(--u-type-error);
}
.u-btn--warning.data-v-a44cf897 {
color: var(--u-white-color);
border-color: var(--u-type-warning);
background-color: var(--u-type-warning);
}
.u-btn--default--disabled.data-v-a44cf897 {
color: var(--u-white-color);
border-color: var(--u-border-color);
background-color: var(--u-bg-white);
}
.u-btn--primary--disabled.data-v-a44cf897 {
color: var(--u-white-color) !important;
border-color: var(--u-type-primary-disabled) !important;
background-color: var(--u-type-primary-disabled) !important;
}
.u-btn--success--disabled.data-v-a44cf897 {
color: var(--u-white-color) !important;
border-color: var(--u-type-success-disabled) !important;
background-color: var(--u-type-success-disabled) !important;
}
.u-btn--error--disabled.data-v-a44cf897 {
color: var(--u-white-color) !important;
border-color: var(--u-type-error-disabled) !important;
background-color: var(--u-type-error-disabled) !important;
}
.u-btn--warning--disabled.data-v-a44cf897 {
color: var(--u-white-color) !important;
border-color: var(--u-type-warning-disabled) !important;
background-color: var(--u-type-warning-disabled) !important;
}
.u-btn--primary--plain.data-v-a44cf897 {
color: var(--u-type-primary) !important;
border-color: var(--u-type-primary-disabled) !important;
background-color: var(--u-type-primary-light) !important;
}
.u-btn--success--plain.data-v-a44cf897 {
color: var(--u-type-success) !important;
border-color: var(--u-type-success-disabled) !important;
background-color: var(--u-type-success-light) !important;
}
.u-btn--error--plain.data-v-a44cf897 {
color: var(--u-type-error) !important;
border-color: var(--u-type-error-disabled) !important;
background-color: var(--u-type-error-light) !important;
}
.u-btn--warning--plain.data-v-a44cf897 {
color: var(--u-type-warning) !important;
border-color: var(--u-type-warning-disabled) !important;
background-color: var(--u-type-warning-light) !important;
}
.u-hairline-border.data-v-a44cf897:after {
content: " ";
position: absolute;
pointer-events: none;
box-sizing: border-box;
transform-origin: 0 0;
left: 0;
top: 0;
width: 199.8%;
height: 199.7%;
transform: scale(0.5, 0.5);
border: 1px solid currentColor;
z-index: 1;
}
.u-wave-ripple.data-v-a44cf897 {
z-index: 0;
position: absolute;
border-radius: 100%;
background-clip: padding-box;
pointer-events: none;
-webkit-user-select: none;
user-select: none;
transform: scale(0);
opacity: 1;
transform-origin: center;
}
.u-wave-ripple.u-wave-active.data-v-a44cf897 {
opacity: 0;
transform: scale(2);
transition: opacity 1s linear, transform 0.4s linear;
}
.u-round-circle.data-v-a44cf897 {
border-radius: 100rpx;
}
.u-round-circle.data-v-a44cf897::after {
border-radius: 100rpx;
}
.u-loading.data-v-a44cf897::after {
background-color: rgba(255, 255, 255, 0.35);
}
.u-size-default.data-v-a44cf897 {
font-size: 30rpx;
height: 80rpx;
line-height: 80rpx;
}
.u-size-medium.data-v-a44cf897 {
display: inline-flex;
width: auto;
font-size: 26rpx;
height: 70rpx;
line-height: 70rpx;
padding: 0 80rpx;
}
.u-size-mini.data-v-a44cf897 {
display: inline-flex;
width: auto;
font-size: 22rpx;
padding-top: 1px;
height: 50rpx;
line-height: 50rpx;
padding: 0 20rpx;
}
.u-primary-plain-hover.data-v-a44cf897 {
color: var(--u-white-color) !important;
background: var(--u-type-primary-dark) !important;
}
.u-default-plain-hover.data-v-a44cf897 {
color: var(--u-type-primary-dark) !important;
background: var(--u-type-primary-light) !important;
}
.u-success-plain-hover.data-v-a44cf897 {
color: var(--u-white-color) !important;
background: var(--u-type-success-dark) !important;
}
.u-warning-plain-hover.data-v-a44cf897 {
color: var(--u-white-color) !important;
background: var(--u-type-warning-dark) !important;
}
.u-error-plain-hover.data-v-a44cf897 {
color: var(--u-white-color) !important;
background: var(--u-type-error-dark) !important;
}
.u-info-plain-hover.data-v-a44cf897 {
color: var(--u-white-color) !important;
background: var(--u-type-info-dark) !important;
}
.u-default-hover.data-v-a44cf897 {
color: var(--u-type-primary-dark) !important;
border-color: var(--u-type-primary-dark) !important;
background-color: var(--u-type-primary-light) !important;
}
.u-primary-hover.data-v-a44cf897 {
background: var(--u-type-primary-dark) !important;
color: var(--u-white-color);
}
.u-success-hover.data-v-a44cf897 {
background: var(--u-type-success-dark) !important;
color: var(--u-white-color);
}
.u-info-hover.data-v-a44cf897 {
background: var(--u-type-info-dark) !important;
color: var(--u-white-color);
}
.u-warning-hover.data-v-a44cf897 {
background: var(--u-type-warning-dark) !important;
color: var(--u-white-color);
}
.u-error-hover.data-v-a44cf897 {
background: var(--u-type-error-dark) !important;
color: var(--u-white-color);
}
@@ -0,0 +1,13 @@
"use strict";
const uni_modules_uviewPro_components_common_props = require("../common/props.js");
const CellGroupProps = {
...uni_modules_uviewPro_components_common_props.baseProps,
/** 分组标题 */
title: { type: String, default: "" },
/** 是否显示分组list上下边框 */
border: { type: Boolean, default: true },
/** 分组标题的样式,对象形式,注意驼峰属性写法 */
titleStyle: { type: Object, default: () => ({}) }
};
exports.CellGroupProps = CellGroupProps;
//# sourceMappingURL=../../../../../.sourcemap/mp-weixin/uni_modules/uview-pro/components/u-cell-group/types.js.map
@@ -0,0 +1,35 @@
"use strict";
const common_vendor = require("../../../../common/vendor.js");
const uni_modules_uviewPro_components_uCellGroup_types = require("./types.js");
const uni_modules_uviewPro_libs_index = require("../../libs/index.js");
require("../../libs/util/logger.js");
require("../../libs/config/theme-tokens.js");
const __default__ = {
name: "u-cell-group",
options: {
addGlobalClass: true,
virtualHost: true,
styleIsolation: "shared"
}
};
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
...__default__,
props: uni_modules_uviewPro_components_uCellGroup_types.CellGroupProps,
setup(__props) {
return (_ctx, _cache) => {
return common_vendor.e({
a: _ctx.title
}, _ctx.title ? {
b: common_vendor.t(_ctx.title),
c: common_vendor.s(_ctx.titleStyle)
} : {}, {
d: _ctx.border ? 1 : "",
e: common_vendor.n(_ctx.customClass),
f: common_vendor.s(common_vendor.unref(uni_modules_uviewPro_libs_index.$u).toStyle(_ctx.customStyle))
});
};
}
});
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-07db21ed"]]);
wx.createComponent(Component);
//# sourceMappingURL=../../../../../.sourcemap/mp-weixin/uni_modules/uview-pro/components/u-cell-group/u-cell-group.js.map
@@ -0,0 +1,4 @@
{
"component": true,
"usingComponents": {}
}
@@ -0,0 +1 @@
<view class="{{['u-cell-box', 'data-v-07db21ed', e]}}" style="{{f}}"><view wx:if="{{a}}" class="u-cell-title data-v-07db21ed" style="{{c}}">{{b}}</view><view class="{{['u-cell-item-box', 'data-v-07db21ed', d && 'u-border-bottom u-border-top']}}"><slot/></view></view>
@@ -0,0 +1,83 @@
/**
* 这里是uni-app内置的常用样式变量
*
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
*
*/
/**
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
*
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
*/
.data-v-07db21ed:root,
page.data-v-07db21ed {
/* 纯色 */
--u-white-color: #ffffff;
--u-black-color: #000000;
--u-main-color: #303133;
--u-content-color: #606266;
--u-tips-color: #909399;
--u-light-color: #c0c4cc;
--u-border-color: #e4e7ed;
--u-divider-color: #e4e7ed;
--u-mask-color: rgba(0, 0, 0, 0.4);
--u-shadow-color: rgba(0, 0, 0, 0.1);
/* 背景色 */
--u-bg-color: #f3f4f6;
--u-bg-white: #ffffff;
--u-bg-gray-light: #f1f1f1;
--u-bg-gray-dark: #2f343c;
--u-bg-black: #000000;
/* 主色 */
--u-type-primary: #17447a;
--u-type-primary-light: #d5dde7;
--u-type-primary-disabled: #8fa6c3;
--u-type-primary-dark: #123662;
/* 警告色 */
--u-type-warning: #ff9900;
--u-type-warning-disabled: #fcbd71;
--u-type-warning-dark: #f29100;
--u-type-warning-light: #fdf6ec;
/* 成功色 */
--u-type-success: #19be6b;
--u-type-success-disabled: #71d5a1;
--u-type-success-dark: #18b566;
--u-type-success-light: #dbf1e1;
/* 错误色 */
--u-type-error: #fa3534;
--u-type-error-disabled: #fab6b6;
--u-type-error-dark: #dd6161;
--u-type-error-light: #fef0f0;
/* 信息色 */
--u-type-info: #909399;
--u-type-info-disabled: #c8c9cc;
--u-type-info-dark: #82848a;
--u-type-info-light: #f4f4f5;
}
/* 颜色变量 */
/* 行为相关颜色 */
/* 文字基本颜色 */
/* 背景颜色 */
/* 边框颜色 */
/* 尺寸变量 */
/* 文字尺寸 */
/* 图片尺寸 */
/* Border Radius */
/* 水平间距 */
/* 垂直间距 */
/* 透明度 */
/* 文章场景相关 */
.u-cell-box.data-v-07db21ed {
width: 100%;
}
.u-cell-title.data-v-07db21ed {
padding: 30rpx 32rpx 10rpx 32rpx;
font-size: 30rpx;
text-align: left;
color: var(--u-tips-color);
}
.u-cell-item-box.data-v-07db21ed {
background-color: var(--u-bg-white);
flex-direction: row;
}
@@ -0,0 +1,47 @@
"use strict";
const uni_modules_uviewPro_components_common_props = require("../common/props.js");
const CellItemProps = {
...uni_modules_uviewPro_components_common_props.baseProps,
/** 左侧图标名称(只能uView内置图标),或者图标src */
icon: { type: String, default: "" },
/** 左侧标题 */
title: { type: [String, Number], default: "" },
/** 右侧内容 */
value: { type: [String, Number], default: "" },
/** 标题下方的描述信息 */
label: { type: [String, Number], default: "" },
/** 是否显示下边框 */
borderBottom: { type: Boolean, default: true },
/** 是否显示上边框 */
borderTop: { type: Boolean, default: false },
/** 是否开启点击反馈,即点击时cell背景为灰色,none为无效果 */
hoverClass: { type: String, default: "u-cell-hover" },
/** 是否显示右侧箭头 */
arrow: { type: Boolean, default: true },
/** 内容是否垂直居中 */
center: { type: Boolean, default: false },
/** 是否显示左边表示必填的星号 */
required: { type: Boolean, default: false },
/** 标题的宽度,单位rpx */
titleWidth: { type: [Number, String], default: "" },
/** 右侧箭头方向,可选值:right|up|down,默认为right */
arrowDirection: { type: String, default: "right" },
/** 控制标题的样式 */
titleStyle: { type: Object, default: () => ({}) },
/** 右侧显示内容的样式 */
valueStyle: { type: Object, default: () => ({}) },
/** 描述信息的样式 */
labelStyle: { type: Object, default: () => ({}) },
/** 背景颜色 */
bgColor: { type: String, default: "transparent" },
/** 用于识别被点击的是第几个cell */
index: { type: [String, Number], default: "" },
/** 是否使用label插槽 */
useLabelSlot: { type: Boolean, default: false },
/** 左边图标的大小,单位rpx,只对传入icon字段时有效 */
iconSize: { type: [Number, String], default: 34 },
/** 左边图标的样式,对象形式 */
iconStyle: { type: Object, default: () => ({}) }
};
exports.CellItemProps = CellItemProps;
//# sourceMappingURL=../../../../../.sourcemap/mp-weixin/uni_modules/uview-pro/components/u-cell-item/types.js.map
@@ -0,0 +1,102 @@
"use strict";
const common_vendor = require("../../../../common/vendor.js");
const uni_modules_uviewPro_components_uCellItem_types = require("./types.js");
const uni_modules_uviewPro_libs_index = require("../../libs/index.js");
require("../../libs/util/logger.js");
require("../../libs/config/theme-tokens.js");
if (!Array) {
const _easycom_u_icon2 = common_vendor.resolveComponent("u-icon");
_easycom_u_icon2();
}
const _easycom_u_icon = () => "../u-icon/u-icon.js";
if (!Math) {
_easycom_u_icon();
}
const __default__ = {
name: "u-cell-item",
options: {
addGlobalClass: true,
virtualHost: true,
styleIsolation: "shared"
}
};
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
...__default__,
props: uni_modules_uviewPro_components_uCellItem_types.CellItemProps,
emits: ["click"],
setup(__props, { emit: __emit }) {
const emit = __emit;
const props = __props;
const $slots = common_vendor.useSlots();
const arrowStyle = common_vendor.computed(() => {
let style = {};
if (props.arrowDirection === "up")
style.transform = "rotate(-90deg)";
else if (props.arrowDirection === "down")
style.transform = "rotate(90deg)";
else
style.transform = "rotate(0deg)";
return style;
});
function onClick() {
emit("click", props.index);
}
return (_ctx, _cache) => {
return common_vendor.e({
a: _ctx.icon
}, _ctx.icon ? {
b: common_vendor.p({
size: _ctx.iconSize,
name: _ctx.icon,
["custom-style"]: _ctx.iconStyle
})
} : {}, {
c: _ctx.title !== ""
}, _ctx.title !== "" ? {
d: common_vendor.t(_ctx.title)
} : {}, {
e: _ctx.label || common_vendor.unref($slots).label
}, _ctx.label || common_vendor.unref($slots).label ? common_vendor.e({
f: _ctx.label !== ""
}, _ctx.label !== "" ? {
g: common_vendor.t(_ctx.label)
} : {}, {
h: common_vendor.s(_ctx.labelStyle)
}) : {}, {
i: common_vendor.s({
width: _ctx.titleWidth ? _ctx.titleWidth + "rpx" : "auto"
}),
j: common_vendor.s(_ctx.titleStyle),
k: _ctx.value !== ""
}, _ctx.value !== "" ? {
l: common_vendor.t(_ctx.value)
} : {}, {
m: common_vendor.s(_ctx.valueStyle),
n: common_vendor.unref($slots)["right-icon"]
}, common_vendor.unref($slots)["right-icon"] ? {} : {}, {
o: _ctx.arrow
}, _ctx.arrow ? {
p: common_vendor.s(arrowStyle.value),
q: common_vendor.p({
name: "arrow-right"
})
} : {}, {
r: common_vendor.o(onClick, "2d"),
s: common_vendor.n({
"u-border-bottom": _ctx.borderBottom,
"u-border-top": _ctx.borderTop,
"u-col-center": _ctx.center,
"u-cell--required": _ctx.required
}),
t: common_vendor.n(_ctx.customClass),
v: _ctx.hoverClass,
w: common_vendor.s(common_vendor.unref(uni_modules_uviewPro_libs_index.$u).toStyle({
backgroundColor: _ctx.bgColor
}, _ctx.customStyle))
});
};
}
});
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-78f27ce9"]]);
wx.createComponent(Component);
//# sourceMappingURL=../../../../../.sourcemap/mp-weixin/uni_modules/uview-pro/components/u-cell-item/u-cell-item.js.map
@@ -0,0 +1,6 @@
{
"component": true,
"usingComponents": {
"u-icon": "../u-icon/u-icon"
}
}
@@ -0,0 +1 @@
<view bindtap="{{r}}" class="{{['u-cell', 'data-v-78f27ce9', s, t]}}" hover-stay-time="150" hover-class="{{v}}" style="{{w}}"><view wx:if="{{a}}" class="u-cell__left-icon-wrap data-v-78f27ce9"><u-icon wx:if="{{b}}" class="data-v-78f27ce9" u-i="78f27ce9-0" bind:__l="__l" u-p="{{b}}"></u-icon></view><view wx:else class="u-flex data-v-78f27ce9"><slot name="icon"></slot></view><view class="u-cell_title data-v-78f27ce9" style="{{i + ';' + j}}"><block wx:if="{{c}}">{{d}}</block><slot wx:else name="title"></slot><view wx:if="{{e}}" class="u-cell__label data-v-78f27ce9" style="{{h}}"><block wx:if="{{f}}">{{g}}</block><slot wx:else name="label"></slot></view></view><view class="u-cell__value data-v-78f27ce9" style="{{m}}"><block wx:if="{{k}}">{{l}}</block><slot wx:else></slot></view><view wx:if="{{n}}" class="u-flex u-cell_right data-v-78f27ce9"><slot name="right-icon"></slot></view><view wx:if="{{o}}" class="u-icon-wrap u-cell__right-icon-wrap data-v-78f27ce9"><u-icon wx:if="{{q}}" class="data-v-78f27ce9" style="{{p}}" u-i="78f27ce9-1" bind:__l="__l" u-p="{{q}}"></u-icon></view></view>
@@ -0,0 +1,152 @@
/**
* 这里是uni-app内置的常用样式变量
*
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
*
*/
/**
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
*
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
*/
.data-v-78f27ce9:root,
page.data-v-78f27ce9 {
/* 纯色 */
--u-white-color: #ffffff;
--u-black-color: #000000;
--u-main-color: #303133;
--u-content-color: #606266;
--u-tips-color: #909399;
--u-light-color: #c0c4cc;
--u-border-color: #e4e7ed;
--u-divider-color: #e4e7ed;
--u-mask-color: rgba(0, 0, 0, 0.4);
--u-shadow-color: rgba(0, 0, 0, 0.1);
/* 背景色 */
--u-bg-color: #f3f4f6;
--u-bg-white: #ffffff;
--u-bg-gray-light: #f1f1f1;
--u-bg-gray-dark: #2f343c;
--u-bg-black: #000000;
/* 主色 */
--u-type-primary: #17447a;
--u-type-primary-light: #d5dde7;
--u-type-primary-disabled: #8fa6c3;
--u-type-primary-dark: #123662;
/* 警告色 */
--u-type-warning: #ff9900;
--u-type-warning-disabled: #fcbd71;
--u-type-warning-dark: #f29100;
--u-type-warning-light: #fdf6ec;
/* 成功色 */
--u-type-success: #19be6b;
--u-type-success-disabled: #71d5a1;
--u-type-success-dark: #18b566;
--u-type-success-light: #dbf1e1;
/* 错误色 */
--u-type-error: #fa3534;
--u-type-error-disabled: #fab6b6;
--u-type-error-dark: #dd6161;
--u-type-error-light: #fef0f0;
/* 信息色 */
--u-type-info: #909399;
--u-type-info-disabled: #c8c9cc;
--u-type-info-dark: #82848a;
--u-type-info-light: #f4f4f5;
}
/* 颜色变量 */
/* 行为相关颜色 */
/* 文字基本颜色 */
/* 背景颜色 */
/* 边框颜色 */
/* 尺寸变量 */
/* 文字尺寸 */
/* 图片尺寸 */
/* Border Radius */
/* 水平间距 */
/* 垂直间距 */
/* 透明度 */
/* 文章场景相关 */
.u-cell.data-v-78f27ce9 {
display: flex;
flex-direction: row;
align-items: center;
position: relative;
box-sizing: border-box;
width: 100%;
padding: 26rpx 32rpx;
font-size: 28rpx;
line-height: 54rpx;
color: var(--u-content-color);
background-color: var(--u-bg-white);
text-align: left;
}
.u-cell_title.data-v-78f27ce9 {
font-size: 28rpx;
}
.u-cell__left-icon-wrap.data-v-78f27ce9 {
margin-right: 10rpx;
font-size: 32rpx;
}
.u-cell__right-icon-wrap.data-v-78f27ce9 {
margin-left: 10rpx;
color: var(--u-tips-color);
font-size: 28rpx;
}
.u-cell__left-icon-wrap.data-v-78f27ce9,
.u-cell__right-icon-wrap.data-v-78f27ce9 {
display: flex;
flex-direction: row;
align-items: center;
height: 48rpx;
}
.u-cell-border.data-v-78f27ce9:after {
position: absolute;
box-sizing: border-box;
content: " ";
pointer-events: none;
border-bottom: 1px solid var(--u-border-color);
right: 0;
left: 0;
top: 0;
transform: scaleY(0.5);
}
.u-cell-border.data-v-78f27ce9 {
position: relative;
}
.u-cell__label.data-v-78f27ce9 {
margin-top: 6rpx;
font-size: 26rpx;
line-height: 36rpx;
color: var(--u-tips-color);
word-wrap: break-word;
}
.u-cell__value.data-v-78f27ce9 {
overflow: hidden;
text-align: right;
vertical-align: middle;
color: var(--u-tips-color);
font-size: 26rpx;
}
.u-cell__title.data-v-78f27ce9,
.u-cell__value.data-v-78f27ce9 {
flex: 1;
}
.u-cell--required.data-v-78f27ce9 {
overflow: visible;
display: flex;
flex-direction: row;
align-items: center;
}
.u-cell--required.data-v-78f27ce9:before {
position: absolute;
content: "*";
left: 8px;
margin-top: 4rpx;
font-size: 14px;
color: var(--u-type-error);
}
.u-cell_right.data-v-78f27ce9 {
line-height: 1;
}
@@ -0,0 +1,11 @@
"use strict";
const uni_modules_uviewPro_components_common_props = require("../common/props.js");
const GridItemProps = {
...uni_modules_uviewPro_components_common_props.baseProps,
/** 背景颜色 */
bgColor: { type: String, default: "var(--u-bg-white)" },
/** 点击时返回的index */
index: { type: [Number, String], default: "" }
};
exports.GridItemProps = GridItemProps;
//# sourceMappingURL=../../../../../.sourcemap/mp-weixin/uni_modules/uview-pro/components/u-grid-item/types.js.map
@@ -0,0 +1,60 @@
"use strict";
const common_vendor = require("../../../../common/vendor.js");
const uni_modules_uviewPro_components_uGridItem_types = require("./types.js");
const uni_modules_uviewPro_libs_index = require("../../libs/index.js");
require("../../libs/util/logger.js");
require("../../libs/config/theme-tokens.js");
const uni_modules_uviewPro_libs_hooks_useCompRelation = require("../../libs/hooks/useCompRelation.js");
const __default__ = {
name: "u-grid-item",
options: {
addGlobalClass: true,
virtualHost: true,
styleIsolation: "shared"
}
};
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
...__default__,
props: uni_modules_uviewPro_components_uGridItem_types.GridItemProps,
emits: ["click"],
setup(__props, { expose: __expose, emit: __emit }) {
const props = __props;
const { parentExposed } = uni_modules_uviewPro_libs_hooks_useCompRelation.useChildren("u-grid-item", "u-grid");
const emit = __emit;
const hoverClass = common_vendor.computed(() => {
var _a, _b;
return ((_b = (_a = parentExposed == null ? void 0 : parentExposed.value) == null ? void 0 : _a.props) == null ? void 0 : _b.hoverClass) ?? "";
});
const border = common_vendor.computed(() => {
var _a, _b;
return ((_b = (_a = parentExposed == null ? void 0 : parentExposed.value) == null ? void 0 : _a.props) == null ? void 0 : _b.border) ?? true;
});
const col = common_vendor.computed(() => {
var _a, _b;
return ((_b = (_a = parentExposed == null ? void 0 : parentExposed.value) == null ? void 0 : _a.props) == null ? void 0 : _b.col) ?? 3;
});
const width = common_vendor.computed(() => 100 / Number(col.value) + "%");
function click() {
var _a;
emit("click", props.index);
(_a = parentExposed == null ? void 0 : parentExposed.value) == null ? void 0 : _a.click(props.index);
}
__expose({ click });
return (_ctx, _cache) => {
return {
a: common_vendor.s(_ctx.customStyle),
b: common_vendor.n(border.value ? "u-border-right u-border-bottom" : ""),
c: common_vendor.n(_ctx.customClass),
d: hoverClass.value,
e: common_vendor.o(click, "e0"),
f: common_vendor.s(common_vendor.unref(uni_modules_uviewPro_libs_index.$u).toStyle({
background: _ctx.bgColor,
width: width.value
}, _ctx.customStyle))
};
};
}
});
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-55059f9a"]]);
wx.createComponent(Component);
//# sourceMappingURL=../../../../../.sourcemap/mp-weixin/uni_modules/uview-pro/components/u-grid-item/u-grid-item.js.map
@@ -0,0 +1,4 @@
{
"component": true,
"usingComponents": {}
}
@@ -0,0 +1 @@
<view class="{{['u-grid-item', 'data-v-55059f9a', c]}}" hover-class="{{d}}" hover-stay-time="{{200}}" bindtap="{{e}}" style="{{f}}"><view style="{{a}}" class="{{['u-grid-item-box', 'data-v-55059f9a', b]}}"><slot/></view></view>
@@ -0,0 +1,104 @@
/**
* 这里是uni-app内置的常用样式变量
*
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
*
*/
/**
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
*
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
*/
.data-v-55059f9a:root,
page.data-v-55059f9a {
/* 纯色 */
--u-white-color: #ffffff;
--u-black-color: #000000;
--u-main-color: #303133;
--u-content-color: #606266;
--u-tips-color: #909399;
--u-light-color: #c0c4cc;
--u-border-color: #e4e7ed;
--u-divider-color: #e4e7ed;
--u-mask-color: rgba(0, 0, 0, 0.4);
--u-shadow-color: rgba(0, 0, 0, 0.1);
/* 背景色 */
--u-bg-color: #f3f4f6;
--u-bg-white: #ffffff;
--u-bg-gray-light: #f1f1f1;
--u-bg-gray-dark: #2f343c;
--u-bg-black: #000000;
/* 主色 */
--u-type-primary: #17447a;
--u-type-primary-light: #d5dde7;
--u-type-primary-disabled: #8fa6c3;
--u-type-primary-dark: #123662;
/* 警告色 */
--u-type-warning: #ff9900;
--u-type-warning-disabled: #fcbd71;
--u-type-warning-dark: #f29100;
--u-type-warning-light: #fdf6ec;
/* 成功色 */
--u-type-success: #19be6b;
--u-type-success-disabled: #71d5a1;
--u-type-success-dark: #18b566;
--u-type-success-light: #dbf1e1;
/* 错误色 */
--u-type-error: #fa3534;
--u-type-error-disabled: #fab6b6;
--u-type-error-dark: #dd6161;
--u-type-error-light: #fef0f0;
/* 信息色 */
--u-type-info: #909399;
--u-type-info-disabled: #c8c9cc;
--u-type-info-dark: #82848a;
--u-type-info-light: #f4f4f5;
}
/* 颜色变量 */
/* 行为相关颜色 */
/* 文字基本颜色 */
/* 背景颜色 */
/* 边框颜色 */
/* 尺寸变量 */
/* 文字尺寸 */
/* 图片尺寸 */
/* Border Radius */
/* 水平间距 */
/* 垂直间距 */
/* 透明度 */
/* 文章场景相关 */
.u-grid-item.data-v-55059f9a {
box-sizing: border-box;
background-color: var(--u-bg-white);
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
position: relative;
flex-direction: column;
position: relative;
float: left;
}
.u-grid-item-hover.data-v-55059f9a {
background: var(--u-bg-gray-light) !important;
}
.u-grid-marker-box.data-v-55059f9a {
position: absolute;
display: inline-flex;
line-height: 0;
}
.u-grid-marker-wrap.data-v-55059f9a {
position: absolute;
}
.u-grid-item-box.data-v-55059f9a {
padding: 30rpx 0;
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
flex-direction: column;
flex: 1;
width: 100%;
height: 100%;
}
@@ -0,0 +1,15 @@
"use strict";
const uni_modules_uviewPro_components_common_props = require("../common/props.js");
const GridProps = {
...uni_modules_uviewPro_components_common_props.baseProps,
/** 分成几列 */
col: { type: [Number, String], default: 3 },
/** 是否显示边框 */
border: { type: Boolean, default: true },
/** 宫格对齐方式,表现为数量少的时候,靠左,居中,还是靠右 */
align: { type: String, default: "left" },
/** 宫格按压时的样式类,"none"为无效果 */
hoverClass: { type: String, default: "u-hover-class" }
};
exports.GridProps = GridProps;
//# sourceMappingURL=../../../../../.sourcemap/mp-weixin/uni_modules/uview-pro/components/u-grid/types.js.map
@@ -0,0 +1,56 @@
"use strict";
const common_vendor = require("../../../../common/vendor.js");
const uni_modules_uviewPro_libs_index = require("../../libs/index.js");
require("../../libs/util/logger.js");
require("../../libs/config/theme-tokens.js");
const uni_modules_uviewPro_components_uGrid_types = require("./types.js");
const uni_modules_uviewPro_libs_hooks_useCompRelation = require("../../libs/hooks/useCompRelation.js");
const __default__ = {
name: "u-grid",
options: {
addGlobalClass: true,
virtualHost: true,
styleIsolation: "shared"
}
};
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
...__default__,
props: uni_modules_uviewPro_components_uGrid_types.GridProps,
emits: ["click"],
setup(__props, { expose: __expose, emit: __emit }) {
const props = __props;
const emit = __emit;
uni_modules_uviewPro_libs_hooks_useCompRelation.useParent("u-grid");
const gridStyle = common_vendor.computed(() => {
const style = {};
switch (props.align) {
case "left":
style.justifyContent = "flex-start";
break;
case "center":
style.justifyContent = "center";
break;
case "right":
style.justifyContent = "flex-end";
break;
default:
style.justifyContent = "flex-start";
}
return style;
});
function click(index) {
emit("click", index);
}
__expose({ click, props });
return (_ctx, _cache) => {
return {
a: _ctx.border ? 1 : "",
b: _ctx.customClass ? 1 : "",
c: common_vendor.s(common_vendor.unref(uni_modules_uviewPro_libs_index.$u).toStyle(gridStyle.value, _ctx.customStyle))
};
};
}
});
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-a828b844"]]);
wx.createComponent(Component);
//# sourceMappingURL=../../../../../.sourcemap/mp-weixin/uni_modules/uview-pro/components/u-grid/u-grid.js.map
@@ -0,0 +1,4 @@
{
"component": true,
"usingComponents": {}
}
@@ -0,0 +1 @@
<view class="{{['u-grid', 'data-v-a828b844', a && 'u-border-top u-border-left', b && 'customClass']}}" style="{{c}}"><slot/></view>
@@ -0,0 +1,77 @@
/**
* 这里是uni-app内置的常用样式变量
*
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
*
*/
/**
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
*
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
*/
.data-v-a828b844:root,
page.data-v-a828b844 {
/* 纯色 */
--u-white-color: #ffffff;
--u-black-color: #000000;
--u-main-color: #303133;
--u-content-color: #606266;
--u-tips-color: #909399;
--u-light-color: #c0c4cc;
--u-border-color: #e4e7ed;
--u-divider-color: #e4e7ed;
--u-mask-color: rgba(0, 0, 0, 0.4);
--u-shadow-color: rgba(0, 0, 0, 0.1);
/* 背景色 */
--u-bg-color: #f3f4f6;
--u-bg-white: #ffffff;
--u-bg-gray-light: #f1f1f1;
--u-bg-gray-dark: #2f343c;
--u-bg-black: #000000;
/* 主色 */
--u-type-primary: #17447a;
--u-type-primary-light: #d5dde7;
--u-type-primary-disabled: #8fa6c3;
--u-type-primary-dark: #123662;
/* 警告色 */
--u-type-warning: #ff9900;
--u-type-warning-disabled: #fcbd71;
--u-type-warning-dark: #f29100;
--u-type-warning-light: #fdf6ec;
/* 成功色 */
--u-type-success: #19be6b;
--u-type-success-disabled: #71d5a1;
--u-type-success-dark: #18b566;
--u-type-success-light: #dbf1e1;
/* 错误色 */
--u-type-error: #fa3534;
--u-type-error-disabled: #fab6b6;
--u-type-error-dark: #dd6161;
--u-type-error-light: #fef0f0;
/* 信息色 */
--u-type-info: #909399;
--u-type-info-disabled: #c8c9cc;
--u-type-info-dark: #82848a;
--u-type-info-light: #f4f4f5;
}
/* 颜色变量 */
/* 行为相关颜色 */
/* 文字基本颜色 */
/* 背景颜色 */
/* 边框颜色 */
/* 尺寸变量 */
/* 文字尺寸 */
/* 图片尺寸 */
/* Border Radius */
/* 水平间距 */
/* 垂直间距 */
/* 透明度 */
/* 文章场景相关 */
.u-grid.data-v-a828b844 {
width: 100%;
background-color: #ffffff;
position: relative;
box-sizing: border-box;
overflow: hidden;
}
@@ -0,0 +1,53 @@
"use strict";
const uni_modules_uviewPro_components_common_props = require("../common/props.js");
const IconProps = {
...uni_modules_uviewPro_components_common_props.baseProps,
/** 图标名称,见示例图标集 */
name: { type: String, default: "" },
/** 图标颜色,可接受主题色 */
color: { type: String, default: "" },
/** 字体大小,单位rpx(默认32) */
size: { type: [Number, String], default: "inherit" },
/** 是否显示粗体 */
bold: { type: Boolean, default: false },
/** 点击图标的时候传递事件出去的index(用于区分点击了哪一个) */
index: { type: [Number, String], default: "" },
/** 触摸图标时的类名 */
hoverClass: { type: String, default: "" },
/** 自定义扩展前缀,方便用户扩展自己的图标库 */
customPrefix: { type: String, default: "uicon" },
/** 图标右边或者下面的文字 */
label: { type: [String, Number], default: "" },
/** label的位置,只能右边或者下边 */
labelPos: { type: String, default: "right" },
/** label的大小,单位rpx(默认28 */
labelSize: { type: [String, Number], default: "28" },
/** label的颜色 */
labelColor: { type: String, default: "var(--u-content-color)" },
/** label与图标的距离(横向排列),单位rpx(默认6) */
marginLeft: { type: [String, Number], default: "6" },
/** label与图标的距离(竖向排列),单位rpx(默认6) */
marginTop: { type: [String, Number], default: "6" },
/** label与图标的距离(竖向排列),单位rpx(默认6) */
marginRight: { type: [String, Number], default: "6" },
/** label与图标的距离(竖向排列),单位rpx(默认6) */
marginBottom: { type: [String, Number], default: "6" },
/** label与图标的距离,单位rpx,权重高于 margin */
space: { type: [String, Number], default: "" },
/** 图片的mode,参考uni-app image组件 */
imgMode: { type: String, default: "widthFix" },
/** 用于显示图片小图标时,图片的宽度,单位rpx */
width: { type: [String, Number], default: "" },
/** 用于显示图片小图标时,图片的高度,单位rpx */
height: { type: [String, Number], default: "" },
/** 用于解决某些情况下,让图标垂直居中的用途,单位rpx */
top: { type: [String, Number], default: 0 },
/** 是否为DecimalIcon */
showDecimalIcon: { type: Boolean, default: false },
/** 背景颜色,可接受主题色,仅Decimal时有效 */
inactiveColor: { type: String, default: "var(--u-divider-color)" },
/** 显示的百分比,仅Decimal时有效 */
percent: { type: [Number, String], default: "50" }
};
exports.IconProps = IconProps;
//# sourceMappingURL=../../../../../.sourcemap/mp-weixin/uni_modules/uview-pro/components/u-icon/types.js.map
@@ -0,0 +1,139 @@
"use strict";
const common_vendor = require("../../../../common/vendor.js");
const uni_modules_uviewPro_libs_index = require("../../libs/index.js");
require("../../libs/util/logger.js");
require("../../libs/config/theme-tokens.js");
const uni_modules_uviewPro_components_uIcon_types = require("./types.js");
const __default__ = {
name: "u-icon",
options: {
addGlobalClass: true,
virtualHost: true,
styleIsolation: "shared"
}
};
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
...__default__,
props: uni_modules_uviewPro_components_uIcon_types.IconProps,
emits: ["click", "touchstart"],
setup(__props, { emit: __emit }) {
const emit = __emit;
const props = __props;
const iconClass = common_vendor.computed(() => {
let classes = [];
classes.push(props.customPrefix + "-" + props.name);
if (props.customPrefix === "uicon") {
classes.push("u-iconfont");
} else {
classes.push(props.customPrefix);
}
if (props.showDecimalIcon && props.inactiveColor && uni_modules_uviewPro_libs_index.$u.config.type.includes(props.inactiveColor)) {
classes.push("u-icon__icon--" + props.inactiveColor);
} else if (props.color && uni_modules_uviewPro_libs_index.$u.config.type.includes(props.color)) {
classes.push("u-icon__icon--" + props.color);
}
return classes;
});
const iconStyle = common_vendor.computed(() => {
const style = {
fontSize: props.size === "inherit" ? "inherit" : uni_modules_uviewPro_libs_index.$u.addUnit(props.size),
fontWeight: props.bold ? "bold" : "normal",
// 某些特殊情况需要设置一个到顶部的距离,才能更好的垂直居中
top: uni_modules_uviewPro_libs_index.$u.addUnit(props.top)
};
if (props.showDecimalIcon && props.inactiveColor && !uni_modules_uviewPro_libs_index.$u.config.type.includes(props.inactiveColor)) {
style.color = props.inactiveColor;
} else if (props.color && !uni_modules_uviewPro_libs_index.$u.config.type.includes(props.color)) {
style.color = props.color;
}
return style;
});
const isImg = common_vendor.computed(() => {
return props.name.indexOf("/") !== -1;
});
const imgStyle = common_vendor.computed(() => {
const style = {
width: props.width ? uni_modules_uviewPro_libs_index.$u.addUnit(props.width) : uni_modules_uviewPro_libs_index.$u.addUnit(props.size),
height: props.height ? uni_modules_uviewPro_libs_index.$u.addUnit(props.height) : uni_modules_uviewPro_libs_index.$u.addUnit(props.size)
};
return style;
});
const decimalIconStyle = common_vendor.computed(() => {
const style = {
fontSize: props.size === "inherit" ? "inherit" : uni_modules_uviewPro_libs_index.$u.addUnit(props.size),
fontWeight: props.bold ? "bold" : "normal",
// 某些特殊情况需要设置一个到顶部的距离,才能更好的垂直居中
top: uni_modules_uviewPro_libs_index.$u.addUnit(props.top),
width: props.percent + "%"
};
if (props.color && !uni_modules_uviewPro_libs_index.$u.config.type.includes(props.color)) {
style.color = props.color;
}
return style;
});
const decimalIconClass = common_vendor.computed(() => {
let classes = [];
classes.push(props.customPrefix + "-" + props.name);
if (props.customPrefix === "uicon") {
classes.push("u-iconfont");
} else {
classes.push(props.customPrefix);
}
if (props.color && uni_modules_uviewPro_libs_index.$u.config.type.includes(props.color)) {
classes.push("u-icon__icon--" + props.color);
} else {
classes.push("u-icon__icon--primary");
}
return classes;
});
const labelStyle = common_vendor.computed(() => {
return {
color: props.labelColor,
fontSize: uni_modules_uviewPro_libs_index.$u.addUnit(props.labelSize),
marginLeft: props.labelPos === "right" ? uni_modules_uviewPro_libs_index.$u.addUnit(props.space || props.marginLeft) : 0,
marginTop: props.labelPos === "bottom" ? uni_modules_uviewPro_libs_index.$u.addUnit(props.space || props.marginTop) : 0,
marginRight: props.labelPos === "left" ? uni_modules_uviewPro_libs_index.$u.addUnit(props.space || props.marginRight) : 0,
marginBottom: props.labelPos === "top" ? uni_modules_uviewPro_libs_index.$u.addUnit(props.space || props.marginBottom) : 0
};
});
function onClick(event) {
emit("click", props.index || event);
}
function onTouchstart(event) {
emit("touchstart", props.index || event);
}
return (_ctx, _cache) => {
return common_vendor.e({
a: isImg.value
}, isImg.value ? {
b: props.name,
c: _ctx.imgMode,
d: common_vendor.s(imgStyle.value)
} : common_vendor.e({
e: _ctx.showDecimalIcon
}, _ctx.showDecimalIcon ? {
f: common_vendor.s(common_vendor.unref(uni_modules_uviewPro_libs_index.$u).toStyle(decimalIconStyle.value)),
g: common_vendor.n(decimalIconClass.value),
h: _ctx.hoverClass
} : {}, {
i: common_vendor.n(iconClass.value),
j: common_vendor.s(common_vendor.unref(uni_modules_uviewPro_libs_index.$u).toStyle(iconStyle.value)),
k: _ctx.hoverClass,
l: common_vendor.o(onTouchstart, "b7")
}), {
m: _ctx.label !== ""
}, _ctx.label !== "" ? {
n: common_vendor.t(_ctx.label),
o: common_vendor.s(labelStyle.value)
} : {}, {
p: common_vendor.s(common_vendor.unref(uni_modules_uviewPro_libs_index.$u).toStyle(_ctx.customStyle)),
q: common_vendor.o(onClick, "37"),
r: common_vendor.n("u-icon--" + _ctx.labelPos),
s: common_vendor.n(_ctx.customClass)
});
};
}
});
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-b4d1c4b2"]]);
wx.createComponent(Component);
//# sourceMappingURL=../../../../../.sourcemap/mp-weixin/uni_modules/uview-pro/components/u-icon/u-icon.js.map
@@ -0,0 +1,4 @@
{
"component": true,
"usingComponents": {}
}
@@ -0,0 +1 @@
<view style="{{p}}" bindtap="{{q}}" class="{{['u-icon', 'data-v-b4d1c4b2', r, s]}}"><image wx:if="{{a}}" class="u-icon__img data-v-b4d1c4b2" src="{{b}}" mode="{{c}}" style="{{d}}"/><text wx:else class="{{['u-icon__icon', 'data-v-b4d1c4b2', i]}}" style="{{j}}" hover-class="{{k}}" bindtouchstart="{{l}}"><text wx:if="{{e}}" style="{{f}}" class="{{[g, 'u-icon__decimal', 'data-v-b4d1c4b2']}}" hover-class="{{h}}"></text></text><text wx:if="{{m}}" class="u-icon__label data-v-b4d1c4b2" style="{{o}}">{{n}}</text></view>
File diff suppressed because one or more lines are too long
@@ -0,0 +1,41 @@
"use strict";
const uni_modules_uviewPro_components_common_props = require("../common/props.js");
const ImageProps = {
...uni_modules_uviewPro_components_common_props.baseProps,
/** 图片地址 */
src: { type: String, default: "" },
/** 裁剪模式 */
mode: { type: String, default: "aspectFill" },
/** 宽度,单位任意,如果为数值,则为rpx单位(默认100%) */
width: { type: [String, Number], default: "100%" },
/** 高度,单位任意,如果为数值,则为rpx单位(默认 auto) */
height: { type: [String, Number], default: "auto" },
/** 图片形状,circle-圆形,square-方形(默认square */
shape: { type: String, default: "square" },
/** 圆角值,单位任意,如果为数值,则为rpx单位(默认 0) */
borderRadius: { type: [String, Number], default: 0 },
/** 是否懒加载,仅微信小程序、App、百度小程序、字节跳动小程序有效(默认 true) */
lazyLoad: { type: Boolean, default: true },
/** 是否开启长按图片显示识别小程序码菜单,仅微信小程序有效(默认 true) */
showMenuByLongpress: { type: Boolean, default: true },
/** 加载中的图标,或者小图片(默认 photo) */
loadingIcon: { type: String, default: "photo" },
/** 加载失败的图标,或者小图片(默认 error-circle */
errorIcon: { type: String, default: "error-circle" },
/** 是否显示加载中的图标或者自定义的slot(默认 true) */
showLoading: { type: Boolean, default: true },
/** 是否显示加载错误的图标或者自定义的slot(默认 true) */
showError: { type: Boolean, default: true },
/** 是否需要淡入效果(默认 true) */
fade: { type: Boolean, default: true },
/** 只支持网络资源,只对微信小程序有效(默认 false) */
webp: { type: Boolean, default: false },
/** 搭配fade参数的过渡时间,单位ms(默认 500) */
duration: { type: [String, Number], default: 500 },
/** 背景颜色,用于深色页面加载图片时,为了和背景色融合(默认 var(--u-bg-color) */
bgColor: { type: String, default: "var(--u-bg-color)" },
/** 使用插槽名称对象,用于自定义插槽,默认 undefined,当动态切换slot隐藏时,需要使用useSlots使用,兼容头条小程序 */
useSlots: { type: Object, default: void 0 }
};
exports.ImageProps = ImageProps;
//# sourceMappingURL=../../../../../.sourcemap/mp-weixin/uni_modules/uview-pro/components/u-image/types.js.map
@@ -0,0 +1,154 @@
"use strict";
const common_vendor = require("../../../../common/vendor.js");
const uni_modules_uviewPro_components_uImage_types = require("./types.js");
const uni_modules_uviewPro_libs_index = require("../../libs/index.js");
require("../../libs/util/logger.js");
require("../../libs/config/theme-tokens.js");
if (!Array) {
const _easycom_u_icon2 = common_vendor.resolveComponent("u-icon");
_easycom_u_icon2();
}
const _easycom_u_icon = () => "../u-icon/u-icon.js";
if (!Math) {
_easycom_u_icon();
}
const __default__ = {
name: "u-image",
options: {
addGlobalClass: true,
virtualHost: true,
styleIsolation: "shared"
}
};
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
...__default__,
props: uni_modules_uviewPro_components_uImage_types.ImageProps,
emits: ["click", "error", "load"],
setup(__props, { expose: __expose, emit: __emit }) {
const emit = __emit;
const props = __props;
const isError = common_vendor.ref(false);
const loading = common_vendor.ref(true);
const opacity = common_vendor.ref(1);
const durationTime = common_vendor.ref(props.duration);
const backgroundStyle = common_vendor.ref({});
common_vendor.watch(
() => props.src,
(n) => {
if (!n) {
isError.value = true;
loading.value = false;
} else {
isError.value = false;
loading.value = true;
}
},
{ immediate: true }
);
const wrapStyle = common_vendor.computed(() => {
let style = {};
style.width = uni_modules_uviewPro_libs_index.$u.addUnit(props.width);
style.height = uni_modules_uviewPro_libs_index.$u.addUnit(props.height);
style.borderRadius = props.shape === "circle" ? "50%" : uni_modules_uviewPro_libs_index.$u.addUnit(props.borderRadius);
style.overflow = Number(props.borderRadius) > 0 ? "hidden" : "visible";
if (props.fade) {
style.opacity = opacity.value;
style.transition = `opacity ${Number(durationTime.value) / 1e3}s ease-in-out`;
}
return style;
});
function onClick() {
emit("click");
}
function onErrorHandler(err) {
loading.value = false;
isError.value = true;
emit("error", err);
}
function onLoadHandler() {
loading.value = false;
isError.value = false;
emit("load");
if (!props.fade)
return removeBgColor();
opacity.value = 0;
durationTime.value = 0;
setTimeout(() => {
durationTime.value = props.duration;
opacity.value = 1;
setTimeout(() => {
removeBgColor();
}, Number(durationTime.value));
}, 50);
}
function removeBgColor() {
backgroundStyle.value = {
backgroundColor: "transparent"
};
}
function changeStatus(status) {
if (status === "loading") {
loading.value = true;
isError.value = false;
} else if (status === "error") {
loading.value = false;
isError.value = true;
} else {
loading.value = false;
isError.value = false;
}
}
const $slots = common_vendor.useSlots();
function hasSlot(name) {
return props.useSlots ? !!$slots[name] && props.useSlots[name] : !!$slots[name];
}
__expose({
changeStatus
});
return (_ctx, _cache) => {
return common_vendor.e({
a: !isError.value
}, !isError.value ? {
b: _ctx.src,
c: _ctx.mode,
d: common_vendor.o(onErrorHandler, "d0"),
e: common_vendor.o(onLoadHandler, "eb"),
f: _ctx.lazyLoad,
g: _ctx.showMenuByLongpress,
h: _ctx.shape === "circle" ? "50%" : common_vendor.unref(uni_modules_uviewPro_libs_index.$u).addUnit(_ctx.borderRadius)
} : {}, {
i: _ctx.showLoading && loading.value
}, _ctx.showLoading && loading.value ? common_vendor.e({
j: hasSlot("loading")
}, hasSlot("loading") ? {} : {
k: common_vendor.p({
name: _ctx.loadingIcon,
width: _ctx.width,
height: _ctx.height
})
}, {
l: _ctx.shape === "circle" ? "50%" : common_vendor.unref(uni_modules_uviewPro_libs_index.$u).addUnit(_ctx.borderRadius),
m: _ctx.bgColor
}) : {}, {
n: _ctx.showError && isError.value && !loading.value
}, _ctx.showError && isError.value && !loading.value ? common_vendor.e({
o: hasSlot("error")
}, hasSlot("error") ? {} : {
p: common_vendor.p({
name: _ctx.errorIcon,
width: _ctx.width,
height: _ctx.height
})
}, {
q: _ctx.shape === "circle" ? "50%" : common_vendor.unref(uni_modules_uviewPro_libs_index.$u).addUnit(_ctx.borderRadius)
}) : {}, {
r: common_vendor.o(onClick, "d8"),
s: common_vendor.s(common_vendor.unref(uni_modules_uviewPro_libs_index.$u).toStyle(wrapStyle.value, backgroundStyle.value, _ctx.customStyle)),
t: common_vendor.n(_ctx.customClass)
});
};
}
});
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-c4bf84b3"]]);
wx.createComponent(Component);
//# sourceMappingURL=../../../../../.sourcemap/mp-weixin/uni_modules/uview-pro/components/u-image/u-image.js.map
@@ -0,0 +1,6 @@
{
"component": true,
"usingComponents": {
"u-icon": "../u-icon/u-icon"
}
}
@@ -0,0 +1 @@
<view bindtap="{{r}}" style="{{s}}" class="{{['u-image', 'data-v-c4bf84b3', t]}}"><image wx:if="{{a}}" src="{{b}}" mode="{{c}}" binderror="{{d}}" bindload="{{e}}" lazy-load="{{f}}" class="u-image__image data-v-c4bf84b3" show-menu-by-longpress="{{g}}" style="{{'border-radius:' + h}}"></image><view wx:if="{{i}}" class="u-image__loading data-v-c4bf84b3" style="{{'border-radius:' + l + ';' + ('background-color:' + m)}}"><slot wx:if="{{j}}" name="loading"/><u-icon wx:else class="data-v-c4bf84b3" u-i="c4bf84b3-0" bind:__l="__l" u-p="{{k||''}}"></u-icon></view><view wx:if="{{n}}" class="u-image__error data-v-c4bf84b3" style="{{'border-radius:' + q}}"><slot wx:if="{{o}}" name="error"/><u-icon wx:else class="data-v-c4bf84b3" u-i="c4bf84b3-1" bind:__l="__l" u-p="{{p||''}}"></u-icon></view></view>
@@ -0,0 +1,92 @@
/**
* 这里是uni-app内置的常用样式变量
*
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
*
*/
/**
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
*
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
*/
.data-v-c4bf84b3:root,
page.data-v-c4bf84b3 {
/* 纯色 */
--u-white-color: #ffffff;
--u-black-color: #000000;
--u-main-color: #303133;
--u-content-color: #606266;
--u-tips-color: #909399;
--u-light-color: #c0c4cc;
--u-border-color: #e4e7ed;
--u-divider-color: #e4e7ed;
--u-mask-color: rgba(0, 0, 0, 0.4);
--u-shadow-color: rgba(0, 0, 0, 0.1);
/* 背景色 */
--u-bg-color: #f3f4f6;
--u-bg-white: #ffffff;
--u-bg-gray-light: #f1f1f1;
--u-bg-gray-dark: #2f343c;
--u-bg-black: #000000;
/* 主色 */
--u-type-primary: #17447a;
--u-type-primary-light: #d5dde7;
--u-type-primary-disabled: #8fa6c3;
--u-type-primary-dark: #123662;
/* 警告色 */
--u-type-warning: #ff9900;
--u-type-warning-disabled: #fcbd71;
--u-type-warning-dark: #f29100;
--u-type-warning-light: #fdf6ec;
/* 成功色 */
--u-type-success: #19be6b;
--u-type-success-disabled: #71d5a1;
--u-type-success-dark: #18b566;
--u-type-success-light: #dbf1e1;
/* 错误色 */
--u-type-error: #fa3534;
--u-type-error-disabled: #fab6b6;
--u-type-error-dark: #dd6161;
--u-type-error-light: #fef0f0;
/* 信息色 */
--u-type-info: #909399;
--u-type-info-disabled: #c8c9cc;
--u-type-info-dark: #82848a;
--u-type-info-light: #f4f4f5;
}
/* 颜色变量 */
/* 行为相关颜色 */
/* 文字基本颜色 */
/* 背景颜色 */
/* 边框颜色 */
/* 尺寸变量 */
/* 文字尺寸 */
/* 图片尺寸 */
/* Border Radius */
/* 水平间距 */
/* 垂直间距 */
/* 透明度 */
/* 文章场景相关 */
.u-image.data-v-c4bf84b3 {
position: relative;
transition: opacity 0.5s ease-in-out;
}
.u-image__image.data-v-c4bf84b3 {
width: 100%;
height: 100%;
}
.u-image__loading.data-v-c4bf84b3, .u-image__error.data-v-c4bf84b3 {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
background-color: var(--u-bg-color);
color: var(--u-tips-color);
font-size: 46rpx;
}
@@ -0,0 +1,27 @@
"use strict";
const uni_modules_uviewPro_components_common_props = require("../common/props.js");
const LoadingProps = {
...uni_modules_uviewPro_components_common_props.baseProps,
/** 动画的类型 */
mode: {
type: String,
default: "circle"
},
/** 动画的颜色 */
color: {
type: String,
default: "var(--u-light-color)"
},
/** 加载图标的大小,单位rpx */
size: {
type: [String, Number],
default: "34"
},
/** 是否显示动画 */
show: {
type: Boolean,
default: true
}
};
exports.LoadingProps = LoadingProps;
//# sourceMappingURL=../../../../../.sourcemap/mp-weixin/uni_modules/uview-pro/components/u-loading/types.js.map
@@ -0,0 +1,42 @@
"use strict";
const common_vendor = require("../../../../common/vendor.js");
const uni_modules_uviewPro_components_uLoading_types = require("./types.js");
const uni_modules_uviewPro_libs_index = require("../../libs/index.js");
require("../../libs/util/logger.js");
require("../../libs/config/theme-tokens.js");
const __default__ = {
name: "u-loading",
options: {
addGlobalClass: true,
virtualHost: true,
styleIsolation: "shared"
}
};
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
...__default__,
props: uni_modules_uviewPro_components_uLoading_types.LoadingProps,
setup(__props) {
const props = __props;
const cricleStyle = common_vendor.computed(() => {
let style = {};
style.width = props.size + "rpx";
style.height = props.size + "rpx";
if (props.mode === "circle") {
style.borderColor = `var(--u-divider-color) var(--u-divider-color) var(--u-divider-color) ${props.color ? props.color : "var(--u-light-color)"}`;
}
return style;
});
return (_ctx, _cache) => {
return common_vendor.e({
a: _ctx.show
}, _ctx.show ? {
b: common_vendor.n(_ctx.mode === "circle" ? "u-loading-circle" : "u-loading-flower"),
c: common_vendor.n(_ctx.customClass),
d: common_vendor.s(common_vendor.unref(uni_modules_uviewPro_libs_index.$u).toStyle(cricleStyle.value, _ctx.customStyle))
} : {});
};
}
});
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-a5d64378"]]);
wx.createComponent(Component);
//# sourceMappingURL=../../../../../.sourcemap/mp-weixin/uni_modules/uview-pro/components/u-loading/u-loading.js.map
@@ -0,0 +1,4 @@
{
"component": true,
"usingComponents": {}
}
@@ -0,0 +1 @@
<view wx:if="{{a}}" class="{{['u-loading', 'data-v-a5d64378', b, c]}}" style="{{d}}"></view>
@@ -0,0 +1,106 @@
/**
* 这里是uni-app内置的常用样式变量
*
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
*
*/
/**
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
*
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
*/
.data-v-a5d64378:root,
page.data-v-a5d64378 {
/* 纯色 */
--u-white-color: #ffffff;
--u-black-color: #000000;
--u-main-color: #303133;
--u-content-color: #606266;
--u-tips-color: #909399;
--u-light-color: #c0c4cc;
--u-border-color: #e4e7ed;
--u-divider-color: #e4e7ed;
--u-mask-color: rgba(0, 0, 0, 0.4);
--u-shadow-color: rgba(0, 0, 0, 0.1);
/* 背景色 */
--u-bg-color: #f3f4f6;
--u-bg-white: #ffffff;
--u-bg-gray-light: #f1f1f1;
--u-bg-gray-dark: #2f343c;
--u-bg-black: #000000;
/* 主色 */
--u-type-primary: #17447a;
--u-type-primary-light: #d5dde7;
--u-type-primary-disabled: #8fa6c3;
--u-type-primary-dark: #123662;
/* 警告色 */
--u-type-warning: #ff9900;
--u-type-warning-disabled: #fcbd71;
--u-type-warning-dark: #f29100;
--u-type-warning-light: #fdf6ec;
/* 成功色 */
--u-type-success: #19be6b;
--u-type-success-disabled: #71d5a1;
--u-type-success-dark: #18b566;
--u-type-success-light: #dbf1e1;
/* 错误色 */
--u-type-error: #fa3534;
--u-type-error-disabled: #fab6b6;
--u-type-error-dark: #dd6161;
--u-type-error-light: #fef0f0;
/* 信息色 */
--u-type-info: #909399;
--u-type-info-disabled: #c8c9cc;
--u-type-info-dark: #82848a;
--u-type-info-light: #f4f4f5;
}
/* 颜色变量 */
/* 行为相关颜色 */
/* 文字基本颜色 */
/* 背景颜色 */
/* 边框颜色 */
/* 尺寸变量 */
/* 文字尺寸 */
/* 图片尺寸 */
/* Border Radius */
/* 水平间距 */
/* 垂直间距 */
/* 透明度 */
/* 文章场景相关 */
.u-loading-circle.data-v-a5d64378 {
display: inline-flex;
vertical-align: middle;
width: 28rpx;
height: 28rpx;
background: 0 0;
border-radius: 50%;
border: 2px solid;
border-color: var(--u-divider-color) var(--u-divider-color) var(--u-divider-color) var(--u-tips-color);
animation: u-circle-a5d64378 1s linear infinite;
}
.u-loading-flower.data-v-a5d64378 {
width: 20px;
height: 20px;
display: inline-block;
vertical-align: middle;
animation: u-flower-a5d64378 1s steps(12) infinite;
background: transparent url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMjAiIGhlaWdodD0iMTIwIiB2aWV3Qm94PSIwIDAgMTAwIDEwMCI+PHBhdGggZmlsbD0ibm9uZSIgZD0iTTAgMGgxMDB2MTAwSDB6Ii8+PHJlY3Qgd2lkdGg9IjciIGhlaWdodD0iMjAiIHg9IjQ2LjUiIHk9IjQwIiBmaWxsPSIjRTlFOUU5IiByeD0iNSIgcnk9IjUiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDAgLTMwKSIvPjxyZWN0IHdpZHRoPSI3IiBoZWlnaHQ9IjIwIiB4PSI0Ni41IiB5PSI0MCIgZmlsbD0iIzk4OTY5NyIgcng9IjUiIHJ5PSI1IiB0cmFuc2Zvcm09InJvdGF0ZSgzMCAxMDUuOTggNjUpIi8+PHJlY3Qgd2lkdGg9IjciIGhlaWdodD0iMjAiIHg9IjQ2LjUiIHk9IjQwIiBmaWxsPSIjOUI5OTlBIiByeD0iNSIgcnk9IjUiIHRyYW5zZm9ybT0icm90YXRlKDYwIDc1Ljk4IDY1KSIvPjxyZWN0IHdpZHRoPSI3IiBoZWlnaHQ9IjIwIiB4PSI0Ni41IiB5PSI0MCIgZmlsbD0iI0EzQTFBMiIgcng9IjUiIHJ5PSI1IiB0cmFuc2Zvcm09InJvdGF0ZSg5MCA2NSA2NSkiLz48cmVjdCB3aWR0aD0iNyIgaGVpZ2h0PSIyMCIgeD0iNDYuNSIgeT0iNDAiIGZpbGw9IiNBQkE5QUEiIHJ4PSI1IiByeT0iNSIgdHJhbnNmb3JtPSJyb3RhdGUoMTIwIDU4LjY2IDY1KSIvPjxyZWN0IHdpZHRoPSI3IiBoZWlnaHQ9IjIwIiB4PSI0Ni41IiB5PSI0MCIgZmlsbD0iI0IyQjJCMiIgcng9IjUiIHJ5PSI1IiB0cmFuc2Zvcm09InJvdGF0ZSgxNTAgNTQuMDIgNjUpIi8+PHJlY3Qgd2lkdGg9IjciIGhlaWdodD0iMjAiIHg9IjQ2LjUiIHk9IjQwIiBmaWxsPSIjQkFCOEI5IiByeD0iNSIgcnk9IjUiIHRyYW5zZm9ybT0icm90YXRlKDE4MCA1MCA2NSkiLz48cmVjdCB3aWR0aD0iNyIgaGVpZ2h0PSIyMCIgeD0iNDYuNSIgeT0iNDAiIGZpbGw9IiNDMkMwQzEiIHJ4PSI1IiByeT0iNSIgdHJhbnNmb3JtPSJyb3RhdGUoLTE1MCA0NS45OCA2NSkiLz48cmVjdCB3aWR0aD0iNyIgaGVpZ2h0PSIyMCIgeD0iNDYuNSIgeT0iNDAiIGZpbGw9IiNDQkNCQ0IiIHJ4PSI1IiByeT0iNSIgdHJhbnNmb3JtPSJyb3RhdGUoLTEyMCA0MS4zNCA2NSkiLz48cmVjdCB3aWR0aD0iNyIgaGVpZ2h0PSIyMCIgeD0iNDYuNSIgeT0iNDAiIGZpbGw9IiNEMkQyRDIiIHJ4PSI1IiByeT0iNSIgdHJhbnNmb3JtPSJyb3RhdGUoLTkwIDM1IDY1KSIvPjxyZWN0IHdpZHRoPSI3IiBoZWlnaHQ9IjIwIiB4PSI0Ni41IiB5PSI0MCIgZmlsbD0iI0RBREFEQSIgcng9IjUiIHJ5PSI1IiB0cmFuc2Zvcm09InJvdGF0ZSgtNjAgMjQuMDIgNjUpIi8+PHJlY3Qgd2lkdGg9IjciIGhlaWdodD0iMjAiIHg9IjQ2LjUiIHk9IjQwIiBmaWxsPSIjRTJFMkUyIiByeD0iNSIgcnk9IjUiIHRyYW5zZm9ybT0icm90YXRlKC0zMCAtNS45OCA2NSkiLz48L3N2Zz4=) no-repeat;
background-size: 100%;
}
@keyframes u-flower-a5d64378 {
0% {
transform: rotate(0deg);
}
to {
transform: rotate(1turn);
}
}
@keyframes u-circle-a5d64378 {
0% {
transform: rotate(0);
}
100% {
transform: rotate(360deg);
}
}
@@ -0,0 +1,2 @@
"use strict";
//# sourceMappingURL=../../../../../.sourcemap/mp-weixin/uni_modules/uview-pro/components/u-modal/service.js.map
@@ -0,0 +1,57 @@
"use strict";
const uni_modules_uviewPro_components_common_props = require("../common/props.js");
require("../../../../common/vendor.js");
require("../../libs/index.js");
require("../../libs/util/logger.js");
require("../../libs/config/theme-tokens.js");
const uni_modules_uviewPro_libs_hooks_useLocale = require("../../libs/hooks/useLocale.js");
const { t } = uni_modules_uviewPro_libs_hooks_useLocale.useLocale();
const SearchProps = {
...uni_modules_uviewPro_components_common_props.baseProps,
/** 搜索框形状,round-圆形,square-方形 */
shape: { type: String, default: "round" },
/** 搜索框背景色,默认值var(--u-bg-gray-light) */
bgColor: { type: String, default: "var(--u-bg-gray-light)" },
/** 占位提示文字 */
placeholder: { type: String, default: () => t("uSearch.placeholder") },
/** 是否启用清除控件 */
clearabled: { type: Boolean, default: true },
/** 是否自动聚焦 */
focus: { type: Boolean, default: false },
/** 是否在搜索框右侧显示取消按钮 */
showAction: { type: Boolean, default: true },
/** 右边控件的样式 */
actionStyle: { type: Object, default: () => ({}) },
/** 取消按钮文字 */
actionText: { type: String, default: () => t("uSearch.actionText") },
/** 输入框内容对齐方式,可选值为 left|center|right */
inputAlign: { type: String, default: "left" },
/** 是否启用输入框 */
disabled: { type: Boolean, default: false },
/** 开启showAction时,是否在input获取焦点时才显示 */
animation: { type: Boolean, default: false },
/** 边框颜色,只要配置了颜色,才会有边框 */
borderColor: { type: String, default: "none" },
/** 输入框的初始化内容 */
modelValue: { type: String, default: "" },
/** 搜索框高度,单位rpx */
height: { type: [Number, String], default: 64 },
/** input输入框的样式,可以定义文字颜色,大小等,对象形式 */
inputStyle: { type: Object, default: () => ({}) },
/** 输入框最大能输入的长度,-1为不限制长度(来自uniapp文档) */
maxlength: { type: [Number, String], default: "-1" },
/** 搜索图标的颜色,默认同输入框字体颜色 */
searchIconColor: { type: String, default: "" },
/** 输入框字体颜色 */
color: { type: String, default: "var(--u-content-color)" },
/** placeholder的颜色 */
placeholderColor: { type: String, default: "var(--u-tips-color)" },
/** 组件与其他上下左右元素之间的距离,带单位的字符串形式,如"30rpx"、"30rpx 20rpx"等写法 */
margin: { type: String, default: "0" },
/** 左边输入框的图标,可以为uView图标名称或图片路径 */
searchIcon: { type: String, default: "search" },
/** 弹出键盘时是否自动调节高度,uni-app默认值是true */
adjustPosition: { type: Boolean, default: true }
};
exports.SearchProps = SearchProps;
//# sourceMappingURL=../../../../../.sourcemap/mp-weixin/uni_modules/uview-pro/components/u-search/types.js.map
@@ -0,0 +1,159 @@
"use strict";
const common_vendor = require("../../../../common/vendor.js");
const uni_modules_uviewPro_components_uSearch_types = require("./types.js");
const uni_modules_uviewPro_libs_index = require("../../libs/index.js");
require("../../libs/util/logger.js");
require("../../libs/config/theme-tokens.js");
if (!Array) {
const _easycom_u_icon2 = common_vendor.resolveComponent("u-icon");
_easycom_u_icon2();
}
const _easycom_u_icon = () => "../u-icon/u-icon.js";
if (!Math) {
_easycom_u_icon();
}
const __default__ = {
name: "u-search",
options: {
addGlobalClass: true,
virtualHost: true,
styleIsolation: "shared"
}
};
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
...__default__,
props: uni_modules_uviewPro_components_uSearch_types.SearchProps,
emits: [
"update:modelValue",
"input",
"change",
"search",
"custom",
"clear",
"focus",
"blur",
"click"
],
setup(__props, { emit: __emit }) {
const props = __props;
const emit = __emit;
const keyword = common_vendor.ref(props.modelValue);
common_vendor.ref(false);
const show = common_vendor.ref(false);
const focused = common_vendor.ref(props.focus);
common_vendor.watch(
() => props.modelValue,
(nVal) => {
keyword.value = nVal;
}
);
common_vendor.watch(keyword, (nVal) => {
emit("update:modelValue", nVal);
emit("input", nVal);
emit("change", nVal);
});
const showActionBtn = common_vendor.computed(() => {
if (!props.animation && props.showAction)
return true;
else
return false;
});
const borderStyle = common_vendor.computed(() => {
if (props.borderColor)
return `1px solid ${props.borderColor}`;
else
return "none";
});
function inputChange(e) {
keyword.value = e.detail.value;
}
function clear() {
keyword.value = "";
common_vendor.nextTick$1(() => {
emit("clear");
});
}
function search(e) {
emit("search", e.detail.value);
try {
common_vendor.index.hideKeyboard();
} catch (e2) {
}
}
function custom() {
emit("custom", keyword.value);
try {
common_vendor.index.hideKeyboard();
} catch (e) {
}
}
function getFocus() {
focused.value = true;
if (props.animation && props.showAction)
show.value = true;
emit("focus", keyword.value);
}
function blur() {
setTimeout(() => {
focused.value = false;
}, 100);
show.value = false;
emit("blur", keyword.value);
}
function clickHandler() {
if (props.disabled)
emit("click");
}
return (_ctx, _cache) => {
return common_vendor.e({
a: common_vendor.p({
size: 30,
name: _ctx.searchIcon,
color: _ctx.searchIconColor ? _ctx.searchIconColor : _ctx.color
}),
b: common_vendor.o(blur, "3b"),
c: _ctx.modelValue,
d: common_vendor.o(search, "c7"),
e: common_vendor.o(inputChange, "c6"),
f: common_vendor.o(getFocus, "a0"),
g: _ctx.focus,
h: Number(_ctx.maxlength),
i: _ctx.placeholder,
j: `color: ${_ctx.placeholderColor}`,
k: _ctx.adjustPosition,
l: common_vendor.s({
textAlign: _ctx.inputAlign,
color: _ctx.color,
backgroundColor: _ctx.bgColor,
pointerEvents: _ctx.disabled ? "none" : "auto"
}),
m: common_vendor.s(_ctx.inputStyle),
n: keyword.value && _ctx.clearabled && focused.value
}, keyword.value && _ctx.clearabled && focused.value ? {
o: common_vendor.p({
name: "close-circle-fill",
size: "34",
color: "var(--u-light-color)"
}),
p: common_vendor.o(clear, "44")
} : {}, {
q: _ctx.bgColor,
r: _ctx.shape == "round" ? "100rpx" : "10rpx",
s: borderStyle.value,
t: _ctx.height + "rpx",
v: common_vendor.t(_ctx.actionText),
w: common_vendor.s(_ctx.actionStyle),
x: common_vendor.n(showActionBtn.value || show.value ? "u-action-active" : ""),
y: common_vendor.o(custom, "38"),
z: common_vendor.o(clickHandler, "a9"),
A: common_vendor.n(_ctx.customClass),
B: common_vendor.s(common_vendor.unref(uni_modules_uviewPro_libs_index.$u).toStyle({
margin: _ctx.margin
}, _ctx.customStyle))
});
};
}
});
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-f0201178"]]);
wx.createComponent(Component);
//# sourceMappingURL=../../../../../.sourcemap/mp-weixin/uni_modules/uview-pro/components/u-search/u-search.js.map
@@ -0,0 +1,6 @@
{
"component": true,
"usingComponents": {
"u-icon": "../u-icon/u-icon"
}
}
@@ -0,0 +1 @@
<view bindtap="{{z}}" class="{{['u-search', 'data-v-f0201178', A]}}" style="{{B}}"><view class="u-content data-v-f0201178" style="{{'background-color:' + q + ';' + ('border-radius:' + r) + ';' + ('border:' + s) + ';' + ('height:' + t)}}"><view class="u-icon-wrap data-v-f0201178"><u-icon wx:if="{{a}}" class="u-clear-icon data-v-f0201178" u-i="f0201178-0" bind:__l="__l" u-p="{{a}}"></u-icon></view><input confirm-type="search" bindblur="{{b}}" value="{{c}}" bindconfirm="{{d}}" bindinput="{{e}}" bindfocus="{{f}}" focus="{{g}}" maxlength="{{h}}" placeholder-class="u-placeholder-class" placeholder="{{i}}" placeholder-style="{{j}}" adjust-position="{{k}}" class="u-input data-v-f0201178" type="text" style="{{l + ';' + m}}"/><view wx:if="{{n}}" class="u-close-wrap data-v-f0201178" bindtap="{{p}}"><u-icon wx:if="{{o}}" class="u-clear-icon data-v-f0201178" u-i="f0201178-1" bind:__l="__l" u-p="{{o}}"></u-icon></view></view><view style="{{w}}" class="{{['u-action', 'data-v-f0201178', x]}}" catchtap="{{y}}">{{v}}</view></view>
@@ -0,0 +1,120 @@
/**
* 这里是uni-app内置的常用样式变量
*
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
*
*/
/**
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
*
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
*/
.data-v-f0201178:root,
page.data-v-f0201178 {
/* 纯色 */
--u-white-color: #ffffff;
--u-black-color: #000000;
--u-main-color: #303133;
--u-content-color: #606266;
--u-tips-color: #909399;
--u-light-color: #c0c4cc;
--u-border-color: #e4e7ed;
--u-divider-color: #e4e7ed;
--u-mask-color: rgba(0, 0, 0, 0.4);
--u-shadow-color: rgba(0, 0, 0, 0.1);
/* 背景色 */
--u-bg-color: #f3f4f6;
--u-bg-white: #ffffff;
--u-bg-gray-light: #f1f1f1;
--u-bg-gray-dark: #2f343c;
--u-bg-black: #000000;
/* 主色 */
--u-type-primary: #17447a;
--u-type-primary-light: #d5dde7;
--u-type-primary-disabled: #8fa6c3;
--u-type-primary-dark: #123662;
/* 警告色 */
--u-type-warning: #ff9900;
--u-type-warning-disabled: #fcbd71;
--u-type-warning-dark: #f29100;
--u-type-warning-light: #fdf6ec;
/* 成功色 */
--u-type-success: #19be6b;
--u-type-success-disabled: #71d5a1;
--u-type-success-dark: #18b566;
--u-type-success-light: #dbf1e1;
/* 错误色 */
--u-type-error: #fa3534;
--u-type-error-disabled: #fab6b6;
--u-type-error-dark: #dd6161;
--u-type-error-light: #fef0f0;
/* 信息色 */
--u-type-info: #909399;
--u-type-info-disabled: #c8c9cc;
--u-type-info-dark: #82848a;
--u-type-info-light: #f4f4f5;
}
/* 颜色变量 */
/* 行为相关颜色 */
/* 文字基本颜色 */
/* 背景颜色 */
/* 边框颜色 */
/* 尺寸变量 */
/* 文字尺寸 */
/* 图片尺寸 */
/* Border Radius */
/* 水平间距 */
/* 垂直间距 */
/* 透明度 */
/* 文章场景相关 */
.u-search.data-v-f0201178 {
display: flex;
flex-direction: row;
align-items: center;
flex: 1;
}
.u-content.data-v-f0201178 {
display: flex;
flex-direction: row;
align-items: center;
padding: 0 18rpx;
flex: 1;
}
.u-clear-icon.data-v-f0201178 {
display: flex;
flex-direction: row;
align-items: center;
}
.u-input.data-v-f0201178 {
flex: 1;
font-size: 28rpx;
line-height: 1;
margin: 0 10rpx;
color: var(--u-tips-color);
}
.u-close-wrap.data-v-f0201178 {
width: 40rpx;
height: 100%;
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
border-radius: 50%;
}
.u-placeholder-class.data-v-f0201178 {
color: var(--u-tips-color);
}
.u-action.data-v-f0201178 {
font-size: 28rpx;
color: var(--u-main-color);
width: 0;
overflow: hidden;
transition: all 0.3s;
white-space: nowrap;
text-align: center;
}
.u-action-active.data-v-f0201178 {
width: 80rpx;
margin-left: 10rpx;
}
@@ -0,0 +1,20 @@
"use strict";
const uni_modules_uviewPro_components_common_props = require("../common/props.js");
const uni_modules_uviewPro_libs_config_zIndex = require("../../libs/config/zIndex.js");
const StickyProps = {
...uni_modules_uviewPro_components_common_props.baseProps,
/** 吸顶容器到顶部某个距离的时候,进行吸顶,在H5平台,NavigationBar为44px */
offsetTop: { type: [Number, String], default: 0 },
/** 列表中的索引值 */
index: { type: [Number, String], default: "" },
/** 是否开启吸顶功能 */
enable: { type: Boolean, default: true },
/** h5顶部导航栏的高度 */
h5NavHeight: { type: [Number, String], default: 44 },
/** 吸顶区域的背景颜色 */
bgColor: { type: String, default: "var(--u-bg-white)" },
/** z-index值 */
zIndex: { type: [Number, String], default: uni_modules_uviewPro_libs_config_zIndex.zIndex.sticky }
};
exports.StickyProps = StickyProps;
//# sourceMappingURL=../../../../../.sourcemap/mp-weixin/uni_modules/uview-pro/components/u-sticky/types.js.map
@@ -0,0 +1,119 @@
"use strict";
const common_vendor = require("../../../../common/vendor.js");
const uni_modules_uviewPro_libs_index = require("../../libs/index.js");
require("../../libs/util/logger.js");
require("../../libs/config/theme-tokens.js");
const uni_modules_uviewPro_components_uSticky_types = require("./types.js");
const __default__ = {
name: "u-sticky",
options: {
addGlobalClass: true,
virtualHost: true,
styleIsolation: "shared"
}
};
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
...__default__,
props: uni_modules_uviewPro_components_uSticky_types.StickyProps,
emits: ["fixed", "unfixed"],
setup(__props, { emit: __emit }) {
const props = __props;
const emit = __emit;
const instance = common_vendor.getCurrentInstance();
const fixed = common_vendor.ref(false);
const height = common_vendor.ref("auto");
const stickyTop = common_vendor.ref(0);
const elClass = common_vendor.ref("");
const left = common_vendor.ref(0);
const width = common_vendor.ref("auto");
let contentObserver = null;
elClass.value = uni_modules_uviewPro_libs_index.$u.guid();
const uZIndex = common_vendor.computed(() => {
var _a, _b;
return props.zIndex ? props.zIndex : ((_b = (_a = uni_modules_uviewPro_libs_index.$u) == null ? void 0 : _a.zIndex) == null ? void 0 : _b.sticky) ?? 970;
});
common_vendor.watch(
() => props.offsetTop,
() => {
initObserver();
}
);
common_vendor.watch(
() => props.enable,
(val) => {
if (val == false) {
fixed.value = false;
disconnectObserver("contentObserver");
} else {
initObserver();
}
}
);
common_vendor.onMounted(() => {
initObserver();
});
common_vendor.onBeforeUnmount(() => {
disconnectObserver("contentObserver");
});
function initObserver() {
if (!props.enable)
return;
stickyTop.value = Number(props.offsetTop) !== 0 ? common_vendor.index.upx2px(Number(props.offsetTop)) : 0;
disconnectObserver("contentObserver");
uni_modules_uviewPro_libs_index.$u.getRect("." + elClass.value, instance).then((res) => {
height.value = res.height;
left.value = res.left;
width.value = res.width;
common_vendor.nextTick$1(() => {
observeContent();
});
});
}
function observeContent() {
disconnectObserver("contentObserver");
contentObserver = common_vendor.index.createIntersectionObserver(instance == null ? void 0 : instance.proxy, {
thresholds: [0.95, 0.98, 1]
});
contentObserver.relativeToViewport({
top: -stickyTop.value
});
contentObserver.observe("." + elClass.value, (res) => {
if (!props.enable)
return;
setFixed(res.boundingClientRect.top);
});
}
function setFixed(top) {
const isFixed = top < stickyTop.value;
if (isFixed)
emit("fixed", props.index);
else if (fixed.value)
emit("unfixed", props.index);
fixed.value = isFixed;
}
function disconnectObserver(observerName) {
if (observerName === "contentObserver" && contentObserver) {
contentObserver.disconnect();
contentObserver = null;
}
}
return (_ctx, _cache) => {
return {
a: fixed.value ? "fixed" : "static",
b: stickyTop.value + "px",
c: left.value + "px",
d: width.value == "auto" ? "auto" : width.value + "px",
e: uZIndex.value,
f: common_vendor.n(elClass.value),
g: common_vendor.n(_ctx.customClass),
h: common_vendor.s(common_vendor.unref(uni_modules_uviewPro_libs_index.$u).toStyle({
height: fixed.value ? height.value + "px" : "auto",
backgroundColor: _ctx.bgColor
}, _ctx.customStyle))
};
};
}
});
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-7f30e390"]]);
wx.createComponent(Component);
//# sourceMappingURL=../../../../../.sourcemap/mp-weixin/uni_modules/uview-pro/components/u-sticky/u-sticky.js.map
@@ -0,0 +1,4 @@
{
"component": true,
"usingComponents": {}
}
@@ -0,0 +1 @@
<view class="data-v-7f30e390"><view class="{{['u-sticky-wrap', 'data-v-7f30e390', f, g]}}" style="{{h}}"><view class="u-sticky data-v-7f30e390" style="{{'position:' + a + ';' + ('top:' + b) + ';' + ('left:' + c) + ';' + ('width:' + d) + ';' + ('z-index:' + e)}}"><slot></slot></view></view></view>
@@ -0,0 +1,73 @@
/**
* 这里是uni-app内置的常用样式变量
*
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
*
*/
/**
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
*
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
*/
.data-v-7f30e390:root,
page.data-v-7f30e390 {
/* 纯色 */
--u-white-color: #ffffff;
--u-black-color: #000000;
--u-main-color: #303133;
--u-content-color: #606266;
--u-tips-color: #909399;
--u-light-color: #c0c4cc;
--u-border-color: #e4e7ed;
--u-divider-color: #e4e7ed;
--u-mask-color: rgba(0, 0, 0, 0.4);
--u-shadow-color: rgba(0, 0, 0, 0.1);
/* 背景色 */
--u-bg-color: #f3f4f6;
--u-bg-white: #ffffff;
--u-bg-gray-light: #f1f1f1;
--u-bg-gray-dark: #2f343c;
--u-bg-black: #000000;
/* 主色 */
--u-type-primary: #17447a;
--u-type-primary-light: #d5dde7;
--u-type-primary-disabled: #8fa6c3;
--u-type-primary-dark: #123662;
/* 警告色 */
--u-type-warning: #ff9900;
--u-type-warning-disabled: #fcbd71;
--u-type-warning-dark: #f29100;
--u-type-warning-light: #fdf6ec;
/* 成功色 */
--u-type-success: #19be6b;
--u-type-success-disabled: #71d5a1;
--u-type-success-dark: #18b566;
--u-type-success-light: #dbf1e1;
/* 错误色 */
--u-type-error: #fa3534;
--u-type-error-disabled: #fab6b6;
--u-type-error-dark: #dd6161;
--u-type-error-light: #fef0f0;
/* 信息色 */
--u-type-info: #909399;
--u-type-info-disabled: #c8c9cc;
--u-type-info-dark: #82848a;
--u-type-info-light: #f4f4f5;
}
/* 颜色变量 */
/* 行为相关颜色 */
/* 文字基本颜色 */
/* 背景颜色 */
/* 边框颜色 */
/* 尺寸变量 */
/* 文字尺寸 */
/* 图片尺寸 */
/* Border Radius */
/* 水平间距 */
/* 垂直间距 */
/* 透明度 */
/* 文章场景相关 */
.u-sticky.data-v-7f30e390 {
z-index: 9999999999;
}
@@ -0,0 +1,31 @@
"use strict";
const uni_modules_uviewPro_components_common_props = require("../common/props.js");
const SubsectionProps = {
...uni_modules_uviewPro_components_common_props.baseProps,
/** tab的数据 */
list: { type: Array, default: () => [] },
/** 当前活动的tab的index */
current: { type: [Number, String], default: 0 },
/** 激活的颜色 */
activeColor: { type: String, default: "var(--u-main-color)" },
/** 未激活的颜色 */
inactiveColor: { type: String, default: "var(--u-content-color)" },
/** 模式选择,mode=button为按钮形式,mode=subsection时为分段模式 */
mode: { type: String, default: "button" },
/** 字体大小,单位rpx */
fontSize: { type: [Number, String], default: 28 },
/** 是否开启动画效果 */
animation: { type: Boolean, default: true },
/** 组件的高度,单位rpx */
height: { type: [Number, String], default: 70 },
/** 激活tab的字体是否加粗 */
bold: { type: Boolean, default: true },
/** mode=button时,组件背景颜色 */
bgColor: { type: String, default: "var(--u-divider-color)" },
/** mode = button时,滑块背景颜色 */
buttonColor: { type: String, default: "var(--u-bg-white)" },
/** 在切换分段器的时候,是否让设备震一下 */
vibrateShort: { type: Boolean, default: false }
};
exports.SubsectionProps = SubsectionProps;
//# sourceMappingURL=../../../../../.sourcemap/mp-weixin/uni_modules/uview-pro/components/u-subsection/types.js.map
@@ -0,0 +1,228 @@
"use strict";
const common_vendor = require("../../../../common/vendor.js");
const uni_modules_uviewPro_libs_index = require("../../libs/index.js");
require("../../libs/util/logger.js");
require("../../libs/config/theme-tokens.js");
const uni_modules_uviewPro_components_uSubsection_types = require("./types.js");
const __default__ = {
name: "u-subsection",
options: {
addGlobalClass: true,
virtualHost: true,
styleIsolation: "shared"
}
};
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
...__default__,
props: uni_modules_uviewPro_components_uSubsection_types.SubsectionProps,
emits: ["change"],
setup(__props, { emit: __emit }) {
const props = __props;
const emit = __emit;
const listInfo = common_vendor.ref([]);
const itemBgStyle = common_vendor.ref({
width: 0,
left: 0,
backgroundColor: "var(--u-bg-white)",
height: "100%",
transition: ""
});
const currentIndex = common_vendor.ref(Number(props.current));
const buttonPadding = 3;
const borderRadius = 5;
const firstTimeVibrateShort = common_vendor.ref(true);
const instanceId = uni_modules_uviewPro_libs_index.$u.guid();
const instance = common_vendor.getCurrentInstance();
common_vendor.watch(
() => props.current,
(nVal) => {
currentIndex.value = Number(nVal);
changeSectionStatus(currentIndex.value);
},
{ immediate: true }
);
common_vendor.watch(
() => props.list,
() => {
if (!props.list || !props.list.length)
return;
initListInfo();
common_vendor.nextTick$1(() => {
setTimeout(() => {
getTabsInfo();
}, 10);
});
},
{ deep: true, immediate: true }
);
common_vendor.watch(
() => props.mode,
() => {
common_vendor.nextTick$1(() => {
setTimeout(() => {
getTabsInfo();
}, 10);
});
}
);
function initListInfo() {
listInfo.value = props.list.map((val) => {
if (typeof val !== "object") {
return { width: 0, name: val };
} else {
return { ...val, width: 0 };
}
});
}
const noBorderRight = common_vendor.computed(() => {
return (index) => {
if (props.mode !== "subsection")
return "";
let classs = "";
if (index < props.list.length - 1)
classs += " u-none-border-right";
if (index === 0)
classs += " u-item-first";
if (index === props.list.length - 1)
classs += " u-item-last";
return classs;
};
});
const textStyle = common_vendor.computed(() => {
return (index) => {
const style = {};
if (props.mode === "subsection") {
style.color = index === currentIndex.value ? "var(--u-white-color)" : props.activeColor;
} else {
style.color = index === currentIndex.value ? props.activeColor : props.inactiveColor;
}
if (index === currentIndex.value && props.bold)
style.fontWeight = "bold";
style.fontSize = props.fontSize + "rpx";
return style;
};
});
const itemStyle = common_vendor.computed(() => {
return (index) => {
const style = {};
if (props.mode === "subsection") {
style.borderColor = props.activeColor;
style.borderWidth = "1px";
style.borderStyle = "solid";
}
return style;
};
});
const subsectionStyle = common_vendor.computed(() => {
const style = {};
style.height = common_vendor.index.upx2px(Number(props.height)) + "px";
if (props.mode === "button") {
style.backgroundColor = props.bgColor;
style.padding = `${buttonPadding}px`;
style.borderRadius = `${borderRadius}px`;
}
return style;
});
const itemBarStyle = common_vendor.computed(() => {
const style = {};
style.backgroundColor = props.activeColor;
style.zIndex = 1;
if (props.mode === "button") {
style.backgroundColor = props.buttonColor;
style.borderRadius = `${borderRadius}px`;
style.bottom = `${buttonPadding}px`;
style.height = common_vendor.index.upx2px(Number(props.height)) - buttonPadding * 2 + "px";
style.zIndex = 0;
}
return Object.assign({}, itemBgStyle.value, style);
});
function changeSectionStatus(nVal) {
if (props.mode === "subsection") {
if (nVal === props.list.length - 1) {
itemBgStyle.value.borderRadius = `0 ${buttonPadding}px ${buttonPadding}px 0`;
}
if (nVal === 0) {
itemBgStyle.value.borderRadius = `${buttonPadding}px 0 0 ${buttonPadding}px`;
}
if (nVal > 0 && nVal < props.list.length - 1) {
itemBgStyle.value.borderRadius = "0";
}
}
setTimeout(() => {
itemBgLeft();
}, 10);
if (props.vibrateShort && !firstTimeVibrateShort.value) {
common_vendor.index.vibrateShort();
}
firstTimeVibrateShort.value = false;
}
function click(index) {
if (index === currentIndex.value)
return;
currentIndex.value = index;
changeSectionStatus(index);
emit("change", index);
}
function getTabsInfo() {
const view = common_vendor.index.createSelectorQuery().in(instance == null ? void 0 : instance.proxy);
for (let i = 0; i < props.list.length; i++) {
view.select(`#${instanceId} .u-item-${i}`).boundingClientRect();
}
view.exec((res) => {
var _a;
if (!res.length) {
setTimeout(() => {
getTabsInfo();
return;
}, 10);
}
res.map((val, index) => {
listInfo.value[index].width = val.width;
});
if (props.mode === "subsection" || props.mode === "button") {
itemBgStyle.value.width = ((_a = listInfo.value[0]) == null ? void 0 : _a.width) + "px";
}
itemBgLeft();
});
}
function itemBgLeft() {
if (props.animation) {
itemBgStyle.value.transition = "all 0.35s";
} else {
itemBgStyle.value.transition = "all 0s";
}
let left = 0;
listInfo.value.forEach((val, index) => {
if (index < currentIndex.value)
left += val.width ?? 0;
});
if (props.mode === "subsection") {
itemBgStyle.value.left = left + "px";
} else if (props.mode === "button") {
itemBgStyle.value.left = left + buttonPadding + "px";
}
}
return (_ctx, _cache) => {
return {
a: common_vendor.f(listInfo.value, (item, index, i0) => {
return {
a: common_vendor.t(item.name),
b: common_vendor.s(textStyle.value(index)),
c: common_vendor.s(itemStyle.value(index)),
d: common_vendor.o(($event) => click(index), index),
e: common_vendor.n(noBorderRight.value(index)),
f: common_vendor.n(`u-item-${index}`),
g: index
};
}),
b: common_vendor.s(itemBarStyle.value),
c: common_vendor.unref(instanceId),
d: common_vendor.n(_ctx.customClass),
e: common_vendor.s(common_vendor.unref(uni_modules_uviewPro_libs_index.$u).toStyle(subsectionStyle.value, _ctx.customStyle))
};
};
}
});
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-28418ae2"]]);
wx.createComponent(Component);
//# sourceMappingURL=../../../../../.sourcemap/mp-weixin/uni_modules/uview-pro/components/u-subsection/u-subsection.js.map
@@ -0,0 +1,4 @@
{
"component": true,
"usingComponents": {}
}
@@ -0,0 +1 @@
<view id="{{c}}" class="{{['u-subsection', 'data-v-28418ae2', d]}}" style="{{e}}"><view wx:for="{{a}}" wx:for-item="item" wx:key="g" style="{{item.c}}" bindtap="{{item.d}}" class="{{['u-item', 'u-line-1', 'data-v-28418ae2', item.e, item.f]}}"><view style="{{item.b}}" class="u-item-text u-line-1 data-v-28418ae2">{{item.a}}</view></view><view class="u-item-bg data-v-28418ae2" style="{{b}}"></view></view>
@@ -0,0 +1,114 @@
/**
* 这里是uni-app内置的常用样式变量
*
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
*
*/
/**
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
*
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
*/
.data-v-28418ae2:root,
page.data-v-28418ae2 {
/* 纯色 */
--u-white-color: #ffffff;
--u-black-color: #000000;
--u-main-color: #303133;
--u-content-color: #606266;
--u-tips-color: #909399;
--u-light-color: #c0c4cc;
--u-border-color: #e4e7ed;
--u-divider-color: #e4e7ed;
--u-mask-color: rgba(0, 0, 0, 0.4);
--u-shadow-color: rgba(0, 0, 0, 0.1);
/* 背景色 */
--u-bg-color: #f3f4f6;
--u-bg-white: #ffffff;
--u-bg-gray-light: #f1f1f1;
--u-bg-gray-dark: #2f343c;
--u-bg-black: #000000;
/* 主色 */
--u-type-primary: #17447a;
--u-type-primary-light: #d5dde7;
--u-type-primary-disabled: #8fa6c3;
--u-type-primary-dark: #123662;
/* 警告色 */
--u-type-warning: #ff9900;
--u-type-warning-disabled: #fcbd71;
--u-type-warning-dark: #f29100;
--u-type-warning-light: #fdf6ec;
/* 成功色 */
--u-type-success: #19be6b;
--u-type-success-disabled: #71d5a1;
--u-type-success-dark: #18b566;
--u-type-success-light: #dbf1e1;
/* 错误色 */
--u-type-error: #fa3534;
--u-type-error-disabled: #fab6b6;
--u-type-error-dark: #dd6161;
--u-type-error-light: #fef0f0;
/* 信息色 */
--u-type-info: #909399;
--u-type-info-disabled: #c8c9cc;
--u-type-info-dark: #82848a;
--u-type-info-light: #f4f4f5;
}
/* 颜色变量 */
/* 行为相关颜色 */
/* 文字基本颜色 */
/* 背景颜色 */
/* 边框颜色 */
/* 尺寸变量 */
/* 文字尺寸 */
/* 图片尺寸 */
/* Border Radius */
/* 水平间距 */
/* 垂直间距 */
/* 透明度 */
/* 文章场景相关 */
.u-subsection.data-v-28418ae2 {
display: flex;
flex-direction: row;
align-items: center;
overflow: hidden;
position: relative;
}
.u-item.data-v-28418ae2 {
flex: 1;
text-align: center;
font-size: 26rpx;
height: 100%;
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
color: var(--u-main-color);
padding: 0 6rpx;
}
.u-item-bg.data-v-28418ae2 {
background-color: var(--u-type-primary);
position: absolute;
z-index: -1;
}
.u-none-border-right.data-v-28418ae2 {
border-right: none !important;
}
.u-item-first.data-v-28418ae2 {
border-top-left-radius: 8rpx;
border-bottom-left-radius: 8rpx;
}
.u-item-last.data-v-28418ae2 {
border-top-right-radius: 8rpx;
border-bottom-right-radius: 8rpx;
}
.u-item-text.data-v-28418ae2 {
transition: all 0.35s;
color: var(--u-main-color);
display: flex;
flex-direction: row;
align-items: center;
position: relative;
z-index: 3;
}
@@ -0,0 +1,43 @@
"use strict";
const uni_modules_uviewPro_components_common_props = require("../common/props.js");
const uni_modules_uviewPro_libs_config_zIndex = require("../../libs/config/zIndex.js");
const TabbarProps = {
...uni_modules_uviewPro_components_common_props.baseProps,
/** 是否显示tabbar */
show: { type: Boolean, default: true },
/** v-model绑定当前激活项的值 */
modelValue: { type: [String, Number], default: 0 },
/** tabbar背景色 */
bgColor: { type: String, default: "var(--u-bg-white)" },
/** tabbar高度,单位任意,数值默认rpx */
height: { type: [String, Number], default: "50px" },
/** 非凸起图标的大小,单位任意,数值默认rpx */
iconSize: { type: [String, Number], default: 40 },
/** 凸起图标的大小,单位任意,数值默认rpx */
midButtonSize: { type: [String, Number], default: 100 },
/** 文本大小,单位任意,数值默认rpx */
textSize: { type: [String, Number], default: 26 },
/** 激活时的颜色 */
activeColor: { type: String, default: "var(--u-type-primary)" },
/** 未激活时的颜色 */
inactiveColor: { type: String, default: "var(--u-content-color)" },
/** 是否显示中部凸起按钮 */
midButton: { type: Boolean, default: false },
/** tabbar配置项数组 */
list: { type: Array, default: () => [] },
/** 切换前回调,返回true或Promise */
beforeSwitch: {
type: Function,
default: null
},
/** 是否显示顶部横线 */
borderTop: { type: Boolean, default: true },
/** 是否隐藏原生tabbar */
hideTabBar: { type: Boolean, default: true },
/** z-index层级 */
zIndex: { type: [String, Number], default: uni_modules_uviewPro_libs_config_zIndex.zIndex.tabbar },
/** icon和text的间距,单位任意,数值默认rpx */
gap: { type: [String, Number], default: 8 }
};
exports.TabbarProps = TabbarProps;
//# sourceMappingURL=../../../../../.sourcemap/mp-weixin/uni_modules/uview-pro/components/u-tabbar/types.js.map
@@ -0,0 +1,220 @@
"use strict";
const common_vendor = require("../../../../common/vendor.js");
const uni_modules_uviewPro_libs_index = require("../../libs/index.js");
require("../../libs/util/logger.js");
require("../../libs/config/theme-tokens.js");
const uni_modules_uviewPro_components_uTabbar_types = require("./types.js");
if (!Array) {
const _easycom_u_icon2 = common_vendor.resolveComponent("u-icon");
const _easycom_u_badge2 = common_vendor.resolveComponent("u-badge");
(_easycom_u_icon2 + _easycom_u_badge2)();
}
const _easycom_u_icon = () => "../u-icon/u-icon.js";
const _easycom_u_badge = () => "../u-badge/u-badge.js";
if (!Math) {
(_easycom_u_icon + _easycom_u_badge)();
}
const __default__ = {
name: "u-tabbar",
options: {
addGlobalClass: true,
virtualHost: true,
styleIsolation: "shared"
}
};
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
...__default__,
props: uni_modules_uviewPro_components_uTabbar_types.TabbarProps,
emits: ["change", "update:modelValue"],
setup(__props, { emit: __emit }) {
const props = __props;
const emit = __emit;
const uZIndex = common_vendor.computed(() => (props == null ? void 0 : props.zIndex) ?? uni_modules_uviewPro_libs_index.$u.zIndex.tabbar);
const midButtonLeft = common_vendor.ref("50%");
const pageUrl = common_vendor.ref("");
common_vendor.onMounted(() => {
const pages = getCurrentPages();
pageUrl.value = pages[pages.length - 1].route;
if (props.midButton)
getMidButtonLeft();
});
const elIconPath = common_vendor.computed(() => {
return (index) => {
var _a;
const pagePath = (_a = props.list[index]) == null ? void 0 : _a.pagePath;
if (pagePath) {
if (pagePath === pageUrl.value || pagePath === "/" + pageUrl.value) {
return props.list[index].selectedIconPath;
} else {
return props.list[index].iconPath;
}
} else {
return index == props.modelValue ? props.list[index].selectedIconPath : props.list[index].iconPath;
}
};
});
const elColor = common_vendor.computed(() => {
return (index) => {
var _a;
const pagePath = (_a = props.list[index]) == null ? void 0 : _a.pagePath;
if (pagePath) {
if (pagePath === pageUrl.value || pagePath === "/" + pageUrl.value)
return props.activeColor;
else
return props.inactiveColor;
} else {
return index == props.modelValue ? props.activeColor : props.inactiveColor;
}
};
});
function getCustomPrefix(index) {
var _a;
const customIcon = (_a = props.list[index]) == null ? void 0 : _a.customIcon;
if (customIcon === void 0 || customIcon === null || customIcon === "") {
return "uicon";
}
if (typeof customIcon === "string") {
return customIcon;
}
if (typeof customIcon === "boolean") {
return customIcon ? "custom-icon" : "uicon";
}
return "uicon";
}
async function clickHandler(index) {
if (props.beforeSwitch && typeof props.beforeSwitch === "function") {
let beforeSwitchResult = props.beforeSwitch(index);
if (typeof beforeSwitchResult === "object" && beforeSwitchResult !== null && typeof beforeSwitchResult.then === "function") {
await beforeSwitchResult.then(() => {
switchTab(index);
}).catch(() => {
});
} else if (beforeSwitchResult === true) {
switchTab(index);
}
} else {
switchTab(index);
}
}
function switchTab(index) {
var _a;
emit("change", index);
if ((_a = props.list[index]) == null ? void 0 : _a.pagePath) {
common_vendor.index.switchTab({ url: props.list[index].pagePath });
} else {
emit("update:modelValue", index);
}
}
function getOffsetRight(count, isDot) {
if (isDot) {
return -20;
} else if (count > 9) {
return -40;
} else {
return -30;
}
}
function getBadgeOffsetTop(count, isDot) {
return -2;
}
function getIconSize(index) {
const item = props.list[index] || {};
if (props.midButton && item.midButton) {
return props.midButtonSize;
}
if (item.iconSize !== void 0 && item.iconSize !== null && item.iconSize !== "") {
return item.iconSize;
}
return props.iconSize;
}
function getTextSize(index) {
const item = props.list[index] || {};
if (item.textSize !== void 0 && item.textSize !== null && item.textSize !== "") {
return item.textSize;
}
return props.textSize;
}
function getMidButtonLeft() {
const windowWidth = uni_modules_uviewPro_libs_index.$u.sys().windowWidth;
midButtonLeft.value = windowWidth / 2 + "px";
}
function containerStyle(index) {
const style = {};
const item = props.list[index] || {};
if (item.gap !== void 0 && item.gap !== null && item.gap !== "") {
style.gap = uni_modules_uviewPro_libs_index.$u.addUnit(item.gap);
} else {
style.gap = uni_modules_uviewPro_libs_index.$u.addUnit(props.gap);
}
if (props.midButton && item.midButton) {
const iconSizeRaw = getIconSize(index);
const numericSize = parseFloat(String(iconSizeRaw)) || parseFloat(String(props.midButtonSize)) || 100;
style.paddingTop = uni_modules_uviewPro_libs_index.$u.addUnit(numericSize / 2 + 8);
style.boxSizing = "border-box";
}
return uni_modules_uviewPro_libs_index.$u.toStyle(style);
}
return (_ctx, _cache) => {
return common_vendor.e({
a: props.show
}, props.show ? common_vendor.e({
b: common_vendor.f(props.list, (item, index, i0) => {
return common_vendor.e({
a: item.iconPath || item.selectedIconPath
}, item.iconPath || item.selectedIconPath ? common_vendor.e({
b: "62b8a246-0-" + i0,
c: common_vendor.p({
size: getIconSize(index),
name: elIconPath.value(index),
["img-mode"]: "scaleToFill",
color: elColor.value(index),
["custom-prefix"]: getCustomPrefix(index)
}),
d: item.count || item.isDot
}, item.count || item.isDot ? {
e: "62b8a246-1-" + i0,
f: common_vendor.p({
count: item.count,
["is-dot"]: item.isDot,
offset: [getBadgeOffsetTop(item.count || 0, item.isDot || false), getOffsetRight(item.count || 0, item.isDot || false)]
})
} : {}, {
g: common_vendor.n(props.midButton && item.midButton ? "u-tabbar__content__circle__icon" : "u-tabbar__content__item__icon")
}) : {}, {
h: item.text
}, item.text ? {
i: common_vendor.t(item.text),
j: elColor.value(index),
k: common_vendor.unref(uni_modules_uviewPro_libs_index.$u).addUnit(getTextSize(index)),
l: item.text && !(item.iconPath || item.selectedIconPath) ? 1 : ""
} : {}, {
m: props.midButton && item.midButton ? 1 : "",
n: common_vendor.s(containerStyle(index)),
o: index,
p: props.midButton && item.midButton ? 1 : "",
q: common_vendor.o(($event) => clickHandler(index), index)
});
}),
c: props.bgColor,
d: props.midButton
}, props.midButton ? {
e: props.borderTop ? 1 : "",
f: props.bgColor,
g: midButtonLeft.value
} : {}, {
h: common_vendor.unref(uni_modules_uviewPro_libs_index.$u).addUnit(props.height),
i: props.bgColor,
j: uZIndex.value,
k: props.borderTop ? 1 : "",
l: `calc(${common_vendor.unref(uni_modules_uviewPro_libs_index.$u).addUnit(props.height)} + ${props.midButton ? "60rpx" : "1px"})`,
m: common_vendor.n(_ctx.customClass),
n: common_vendor.s(common_vendor.unref(uni_modules_uviewPro_libs_index.$u).toStyle(_ctx.customStyle)),
o: common_vendor.o(() => {
}, "2e")
}) : {});
};
}
});
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-62b8a246"]]);
wx.createComponent(Component);
//# sourceMappingURL=../../../../../.sourcemap/mp-weixin/uni_modules/uview-pro/components/u-tabbar/u-tabbar.js.map
@@ -0,0 +1,7 @@
{
"component": true,
"usingComponents": {
"u-icon": "../u-icon/u-icon",
"u-badge": "../u-badge/u-badge"
}
}
@@ -0,0 +1 @@
<view wx:if="{{a}}" class="{{['u-tabbar', 'data-v-62b8a246', m]}}" style="{{n}}" catchtouchmove="{{o}}"><view style="{{'height:' + h + ';' + ('background-color:' + i) + ';' + ('z-index:' + j)}}" class="{{['u-tabbar__content', 'safe-area-inset-bottom', 'data-v-62b8a246', k && 'u-border-top']}}"><view wx:for="{{b}}" wx:for-item="item" wx:key="o" class="{{['u-tabbar__content__item', 'data-v-62b8a246', item.p && 'u-tabbar__content__circle']}}" catchtap="{{item.q}}" style="{{'background-color:' + c}}"><view class="{{['u-tabbar__content__item__container', 'data-v-62b8a246', item.m && 'u-tabbar__content__circle__container']}}" style="{{item.n}}"><view wx:if="{{item.a}}" class="{{['data-v-62b8a246', item.g]}}"><u-icon wx:if="{{item.c}}" class="data-v-62b8a246" u-i="{{item.b}}" bind:__l="__l" u-p="{{item.c}}"></u-icon><u-badge wx:if="{{item.d}}" class="data-v-62b8a246" u-i="{{item.e}}" bind:__l="__l" u-p="{{item.f}}"></u-badge></view><view wx:if="{{item.h}}" class="{{['u-tabbar__content__item__text', 'data-v-62b8a246', item.l && 'u-tabbar__content__item__text--center']}}"><text class="u-line-1 data-v-62b8a246" style="{{'color:' + item.j + ';' + ('font-size:' + item.k)}}">{{item.i}}</text></view></view></view><view wx:if="{{d}}" class="{{['u-tabbar__content__circle__border', 'data-v-62b8a246', e && 'u-border']}}" style="{{'background-color:' + f + ';' + ('left:' + g)}}"></view></view><view class="u-fixed-placeholder safe-area-inset-bottom data-v-62b8a246" style="{{'height:' + l}}"></view></view>
@@ -0,0 +1,171 @@
/**
* 这里是uni-app内置的常用样式变量
*
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
*
*/
/**
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
*
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
*/
.data-v-62b8a246:root,
page.data-v-62b8a246 {
/* 纯色 */
--u-white-color: #ffffff;
--u-black-color: #000000;
--u-main-color: #303133;
--u-content-color: #606266;
--u-tips-color: #909399;
--u-light-color: #c0c4cc;
--u-border-color: #e4e7ed;
--u-divider-color: #e4e7ed;
--u-mask-color: rgba(0, 0, 0, 0.4);
--u-shadow-color: rgba(0, 0, 0, 0.1);
/* 背景色 */
--u-bg-color: #f3f4f6;
--u-bg-white: #ffffff;
--u-bg-gray-light: #f1f1f1;
--u-bg-gray-dark: #2f343c;
--u-bg-black: #000000;
/* 主色 */
--u-type-primary: #17447a;
--u-type-primary-light: #d5dde7;
--u-type-primary-disabled: #8fa6c3;
--u-type-primary-dark: #123662;
/* 警告色 */
--u-type-warning: #ff9900;
--u-type-warning-disabled: #fcbd71;
--u-type-warning-dark: #f29100;
--u-type-warning-light: #fdf6ec;
/* 成功色 */
--u-type-success: #19be6b;
--u-type-success-disabled: #71d5a1;
--u-type-success-dark: #18b566;
--u-type-success-light: #dbf1e1;
/* 错误色 */
--u-type-error: #fa3534;
--u-type-error-disabled: #fab6b6;
--u-type-error-dark: #dd6161;
--u-type-error-light: #fef0f0;
/* 信息色 */
--u-type-info: #909399;
--u-type-info-disabled: #c8c9cc;
--u-type-info-dark: #82848a;
--u-type-info-light: #f4f4f5;
}
/* 颜色变量 */
/* 行为相关颜色 */
/* 文字基本颜色 */
/* 背景颜色 */
/* 边框颜色 */
/* 尺寸变量 */
/* 文字尺寸 */
/* 图片尺寸 */
/* Border Radius */
/* 水平间距 */
/* 垂直间距 */
/* 透明度 */
/* 文章场景相关 */
.u-fixed-placeholder.data-v-62b8a246 {
box-sizing: content-box;
height: 50px;
}
.u-tabbar__content.data-v-62b8a246 {
display: flex;
flex-direction: row;
align-items: center;
position: relative;
position: fixed;
bottom: 0;
left: 0;
width: 100%;
z-index: 998;
box-sizing: content-box;
}
.u-tabbar__content__circle__border.data-v-62b8a246 {
border-radius: 100%;
width: 130rpx;
height: 130rpx;
top: -58rpx;
position: absolute;
z-index: 4;
background-color: var(--u-bg-white);
left: 50%;
transform: translateX(-50%);
}
.u-tabbar__content__circle__border.data-v-62b8a246:after {
border-radius: 100px;
}
.u-tabbar__content__item.data-v-62b8a246 {
flex: 1;
justify-content: center;
height: 100%;
padding: 12rpx 0;
display: flex;
flex-direction: row;
flex-direction: column;
align-items: center;
position: relative;
}
.u-tabbar__content__item__container.data-v-62b8a246 {
display: flex;
flex-direction: row;
flex-direction: column;
align-items: center;
justify-content: center;
height: 100%;
width: 100%;
position: relative;
}
.u-tabbar__content__item__icon.data-v-62b8a246 {
position: relative;
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
}
.u-tabbar__content__item__text.data-v-62b8a246 {
color: var(--u-content-color);
font-size: 26rpx;
line-height: 28rpx;
text-align: center;
width: 100%;
}
.u-tabbar__content__circle.data-v-62b8a246 {
position: relative;
display: flex;
flex-direction: row;
flex-direction: column;
justify-content: space-between;
z-index: 10;
height: calc(100% - 1px);
}
.u-tabbar__content__circle__container.data-v-62b8a246 {
display: flex;
flex-direction: row;
flex-direction: column;
align-items: center;
justify-content: center;
height: 100%;
width: 100%;
position: relative;
box-sizing: border-box;
}
.u-tabbar__content__circle__icon.data-v-62b8a246 {
width: 100rpx;
height: 100rpx;
border-radius: 100%;
display: flex;
flex-direction: row;
justify-content: center;
align-items: center;
background-color: var(--u-bg-white);
/* 将凸起图标上移,与顶部边框线对齐 */
position: absolute;
top: -55rpx;
left: 50%;
z-index: 6;
transform: translateX(-50%);
}
@@ -0,0 +1,2 @@
"use strict";
//# sourceMappingURL=../../../../../.sourcemap/mp-weixin/uni_modules/uview-pro/components/u-toast/service.js.map
@@ -0,0 +1,35 @@
"use strict";
const uni_modules_uviewPro_components_common_props = require("../common/props.js");
const TransitionProps = {
...uni_modules_uviewPro_components_common_props.baseProps,
show: {
type: Boolean,
default: true
},
name: {
type: String,
default: "fade"
},
mode: {
type: String,
default: ""
},
duration: {
type: [Number, Object],
default: 300
},
timingFunction: {
type: String,
default: "cubic-bezier(0.2, 0.8, 0.2, 1)"
},
delay: {
type: Number,
default: 0
},
appear: {
type: Boolean,
default: false
}
};
exports.TransitionProps = TransitionProps;
//# sourceMappingURL=../../../../../.sourcemap/mp-weixin/uni_modules/uview-pro/components/u-transition/types.js.map
@@ -0,0 +1,181 @@
"use strict";
const common_vendor = require("../../../../common/vendor.js");
const uni_modules_uviewPro_components_uTransition_types = require("./types.js");
const uni_modules_uviewPro_libs_index = require("../../libs/index.js");
require("../../libs/util/logger.js");
require("../../libs/config/theme-tokens.js");
const __default__ = {
name: "u-transition",
options: {
addGlobalClass: true,
virtualHost: true,
styleIsolation: "shared"
}
};
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
...__default__,
props: uni_modules_uviewPro_components_uTransition_types.TransitionProps,
emits: [
"before-enter",
"enter",
"after-enter",
"enter-cancelled",
"before-leave",
"leave",
"after-leave",
"leave-cancelled"
],
setup(__props, { emit: __emit }) {
const props = __props;
const emit = __emit;
const normalizeDuration = (duration) => {
if (typeof duration === "number") {
return {
enter: duration,
leave: duration
};
}
return {
enter: (duration == null ? void 0 : duration.enter) ?? 300,
leave: (duration == null ? void 0 : duration.leave) ?? (duration == null ? void 0 : duration.enter) ?? 300
};
};
const rootRef = common_vendor.ref();
const rendered = common_vendor.ref(props.show);
const animationPhase = common_vendor.ref("");
const animating = common_vendor.ref(false);
const initialized = common_vendor.ref(false);
const transitionDuration = common_vendor.computed(() => normalizeDuration(props.duration));
const animationStyle = common_vendor.computed(() => {
const currentDuration = animationPhase.value === "leave" ? transitionDuration.value.leave : transitionDuration.value.enter;
return {
"--u-transition-duration-enter": `${transitionDuration.value.enter}ms`,
"--u-transition-duration-leave": `${transitionDuration.value.leave}ms`,
"--u-transition-delay": `${props.delay}ms`,
"--u-transition-timing": props.timingFunction,
animationDuration: `${currentDuration}ms`,
animationDelay: `${props.delay}ms`,
animationTimingFunction: props.timingFunction
};
});
const animationClass = common_vendor.computed(() => {
if (!animationPhase.value) {
return "";
}
return `u-transition-${props.name}-${animationPhase.value}`;
});
const getEl = () => rootRef.value;
const startEnter = () => {
if (animating.value && animationPhase.value === "enter") {
return;
}
if (animating.value && animationPhase.value === "leave") {
emit("leave-cancelled", getEl());
}
rendered.value = true;
animationPhase.value = "enter";
animating.value = true;
emit("before-enter", getEl());
};
const startLeave = () => {
if (!rendered.value) {
return;
}
if (animating.value && animationPhase.value === "leave") {
return;
}
if (animating.value && animationPhase.value === "enter") {
emit("enter-cancelled", getEl());
}
animationPhase.value = "leave";
animating.value = true;
emit("before-leave", getEl());
};
const handleAnimationStart = () => {
if (animationPhase.value === "enter") {
emit("enter", getEl());
} else if (animationPhase.value === "leave") {
emit("leave", getEl());
}
};
const handleAnimationEnd = () => {
if (animationPhase.value === "enter") {
animating.value = false;
animationPhase.value = "";
emit("after-enter", getEl());
return;
}
if (animationPhase.value === "leave") {
animating.value = false;
animationPhase.value = "";
rendered.value = false;
emit("after-leave", getEl());
}
};
const shouldWaitForAnimation = (newPhase) => {
if (!animating.value)
return false;
const currentPhase = animationPhase.value;
if (props.mode === "out-in" && currentPhase === "leave" && newPhase === "enter") {
return true;
}
if (props.mode === "in-out" && currentPhase === "enter" && newPhase === "leave") {
return true;
}
return false;
};
common_vendor.watch(
() => props.show,
(value) => {
if (!initialized.value) {
initialized.value = true;
if (value) {
rendered.value = true;
if (props.appear) {
common_vendor.nextTick$1(() => startEnter());
}
} else {
rendered.value = false;
}
return;
}
if (value) {
if (shouldWaitForAnimation("enter")) {
common_vendor.nextTick$1(() => {
if (!animating.value) {
startEnter();
}
});
} else {
startEnter();
}
} else {
if (shouldWaitForAnimation("leave")) {
common_vendor.nextTick$1(() => {
if (!animating.value) {
startLeave();
}
});
} else {
startLeave();
}
}
},
{ immediate: true }
);
return (_ctx, _cache) => {
return common_vendor.e({
a: rendered.value
}, rendered.value ? {
b: common_vendor.n(_ctx.customClass),
c: common_vendor.n(animationClass.value),
d: common_vendor.s(common_vendor.unref(uni_modules_uviewPro_libs_index.$u).toStyle(animationStyle.value, _ctx.customStyle)),
e: common_vendor.o(handleAnimationStart, "e3"),
f: common_vendor.o(handleAnimationEnd, "be")
} : {});
};
}
});
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-1098449d"]]);
wx.createComponent(Component);
//# sourceMappingURL=../../../../../.sourcemap/mp-weixin/uni_modules/uview-pro/components/u-transition/u-transition.js.map
@@ -0,0 +1,4 @@
{
"component": true,
"usingComponents": {}
}
@@ -0,0 +1 @@
<view wx:if="{{a}}" ref="rootRef" class="{{['u-transition', 'data-v-1098449d', b, c]}}" style="{{d}}" bindanimationstart="{{e}}" bindanimationend="{{f}}"><slot/></view>
@@ -0,0 +1,262 @@
/**
* 这里是uni-app内置的常用样式变量
*
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
*
*/
/**
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
*
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
*/
.data-v-1098449d:root,
page.data-v-1098449d {
/* 纯色 */
--u-white-color: #ffffff;
--u-black-color: #000000;
--u-main-color: #303133;
--u-content-color: #606266;
--u-tips-color: #909399;
--u-light-color: #c0c4cc;
--u-border-color: #e4e7ed;
--u-divider-color: #e4e7ed;
--u-mask-color: rgba(0, 0, 0, 0.4);
--u-shadow-color: rgba(0, 0, 0, 0.1);
/* 背景色 */
--u-bg-color: #f3f4f6;
--u-bg-white: #ffffff;
--u-bg-gray-light: #f1f1f1;
--u-bg-gray-dark: #2f343c;
--u-bg-black: #000000;
/* 主色 */
--u-type-primary: #17447a;
--u-type-primary-light: #d5dde7;
--u-type-primary-disabled: #8fa6c3;
--u-type-primary-dark: #123662;
/* 警告色 */
--u-type-warning: #ff9900;
--u-type-warning-disabled: #fcbd71;
--u-type-warning-dark: #f29100;
--u-type-warning-light: #fdf6ec;
/* 成功色 */
--u-type-success: #19be6b;
--u-type-success-disabled: #71d5a1;
--u-type-success-dark: #18b566;
--u-type-success-light: #dbf1e1;
/* 错误色 */
--u-type-error: #fa3534;
--u-type-error-disabled: #fab6b6;
--u-type-error-dark: #dd6161;
--u-type-error-light: #fef0f0;
/* 信息色 */
--u-type-info: #909399;
--u-type-info-disabled: #c8c9cc;
--u-type-info-dark: #82848a;
--u-type-info-light: #f4f4f5;
}
/* 颜色变量 */
/* 行为相关颜色 */
/* 文字基本颜色 */
/* 背景颜色 */
/* 边框颜色 */
/* 尺寸变量 */
/* 文字尺寸 */
/* 图片尺寸 */
/* Border Radius */
/* 水平间距 */
/* 垂直间距 */
/* 透明度 */
/* 文章场景相关 */
.u-transition-fade-enter.data-v-1098449d {
animation-fill-mode: both;
animation-name: u-transition-fade-in-1098449d;
}
.u-transition-fade-leave.data-v-1098449d {
animation-fill-mode: both;
animation-name: u-transition-fade-out-1098449d;
}
.u-transition-slide-up-enter.data-v-1098449d {
animation-fill-mode: both;
animation-name: u-transition-slide-up-in-1098449d;
}
.u-transition-slide-up-leave.data-v-1098449d {
animation-fill-mode: both;
animation-name: u-transition-slide-up-out-1098449d;
}
.u-transition-slide-down-enter.data-v-1098449d {
animation-fill-mode: both;
animation-name: u-transition-slide-down-in-1098449d;
}
.u-transition-slide-down-leave.data-v-1098449d {
animation-fill-mode: both;
animation-name: u-transition-slide-down-out-1098449d;
}
.u-transition-slide-left-enter.data-v-1098449d {
animation-fill-mode: both;
animation-name: u-transition-slide-left-in-1098449d;
}
.u-transition-slide-left-leave.data-v-1098449d {
animation-fill-mode: both;
animation-name: u-transition-slide-left-out-1098449d;
}
.u-transition-slide-right-enter.data-v-1098449d {
animation-fill-mode: both;
animation-name: u-transition-slide-right-in-1098449d;
}
.u-transition-slide-right-leave.data-v-1098449d {
animation-fill-mode: both;
animation-name: u-transition-slide-right-out-1098449d;
}
.u-transition-zoom-in-enter.data-v-1098449d {
animation-fill-mode: both;
animation-name: u-transition-zoom-in-in-1098449d;
}
.u-transition-zoom-in-leave.data-v-1098449d {
animation-fill-mode: both;
animation-name: u-transition-zoom-in-out-1098449d;
}
.u-transition-zoom-out-enter.data-v-1098449d {
animation-fill-mode: both;
animation-name: u-transition-zoom-out-in-1098449d;
}
.u-transition-zoom-out-leave.data-v-1098449d {
animation-fill-mode: both;
animation-name: u-transition-zoom-out-out-1098449d;
}
@keyframes u-transition-fade-in-1098449d {
0% {
opacity: 0;
}
100% {
opacity: 1;
}
}
@keyframes u-transition-fade-out-1098449d {
0% {
opacity: 1;
}
100% {
opacity: 0;
}
}
@keyframes u-transition-slide-up-in-1098449d {
0% {
opacity: 0;
transform: translate3d(0, 40rpx, 0);
}
100% {
opacity: 1;
transform: translate3d(0, 0, 0);
}
}
@keyframes u-transition-slide-up-out-1098449d {
0% {
opacity: 1;
transform: translate3d(0, 0, 0);
}
100% {
opacity: 0;
transform: translate3d(0, 40rpx, 0);
}
}
@keyframes u-transition-slide-down-in-1098449d {
0% {
opacity: 0;
transform: translate3d(0, -40rpx, 0);
}
100% {
opacity: 1;
transform: translate3d(0, 0, 0);
}
}
@keyframes u-transition-slide-down-out-1098449d {
0% {
opacity: 1;
transform: translate3d(0, 0, 0);
}
100% {
opacity: 0;
transform: translate3d(0, -40rpx, 0);
}
}
@keyframes u-transition-slide-left-in-1098449d {
0% {
opacity: 0;
transform: translate3d(40rpx, 0, 0);
}
100% {
opacity: 1;
transform: translate3d(0, 0, 0);
}
}
@keyframes u-transition-slide-left-out-1098449d {
0% {
opacity: 1;
transform: translate3d(0, 0, 0);
}
100% {
opacity: 0;
transform: translate3d(40rpx, 0, 0);
}
}
@keyframes u-transition-slide-right-in-1098449d {
0% {
opacity: 0;
transform: translate3d(-40rpx, 0, 0);
}
100% {
opacity: 1;
transform: translate3d(0, 0, 0);
}
}
@keyframes u-transition-slide-right-out-1098449d {
0% {
opacity: 1;
transform: translate3d(0, 0, 0);
}
100% {
opacity: 0;
transform: translate3d(-40rpx, 0, 0);
}
}
@keyframes u-transition-zoom-in-in-1098449d {
0% {
opacity: 0;
transform: scale(0.85);
}
100% {
opacity: 1;
transform: scale(1);
}
}
@keyframes u-transition-zoom-in-out-1098449d {
0% {
opacity: 1;
transform: scale(1);
}
100% {
opacity: 0;
transform: scale(0.85);
}
}
@keyframes u-transition-zoom-out-in-1098449d {
0% {
opacity: 0;
transform: scale(1.1);
}
100% {
opacity: 1;
transform: scale(1);
}
}
@keyframes u-transition-zoom-out-out-1098449d {
0% {
opacity: 1;
transform: scale(1);
}
100% {
opacity: 0;
transform: scale(1.1);
}
}
@@ -0,0 +1,74 @@
"use strict";
const common_vendor = require("../../common/vendor.js");
const uni_modules_uviewPro_libs_index = require("./libs/index.js");
const uni_modules_uviewPro_libs_util_logger = require("./libs/util/logger.js");
const uni_modules_uviewPro_libs_config_themeTokens = require("./libs/config/theme-tokens.js");
const uni_modules_uviewPro_libs_hooks_useTheme = require("./libs/hooks/useTheme.js");
const uni_modules_uviewPro_libs_util_configProvider = require("./libs/util/config-provider.js");
const install = (app, options) => {
var _a, _b, _c;
try {
if (options) {
if (options == null ? void 0 : options.theme) {
const optTheme = options.theme;
if (Array.isArray(optTheme)) {
uni_modules_uviewPro_libs_hooks_useTheme.initTheme(optTheme);
} else if (typeof optTheme === "object" && optTheme.themes) {
uni_modules_uviewPro_libs_hooks_useTheme.initTheme(
optTheme.themes,
{
defaultTheme: optTheme.defaultTheme,
defaultDarkMode: optTheme.defaultDarkMode
},
optTheme.isForce
);
} else {
const defaultTheme = uni_modules_uviewPro_libs_config_themeTokens.defaultThemes[0];
if (defaultTheme) {
const mergedTheme = {
...defaultTheme,
color: {
...defaultTheme.color,
...optTheme
}
};
uni_modules_uviewPro_libs_hooks_useTheme.initTheme([mergedTheme], defaultTheme.name);
}
}
} else {
uni_modules_uviewPro_libs_hooks_useTheme.initTheme();
}
try {
if (options == null ? void 0 : options.locale) {
const optLocale = options.locale;
if (typeof optLocale === "string") {
uni_modules_uviewPro_libs_util_configProvider.configProvider.initLocales(void 0, optLocale);
} else if (Array.isArray(optLocale)) {
uni_modules_uviewPro_libs_util_configProvider.configProvider.initLocales(optLocale);
} else if (optLocale && typeof optLocale === "object") {
uni_modules_uviewPro_libs_util_configProvider.configProvider.initLocales(optLocale.locales, optLocale.defaultLocale, optLocale.isForce);
} else {
uni_modules_uviewPro_libs_util_configProvider.configProvider.initLocales();
}
} else {
uni_modules_uviewPro_libs_util_configProvider.configProvider.initLocales();
}
} catch (e) {
common_vendor.index.__f__("error", "at uni_modules/uview-pro/index.ts:74", "[install locales] Error:", e);
}
uni_modules_uviewPro_libs_util_logger.logger.setDebugMode(((_a = options == null ? void 0 : options.log) == null ? void 0 : _a.debug) ?? false).setPrefix(((_b = options == null ? void 0 : options.log) == null ? void 0 : _b.prefix) || "").setShowCallerInfo(((_c = options == null ? void 0 : options.log) == null ? void 0 : _c.showCallerInfo) ?? true);
} else {
uni_modules_uviewPro_libs_hooks_useTheme.initTheme();
uni_modules_uviewPro_libs_util_configProvider.configProvider.initLocales();
}
} catch (error) {
common_vendor.index.__f__("error", "at uni_modules/uview-pro/index.ts:88", "[install options] Error:", error);
}
common_vendor.index.$u = uni_modules_uviewPro_libs_index.$u;
app.config.globalProperties.$u = uni_modules_uviewPro_libs_index.$u;
};
const uViewPro = {
install
};
exports.uViewPro = uViewPro;
//# sourceMappingURL=../../../.sourcemap/mp-weixin/uni_modules/uview-pro/index.js.map
@@ -0,0 +1,6 @@
"use strict";
const common_vendor = require("../../../../common/vendor.js");
const uni_modules_uviewPro_libs_config_themeTokens = require("./theme-tokens.js");
const color = common_vendor.reactive({ ...uni_modules_uviewPro_libs_config_themeTokens.lightPalette });
exports.color = color;
//# sourceMappingURL=../../../../../.sourcemap/mp-weixin/uni_modules/uview-pro/libs/config/color.js.map
@@ -0,0 +1,17 @@
"use strict";
const common_vendor = require("../../../../common/vendor.js");
const version = "0.5.9";
const config = common_vendor.reactive({
v: version,
version,
// 主题名称
type: ["primary", "success", "info", "error", "warning"],
// 默认为官方主题名称
defaultTheme: "uviewpro",
// 默认为亮色模式
defaultDarkMode: "light",
// 默认为中文
defaultLocale: "zh-CN"
});
exports.config = config;
//# sourceMappingURL=../../../../../.sourcemap/mp-weixin/uni_modules/uview-pro/libs/config/config.js.map
@@ -0,0 +1,100 @@
"use strict";
const uni_modules_uviewPro_libs_config_config = require("./config.js");
const lightPalette = {
primary: "#2979ff",
primaryDark: "#2b85e4",
primaryDisabled: "#a0cfff",
primaryLight: "#ecf5ff",
success: "#19be6b",
successDark: "#18b566",
successDisabled: "#71d5a1",
successLight: "#dbf1e1",
warning: "#ff9900",
warningDark: "#f29100",
warningDisabled: "#fcbd71",
warningLight: "#fdf6ec",
error: "#fa3534",
errorDark: "#dd6161",
errorDisabled: "#fab6b6",
errorLight: "#fef0f0",
info: "#909399",
infoDark: "#82848a",
infoDisabled: "#c8c9cc",
infoLight: "#f4f4f5",
whiteColor: "#ffffff",
blackColor: "#000000",
mainColor: "#303133",
contentColor: "#606266",
tipsColor: "#909399",
lightColor: "#c0c4cc",
borderColor: "#dcdfe6",
dividerColor: "#e4e7ed",
maskColor: "rgba(0, 0, 0, 0.4)",
shadowColor: "rgba(0, 0, 0, 0.1)",
bgColor: "#f3f4f6",
bgWhite: "#ffffff",
bgGrayLight: "#f1f1f1",
bgGrayDark: "#2f343c",
bgBlack: "#000000"
};
const darkPalette = {
primary: "#8ab4ff",
primaryDark: "#5f8dff",
primaryDisabled: "#3d4f74",
primaryLight: "#1d273f",
success: "#4ade80",
successDark: "#1f9d57",
successDisabled: "#2f4d3d",
successLight: "#10291f",
warning: "#fbbf24",
warningDark: "#c88f00",
warningDisabled: "#4a3b17",
warningLight: "#2b1f05",
error: "#ff6b6b",
errorDark: "#d83a3a",
errorDisabled: "#4f2323",
errorLight: "#2d1414",
info: "#a0a7b8",
infoDark: "#7c8394",
infoDisabled: "#3b3f4c",
infoLight: "#1d2029",
whiteColor: "#f5f6f7",
blackColor: "#f5f6f7",
mainColor: "#f5f6f7",
contentColor: "#cfd3dc",
tipsColor: "#9aa1af",
lightColor: "#6b7082",
borderColor: "#3a4251",
dividerColor: "#3a4251",
maskColor: "rgba(0, 0, 0, 0.6)",
shadowColor: "rgba(0, 0, 0, 0.3)",
bgColor: "#111827",
bgWhite: "#000000",
bgGrayLight: "#1a1a1a",
bgGrayDark: "#f5f7fa",
bgBlack: "#ffffff"
};
const lightCss = {
"--u-background": "#ffffff",
"--u-surface": "#f7f8fa",
"--u-text": "#303133"
};
const darkCss = {
"--u-background": "#0f1115",
"--u-surface": "#1c2233",
"--u-text": "#f5f6f7"
};
const defaultThemes = [
{
name: uni_modules_uviewPro_libs_config_config.config.defaultTheme,
label: "默认蓝",
description: "uView Pro 默认主题,支持亮色与暗黑模式",
color: lightPalette,
darkColor: darkPalette,
css: lightCss,
darkCss
}
];
exports.defaultThemes = defaultThemes;
exports.lightPalette = lightPalette;
//# sourceMappingURL=../../../../../.sourcemap/mp-weixin/uni_modules/uview-pro/libs/config/theme-tokens.js.map
@@ -0,0 +1,15 @@
"use strict";
const zIndex = {
toast: 10090,
noNetwork: 10080,
// popup包含popupactionSheetkeyboardpicker的值
popup: 10075,
mask: 10070,
navbar: 980,
topTips: 975,
sticky: 970,
indexListSticky: 965,
tabbar: 998
};
exports.zIndex = zIndex;
//# sourceMappingURL=../../../../../.sourcemap/mp-weixin/uni_modules/uview-pro/libs/config/zIndex.js.map
@@ -0,0 +1,19 @@
"use strict";
const common_vendor = require("../../../../common/vendor.js");
function $parent(componentName, _instance = null) {
var _a;
const instance = _instance || common_vendor.getCurrentInstance();
let parent = instance && instance.parent;
if (!componentName)
return parent;
while (parent) {
const name = (_a = parent.type) == null ? void 0 : _a.name;
if (name === componentName) {
return parent;
}
parent = parent.parent;
}
return null;
}
exports.$parent = $parent;
//# sourceMappingURL=../../../../../.sourcemap/mp-weixin/uni_modules/uview-pro/libs/function/_parent.js.map
@@ -0,0 +1,21 @@
"use strict";
const uni_modules_uviewPro_libs_function_test = require("./test.js");
function addUnit(value = "auto", unit = "rpx") {
const strValue = String(value);
if (!strValue)
return "";
if (strValue === "auto")
return strValue;
if (strValue.includes(" ")) {
return strValue.split(" ").map((s) => {
if (s === "auto" || /^-?\d*\.?\d+(%|px|rpx|em|rem|vh|vw)$/.test(s))
return s;
return uni_modules_uviewPro_libs_function_test.test.number(s) ? `${s}${unit}` : s;
}).join(" ");
}
if (/^-?\d*\.?\d+(%|px|rpx|em|rem|vh|vw)$/.test(strValue))
return strValue;
return uni_modules_uviewPro_libs_function_test.test.number(strValue) ? `${strValue}${unit}` : strValue;
}
exports.addUnit = addUnit;
//# sourceMappingURL=../../../../../.sourcemap/mp-weixin/uni_modules/uview-pro/libs/function/addUnit.js.map
@@ -0,0 +1,22 @@
"use strict";
const common_vendor = require("../../../../common/vendor.js");
function UniCopy(text, config) {
const opt = Object.assign({ data: text }, config);
common_vendor.index.setClipboardData(opt);
}
function clipboard(content, options) {
const text = String(content);
const defaultOpt = {
showToast: true,
success: () => {
},
fail: () => {
},
complete: () => {
}
};
const config = Object.assign(defaultOpt, options);
UniCopy(text, config);
}
exports.clipboard = clipboard;
//# sourceMappingURL=../../../../../.sourcemap/mp-weixin/uni_modules/uview-pro/libs/function/clipboard.js.map
@@ -0,0 +1,18 @@
"use strict";
const uni_modules_uviewPro_libs_config_color = require("../config/color.js");
const uni_modules_uviewPro_libs_config_themeTokens = require("../config/theme-tokens.js");
const uni_modules_uviewPro_libs_util_configProvider = require("../util/config-provider.js");
function getColor(name) {
if (uni_modules_uviewPro_libs_config_color.color[name]) {
return uni_modules_uviewPro_libs_config_color.color[name];
}
return uni_modules_uviewPro_libs_config_themeTokens.lightPalette[name] || "";
}
function setColor(theme) {
if (theme) {
uni_modules_uviewPro_libs_util_configProvider.configProvider.setThemeColor(theme);
}
}
exports.getColor = getColor;
exports.setColor = setColor;
//# sourceMappingURL=../../../../../.sourcemap/mp-weixin/uni_modules/uview-pro/libs/function/color.js.map
@@ -0,0 +1,106 @@
"use strict";
function colorGradient(startColor = "rgb(0, 0, 0)", endColor = "rgb(255, 255, 255)", step = 10) {
const startRGB = hexToRgb(startColor, false);
const [startR, startG, startB] = startRGB;
const endRGB = hexToRgb(endColor, false);
const [endR, endG, endB] = endRGB;
const sR = (endR - startR) / step;
const sG = (endG - startG) / step;
const sB = (endB - startB) / step;
const colorArr = [];
for (let i = 0; i < step; i++) {
const hex = rgbToHex(
`rgb(${Math.round(sR * i + startR)},${Math.round(sG * i + startG)},${Math.round(sB * i + startB)})`
);
colorArr.push(hex);
}
return colorArr;
}
function hexToRgb(sColor, str = true) {
const reg = /^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/;
sColor = sColor.toLowerCase();
if (sColor && reg.test(sColor)) {
if (sColor.length === 4) {
let sColorNew = "#";
for (let i = 1; i < 4; i += 1) {
sColorNew += sColor.slice(i, i + 1).concat(sColor.slice(i, i + 1));
}
sColor = sColorNew;
}
const sColorChange = [
parseInt("0x" + sColor.slice(1, 3)),
parseInt("0x" + sColor.slice(3, 5)),
parseInt("0x" + sColor.slice(5, 7))
];
if (!str) {
return sColorChange;
} else {
return `rgb(${sColorChange[0]},${sColorChange[1]},${sColorChange[2]})`;
}
} else if (/^(rgb|RGB)/.test(sColor)) {
const arr = sColor.replace(/(?:\(|\)|rgb|RGB)*/g, "").split(",");
return arr.map((val) => Number(val));
} else {
return sColor;
}
}
function rgbToHex(rgb) {
const reg = /^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/;
if (/^(rgb|RGB)/.test(rgb)) {
const aColor = rgb.replace(/(?:\(|\)|rgb|RGB)*/g, "").split(",");
let strHex = "#";
for (let i = 0; i < aColor.length; i++) {
let hex = Number(aColor[i]).toString(16);
hex = hex.length == 1 ? "0" + hex : hex;
strHex += hex;
}
if (strHex.length !== 7) {
strHex = rgb;
}
return strHex;
} else if (reg.test(rgb)) {
const aNum = rgb.replace(/#/, "").split("");
if (aNum.length === 6) {
return rgb;
} else if (aNum.length === 3) {
let numHex = "#";
for (let i = 0; i < aNum.length; i += 1) {
numHex += aNum[i] + aNum[i];
}
return numHex;
}
} else {
return rgb;
}
return rgb;
}
function colorToRgba(color, alpha = 0.3) {
color = rgbToHex(color);
const reg = /^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/;
let sColor = color.toLowerCase();
if (sColor && reg.test(sColor)) {
if (sColor.length === 4) {
let sColorNew = "#";
for (let i = 1; i < 4; i += 1) {
sColorNew += sColor.slice(i, i + 1).concat(sColor.slice(i, i + 1));
}
sColor = sColorNew;
}
const sColorChange = [
parseInt("0x" + sColor.slice(1, 3)),
parseInt("0x" + sColor.slice(3, 5)),
parseInt("0x" + sColor.slice(5, 7))
];
return `rgba(${sColorChange.join(",")},${alpha})`;
} else {
return sColor;
}
}
const colorGradients = {
colorGradient,
hexToRgb,
rgbToHex,
colorToRgba
};
exports.colorGradients = colorGradients;
//# sourceMappingURL=../../../../../.sourcemap/mp-weixin/uni_modules/uview-pro/libs/function/colorGradient.js.map
@@ -0,0 +1,20 @@
"use strict";
let timeout = null;
function debounce(func, wait = 500, immediate = false) {
if (timeout !== null)
clearTimeout(timeout);
if (immediate) {
const callNow = !timeout;
timeout = setTimeout(() => {
timeout = null;
}, wait);
if (callNow)
typeof func === "function" && func();
} else {
timeout = setTimeout(() => {
typeof func === "function" && func();
}, wait);
}
}
exports.debounce = debounce;
//# sourceMappingURL=../../../../../.sourcemap/mp-weixin/uni_modules/uview-pro/libs/function/debounce.js.map
@@ -0,0 +1,31 @@
"use strict";
function deepClone(obj, cache = /* @__PURE__ */ new WeakMap()) {
if (obj === null || typeof obj !== "object")
return obj;
if (cache.has(obj))
return cache.get(obj);
let clone;
if (obj instanceof Date) {
clone = new Date(obj.getTime());
} else if (obj instanceof RegExp) {
clone = new RegExp(obj);
} else if (obj instanceof Map) {
clone = new Map(Array.from(obj, ([key, value]) => [key, deepClone(value, cache)]));
} else if (obj instanceof Set) {
clone = new Set(Array.from(obj, (value) => deepClone(value, cache)));
} else if (Array.isArray(obj)) {
clone = obj.map((value) => deepClone(value, cache));
} else if (Object.prototype.toString.call(obj) === "[object Object]") {
clone = Object.create(Object.getPrototypeOf(obj));
cache.set(obj, clone);
for (const [key, value] of Object.entries(obj)) {
clone[key] = deepClone(value, cache);
}
} else {
clone = Object.assign({}, obj);
}
cache.set(obj, clone);
return clone;
}
exports.deepClone = deepClone;
//# sourceMappingURL=../../../../../.sourcemap/mp-weixin/uni_modules/uview-pro/libs/function/deepClone.js.map
@@ -0,0 +1,30 @@
"use strict";
const uni_modules_uviewPro_libs_function_deepClone = require("./deepClone.js");
function deepMerge(target = {}, source = {}) {
target = uni_modules_uviewPro_libs_function_deepClone.deepClone(target);
if (typeof target !== "object" || target === null || typeof source !== "object" || source === null)
return target;
const merged = Array.isArray(target) ? target.slice() : Object.assign({}, target);
for (const prop in source) {
if (!Object.prototype.hasOwnProperty.call(source, prop))
continue;
const sourceValue = source[prop];
const targetValue = merged[prop];
if (sourceValue instanceof Date) {
merged[prop] = new Date(sourceValue);
} else if (sourceValue instanceof RegExp) {
merged[prop] = new RegExp(sourceValue);
} else if (sourceValue instanceof Map) {
merged[prop] = new Map(sourceValue);
} else if (sourceValue instanceof Set) {
merged[prop] = new Set(sourceValue);
} else if (typeof sourceValue === "object" && sourceValue !== null) {
merged[prop] = deepMerge(targetValue, sourceValue);
} else {
merged[prop] = sourceValue;
}
}
return merged;
}
exports.deepMerge = deepMerge;
//# sourceMappingURL=../../../../../.sourcemap/mp-weixin/uni_modules/uview-pro/libs/function/deepMerge.js.map
@@ -0,0 +1,39 @@
"use strict";
function getParent(name, keys) {
var _a;
let parent = this.$parent;
while (parent) {
if (((_a = parent.$options) == null ? void 0 : _a.name) !== name) {
parent = parent.$parent;
} else {
const data = {};
if (Array.isArray(keys)) {
keys.forEach((val) => {
data[val] = (parent == null ? void 0 : parent[val]) ? parent[val] : "";
});
} else {
for (const i in keys) {
if (Array.isArray(keys[i])) {
if (keys[i].length) {
data[i] = keys[i];
} else {
data[i] = parent[i];
}
} else if (keys[i] && keys[i].constructor === Object) {
if (Object.keys(keys[i]).length) {
data[i] = keys[i];
} else {
data[i] = parent[i];
}
} else {
data[i] = keys[i] || keys[i] === false ? keys[i] : parent[i];
}
}
}
return data;
}
}
return {};
}
exports.getParent = getParent;
//# sourceMappingURL=../../../../../.sourcemap/mp-weixin/uni_modules/uview-pro/libs/function/getParent.js.map
@@ -0,0 +1,17 @@
"use strict";
const common_vendor = require("../../../../common/vendor.js");
function getRect(selector, _instance = null, all = false) {
const instance = _instance || common_vendor.getCurrentInstance();
return new Promise((resolve) => {
common_vendor.index.createSelectorQuery().in(instance == null ? void 0 : instance.proxy)[all ? "selectAll" : "select"](selector).boundingClientRect((rect) => {
if (all && Array.isArray(rect) && rect.length) {
resolve(rect);
}
if (!all && rect) {
resolve(rect);
}
}).exec();
});
}
exports.getRect = getRect;
//# sourceMappingURL=../../../../../.sourcemap/mp-weixin/uni_modules/uview-pro/libs/function/getRect.js.map
@@ -0,0 +1,28 @@
"use strict";
function guid(len = 32, firstU = true, radix) {
const chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split("");
const uuid = [];
const base = radix || chars.length;
if (len) {
for (let i = 0; i < len; i++)
uuid[i] = chars[0 | Math.random() * base];
} else {
let r;
uuid[8] = uuid[13] = uuid[18] = uuid[23] = "-";
uuid[14] = "4";
for (let i = 0; i < 36; i++) {
if (!uuid[i]) {
r = 0 | Math.random() * 16;
uuid[i] = chars[i == 19 ? r & 3 | 8 : r];
}
}
}
if (firstU) {
uuid.shift();
return "u" + uuid.join("");
} else {
return uuid.join("");
}
}
exports.guid = guid;
//# sourceMappingURL=../../../../../.sourcemap/mp-weixin/uni_modules/uview-pro/libs/function/guid.js.map
@@ -0,0 +1,48 @@
"use strict";
function queryParams(data = {}, isPrefix = true, arrayFormat = "brackets") {
const prefix = isPrefix ? "?" : "";
const _result = [];
if (!["indices", "brackets", "repeat", "comma"].includes(arrayFormat))
arrayFormat = "brackets";
for (const key in data) {
const value = data[key];
if (["", void 0, null].includes(value)) {
continue;
}
if (Array.isArray(value)) {
switch (arrayFormat) {
case "indices":
for (let i = 0; i < value.length; i++) {
_result.push(`${key}[${i}]=${value[i]}`);
}
break;
case "brackets":
value.forEach((_value) => {
_result.push(`${key}[]=${_value}`);
});
break;
case "repeat":
value.forEach((_value) => {
_result.push(`${key}=${_value}`);
});
break;
case "comma":
let commaStr = "";
value.forEach((_value) => {
commaStr += (commaStr ? "," : "") + _value;
});
_result.push(`${key}=${commaStr}`);
break;
default:
value.forEach((_value) => {
_result.push(`${key}[]=${_value}`);
});
}
} else {
_result.push(`${key}=${value}`);
}
}
return _result.length ? prefix + _result.join("&") : "";
}
exports.queryParams = queryParams;
//# sourceMappingURL=../../../../../.sourcemap/mp-weixin/uni_modules/uview-pro/libs/function/queryParams.js.map
@@ -0,0 +1,11 @@
"use strict";
function random(min, max) {
if (min >= 0 && max > 0 && max >= min) {
const gab = max - min + 1;
return Math.floor(Math.random() * gab + min);
} else {
return 0;
}
}
exports.random = random;
//# sourceMappingURL=../../../../../.sourcemap/mp-weixin/uni_modules/uview-pro/libs/function/random.js.map
@@ -0,0 +1,6 @@
"use strict";
function randomArray(array = []) {
return array.sort(() => Math.random() - 0.5);
}
exports.randomArray = randomArray;
//# sourceMappingURL=../../../../../.sourcemap/mp-weixin/uni_modules/uview-pro/libs/function/randomArray.js.map
@@ -0,0 +1,88 @@
"use strict";
const common_vendor = require("../../../../common/vendor.js");
class Router {
// route: (options?: string | RouterConfig, params?: Record<string, any>) => Promise<void>;
constructor() {
this.config = {
type: "navigateTo",
url: "",
delta: 1,
// navigateBack页面后退时,回退的层数
params: {},
// 传递的参数
animationType: "pop-in",
// 窗口动画,只在APP有效
animationDuration: 300,
// 窗口动画持续时间,单位毫秒,只在APP有效
intercept: false
// 是否需要拦截
};
this.route = this.route.bind(this);
}
// 判断url前面是否有"/",如果没有则加上,否则无法跳转
addRootPath(url) {
return url[0] === "/" ? url : `/${url}`;
}
// 整合路由参数
mixinParam(url, params) {
url = url && this.addRootPath(url);
let query = "";
if (/.*\/.*\?.*=.*/.test(url)) {
query = common_vendor.index.$u.queryParams(params, false);
return url + "&" + query;
} else {
query = common_vendor.index.$u.queryParams(params);
return url + query;
}
}
/**
* 路由跳转主方法
* @param options 跳转配置或url字符串
* @param params 跳转参数
*/
async route(options = {}, params = {}) {
let mergeConfig = {};
if (typeof options === "string") {
mergeConfig.url = this.mixinParam(options, params);
mergeConfig.type = "navigateTo";
} else {
mergeConfig = common_vendor.index.$u.deepMerge(this.config, options);
mergeConfig.url = this.mixinParam(options.url || "", options.params || {});
}
if (params.intercept) {
this.config.intercept = params.intercept;
}
mergeConfig.params = params;
mergeConfig = common_vendor.index.$u.deepMerge(this.config, mergeConfig);
if (common_vendor.index.$u.routeIntercept && typeof common_vendor.index.$u.routeIntercept === "function") {
const isNext = await new Promise((resolve) => {
common_vendor.index.$u.routeIntercept(mergeConfig, resolve);
});
isNext && this.openPage(mergeConfig);
} else {
this.openPage(mergeConfig);
}
}
// 执行路由跳转
openPage(config) {
const { url = "", type = "", delta = 1, animationDuration = 300 } = config;
if (type == "navigateTo" || type == "to") {
common_vendor.index.navigateTo({ url, animationDuration });
}
if (type == "redirectTo" || type == "redirect") {
common_vendor.index.redirectTo({ url });
}
if (type == "switchTab" || type == "tab") {
common_vendor.index.switchTab({ url });
}
if (type == "reLaunch" || type == "launch") {
common_vendor.index.reLaunch({ url });
}
if (type == "navigateBack" || type == "back") {
common_vendor.index.navigateBack({ delta });
}
}
}
const route = new Router().route;
exports.route = route;
//# sourceMappingURL=../../../../../.sourcemap/mp-weixin/uni_modules/uview-pro/libs/function/route.js.map
@@ -0,0 +1,11 @@
"use strict";
const common_vendor = require("../../../../common/vendor.js");
function os() {
return common_vendor.index.getSystemInfoSync().platform;
}
function sys() {
return common_vendor.index.getSystemInfoSync();
}
exports.os = os;
exports.sys = sys;
//# sourceMappingURL=../../../../../.sourcemap/mp-weixin/uni_modules/uview-pro/libs/function/sys.js.map
@@ -0,0 +1,173 @@
"use strict";
function email(value) {
return /[\w!#$%&'*+/=?^_`{|}~-]+(?:\.[\w!#$%&'*+/=?^_`{|}~-]+)*@(?:[\w](?:[\w-]*[\w])?\.)+[\w](?:[\w-]*[\w])?/.test(
value
);
}
function mobile(value) {
return /^1[3-9]\d{9}$/.test(value);
}
function url(value) {
return /http(s)?:\/\/([\w-]+\.)+[\w-]+(\/[\w-.\/?%&=]*)?/.test(value);
}
function date(value) {
return !/Invalid|NaN/.test(new Date(value).toString());
}
function dateISO(value) {
return /^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/.test(value);
}
function number(value) {
return /^[\+-]?(\d+\.?\d*|\.\d+|\d\.\d+e\+\d+)$/.test(value);
}
function digits(value) {
return /^\d+$/.test(value);
}
function idCard(value) {
return /^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}([0-9]|X)$/.test(value);
}
function carNo(value) {
const xreg = /^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}(([0-9]{5}[DF]$)|([DF][A-HJ-NP-Z0-9][0-9]{4}$))/;
const creg = /^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}[A-HJ-NP-Z0-9]{4}[A-HJ-NP-Z0-9挂学警港澳]{1}$/;
if (value.length === 7) {
return creg.test(value);
} else if (value.length === 8) {
return xreg.test(value);
} else {
return false;
}
}
function amount(value) {
return /^[1-9]\d*(,\d{3})*(\.\d{1,2})?$|^0\.\d{1,2}$/.test(value);
}
function chinese(value) {
let reg = /^[\u4e00-\u9fa5]+$/gi;
return reg.test(value);
}
function letter(value) {
return /^[a-zA-Z]*$/.test(value);
}
function enOrNum(value) {
let reg = /^[0-9a-zA-Z]*$/g;
return reg.test(value);
}
function contains(value, param) {
return value.indexOf(param) >= 0;
}
function range(value, param) {
return value >= param[0] && value <= param[1];
}
function rangeLength(value, param) {
return value.length >= param[0] && value.length <= param[1];
}
function landline(value) {
let reg = /^\d{3,4}-\d{7,8}(-\d{3,4})?$/;
return reg.test(value);
}
function empty(value) {
switch (typeof value) {
case "undefined":
return true;
case "string":
if (value.replace(/(^[ \t\n\r]*)|([ \t\n\r]*$)/g, "").length == 0)
return true;
break;
case "boolean":
if (!value)
return true;
break;
case "number":
if (0 === value || isNaN(value))
return true;
break;
case "object":
if (null === value || value.length === 0)
return true;
for (var i in value) {
return false;
}
return true;
}
return false;
}
function jsonString(value) {
if (typeof value == "string") {
try {
var obj = JSON.parse(value);
if (typeof obj == "object" && obj) {
return true;
} else {
return false;
}
} catch (e) {
return false;
}
}
return false;
}
function array(value) {
if (typeof Array.isArray === "function") {
return Array.isArray(value);
} else {
return Object.prototype.toString.call(value) === "[object Array]";
}
}
function object(value) {
return Object.prototype.toString.call(value) === "[object Object]";
}
function code(value, len = 6) {
return new RegExp(`^\\d{${len}}$`).test(value);
}
function func(value) {
return typeof value === "function";
}
function promise(value) {
return object(value) && func(value.then) && func(value.catch);
}
function image(value) {
const newValue = value.split("?")[0];
const IMAGE_REGEXP = /\.(jpeg|jpg|gif|png|svg|webp|jfif|bmp|dpg)/i;
return IMAGE_REGEXP.test(newValue);
}
function video(value) {
const VIDEO_REGEXP = /\.(mp4|mpg|mpeg|dat|asf|avi|rm|rmvb|mov|wmv|flv|mkv|m3u8)/i;
return VIDEO_REGEXP.test(value);
}
function regExp(o) {
return o && Object.prototype.toString.call(o) === "[object RegExp]";
}
function string(value) {
return typeof value === "string";
}
const test = {
email,
mobile,
url,
date,
dateISO,
number,
digits,
idCard,
carNo,
amount,
chinese,
letter,
enOrNum,
contains,
range,
rangeLength,
empty,
isEmpty: empty,
jsonString,
landline,
object,
array,
code,
func,
promise,
video,
image,
regExp,
string
};
exports.test = test;
//# sourceMappingURL=../../../../../.sourcemap/mp-weixin/uni_modules/uview-pro/libs/function/test.js.map
@@ -0,0 +1,23 @@
"use strict";
let flag;
function throttle(func, wait = 500, immediate = true) {
if (immediate) {
if (!flag) {
flag = true;
typeof func === "function" && func();
setTimeout(() => {
flag = false;
}, wait);
}
} else {
if (!flag) {
flag = true;
setTimeout(() => {
flag = false;
typeof func === "function" && func();
}, wait);
}
}
}
exports.throttle = throttle;
//# sourceMappingURL=../../../../../.sourcemap/mp-weixin/uni_modules/uview-pro/libs/function/throttle.js.map
@@ -0,0 +1,52 @@
"use strict";
if (!String.prototype.padStart) {
String.prototype.padStart = function(maxLength, fillString = " ") {
if (Object.prototype.toString.call(fillString) !== "[object String]")
throw new TypeError("fillString must be String");
let str = this;
if (str.length >= maxLength)
return String(str);
let fillLength = maxLength - str.length, times = Math.ceil(fillLength / fillString.length);
while (times >>= 1) {
fillString += fillString;
if (times === 1) {
fillString += fillString;
}
}
return fillString.slice(0, fillLength) + str;
};
}
function timeFormat(dateTime = null, fmt = "yyyy-mm-dd") {
if (!dateTime)
dateTime = Number(/* @__PURE__ */ new Date());
if (typeof dateTime === "number" || typeof dateTime === "string") {
if (dateTime.toString().length == 10)
dateTime = Number(dateTime) * 1e3;
}
const date = new Date(dateTime);
let ret;
const opt = {
"y+": date.getFullYear().toString(),
// 年
"m+": (date.getMonth() + 1).toString(),
// 月
"d+": date.getDate().toString(),
// 日
"h+": date.getHours().toString(),
// 时
"M+": date.getMinutes().toString(),
// 分
"s+": date.getSeconds().toString()
// 秒
// 有其他格式化字符需求可以继续添加,必须转化成字符串
};
for (const k in opt) {
ret = new RegExp("(" + k + ")").exec(fmt);
if (ret) {
fmt = fmt.replace(ret[1], ret[1].length == 1 ? opt[k] : opt[k].padStart(ret[1].length, "0"));
}
}
return fmt;
}
exports.timeFormat = timeFormat;
//# sourceMappingURL=../../../../../.sourcemap/mp-weixin/uni_modules/uview-pro/libs/function/timeFormat.js.map
@@ -0,0 +1,40 @@
"use strict";
const uni_modules_uviewPro_libs_function_timeFormat = require("./timeFormat.js");
function timeFrom(dateTime = null, format = "yyyy-mm-dd") {
if (!dateTime)
dateTime = Number(/* @__PURE__ */ new Date());
if (typeof dateTime === "number" || typeof dateTime === "string") {
if (dateTime.toString().length == 10)
dateTime = Number(dateTime) * 1e3;
}
const timestamp = +new Date(Number(dateTime));
const timer = (Number(/* @__PURE__ */ new Date()) - timestamp) / 1e3;
let tips = "";
switch (true) {
case timer < 300:
tips = "刚刚";
break;
case (timer >= 300 && timer < 3600):
tips = parseInt(String(timer / 60)) + "分钟前";
break;
case (timer >= 3600 && timer < 86400):
tips = parseInt(String(timer / 3600)) + "小时前";
break;
case (timer >= 86400 && timer < 2592e3):
tips = parseInt(String(timer / 86400)) + "天前";
break;
default:
if (format === false) {
if (timer >= 2592e3 && timer < 365 * 86400) {
tips = parseInt(String(timer / (86400 * 30))) + "个月前";
} else {
tips = parseInt(String(timer / (86400 * 365))) + "年前";
}
} else {
tips = uni_modules_uviewPro_libs_function_timeFormat.timeFormat(timestamp, format);
}
}
return tips;
}
exports.timeFrom = timeFrom;
//# sourceMappingURL=../../../../../.sourcemap/mp-weixin/uni_modules/uview-pro/libs/function/timeFrom.js.map
@@ -0,0 +1,11 @@
"use strict";
const common_vendor = require("../../../../common/vendor.js");
function toast(title, option = 1500) {
common_vendor.index.showToast({
title,
icon: typeof option === "string" ? option : typeof option === "object" ? option.icon || "none" : "none",
duration: typeof option === "number" ? option : typeof option === "object" ? option.duration || "1500" : 1500
});
}
exports.toast = toast;
//# sourceMappingURL=../../../../../.sourcemap/mp-weixin/uni_modules/uview-pro/libs/function/toast.js.map
@@ -0,0 +1,16 @@
"use strict";
function trim(str, pos = "both") {
if (pos === "both") {
return str.replace(/^\s+|\s+$/g, "");
} else if (pos === "left") {
return str.replace(/^\s*/, "");
} else if (pos === "right") {
return str.replace(/(\s*$)/g, "");
} else if (pos === "all") {
return str.replace(/\s+/g, "");
} else {
return str;
}
}
exports.trim = trim;
//# sourceMappingURL=../../../../../.sourcemap/mp-weixin/uni_modules/uview-pro/libs/function/trim.js.map

Some files were not shown because too many files have changed in this diff Show More