no message
This commit is contained in:
82
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-avatar/props.js
vendored
Normal file
82
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-avatar/props.js
vendored
Normal file
@@ -0,0 +1,82 @@
|
||||
"use strict";
|
||||
const uni_modules_uviewPlus_libs_config_props = require("../../libs/config/props.js");
|
||||
const uni_modules_uviewPlus_libs_function_test = require("../../libs/function/test.js");
|
||||
const props = {
|
||||
props: {
|
||||
// 头像图片路径(不能为相对路径)
|
||||
src: {
|
||||
type: String,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.avatar.src
|
||||
},
|
||||
// 头像形状,circle-圆形,square-方形
|
||||
shape: {
|
||||
type: String,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.avatar.shape
|
||||
},
|
||||
// 头像尺寸
|
||||
size: {
|
||||
type: [String, Number],
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.avatar.size
|
||||
},
|
||||
// 裁剪模式
|
||||
mode: {
|
||||
type: String,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.avatar.mode
|
||||
},
|
||||
// 显示的文字
|
||||
text: {
|
||||
type: String,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.avatar.text
|
||||
},
|
||||
// 背景色
|
||||
bgColor: {
|
||||
type: String,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.avatar.bgColor
|
||||
},
|
||||
// 文字颜色
|
||||
color: {
|
||||
type: String,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.avatar.color
|
||||
},
|
||||
// 文字大小
|
||||
fontSize: {
|
||||
type: [String, Number],
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.avatar.fontSize
|
||||
},
|
||||
// 显示的图标
|
||||
icon: {
|
||||
type: String,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.avatar.icon
|
||||
},
|
||||
// 显示小程序头像,只对百度,微信,QQ小程序有效
|
||||
mpAvatar: {
|
||||
type: Boolean,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.avatar.mpAvatar
|
||||
},
|
||||
// 是否使用随机背景色
|
||||
randomBgColor: {
|
||||
type: Boolean,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.avatar.randomBgColor
|
||||
},
|
||||
// 加载失败的默认头像(组件有内置默认图片)
|
||||
defaultUrl: {
|
||||
type: String,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.avatar.defaultUrl
|
||||
},
|
||||
// 如果配置了randomBgColor为true,且配置了此值,则从默认的背景色数组中取出对应索引的颜色值,取值0-19之间
|
||||
colorIndex: {
|
||||
type: [String, Number],
|
||||
// 校验参数规则,索引在0-19之间
|
||||
validator(n) {
|
||||
return uni_modules_uviewPlus_libs_function_test.test.range(n, [0, 19]) || n === "";
|
||||
},
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.avatar.colorIndex
|
||||
},
|
||||
// 组件标识符
|
||||
name: {
|
||||
type: String,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.avatar.name
|
||||
}
|
||||
}
|
||||
};
|
||||
exports.props = props;
|
||||
35
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-avatar/u-avatar.acss
vendored
Normal file
35
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-avatar/u-avatar.acss
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
.u-empty.data-v-34d954f9,
|
||||
.u-empty__wrap.data-v-34d954f9,
|
||||
.u-tabs.data-v-34d954f9,
|
||||
.u-tabs__wrapper.data-v-34d954f9,
|
||||
.u-tabs__wrapper__scroll-view-wrapper.data-v-34d954f9,
|
||||
.u-tabs__wrapper__scroll-view.data-v-34d954f9,
|
||||
.u-tabs__wrapper__nav.data-v-34d954f9,
|
||||
.u-tabs__wrapper__nav__line.data-v-34d954f9 {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
flex-shrink: 0;
|
||||
flex-grow: 0;
|
||||
flex-basis: auto;
|
||||
align-items: stretch;
|
||||
align-content: flex-start;
|
||||
}
|
||||
.u-avatar.data-v-34d954f9 {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
.u-avatar--circle.data-v-34d954f9 {
|
||||
border-radius: 100px;
|
||||
}
|
||||
.u-avatar--square.data-v-34d954f9 {
|
||||
border-radius: 4px;
|
||||
}
|
||||
.u-avatar__image--circle.data-v-34d954f9 {
|
||||
border-radius: 100px;
|
||||
overflow: hidden;
|
||||
}
|
||||
.u-avatar__image--square.data-v-34d954f9 {
|
||||
border-radius: 4px;
|
||||
}
|
||||
1
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-avatar/u-avatar.axml
vendored
Normal file
1
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-avatar/u-avatar.axml
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<view class="{{('u-avatar') + ' ' + 'data-v-34d954f9' + ' ' + k}}" style="{{l + ';' + m}}" onTap="{{n}}"><slot><block a:if="{{a}}"></block><u-icon a:elif="{{b}}" class="data-v-34d954f9" u-i="34d954f9-0" onVI="__l" u-p="{{c}}"></u-icon><up-text a:elif="{{d}}" class="data-v-34d954f9" u-i="34d954f9-1" onVI="__l" u-p="{{e}}"></up-text><image a:else class="{{('u-avatar__image') + ' ' + 'data-v-34d954f9' + ' ' + f}}" src="{{g}}" mode="{{h}}" onError="{{i}}" style="{{j}}"></image></slot></view>
|
||||
132
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-avatar/u-avatar.js
vendored
Normal file
132
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-avatar/u-avatar.js
vendored
Normal file
@@ -0,0 +1,132 @@
|
||||
"use strict";
|
||||
const uni_modules_uviewPlus_components_uAvatar_props = require("./props.js");
|
||||
const uni_modules_uviewPlus_libs_mixin_mpMixin = require("../../libs/mixin/mpMixin.js");
|
||||
const uni_modules_uviewPlus_libs_mixin_mixin = require("../../libs/mixin/mixin.js");
|
||||
const uni_modules_uviewPlus_libs_function_index = require("../../libs/function/index.js");
|
||||
const common_vendor = require("../../../../common/vendor.js");
|
||||
const base64Avatar = "data:image/jpg;base64,/9j/4QAYRXhpZgAASUkqAAgAAAAAAAAAAAAAAP/sABFEdWNreQABAAQAAAA8AAD/4QMraHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wLwA8P3hwYWNrZXQgYmVnaW49Iu+7vyIgaWQ9Ilc1TTBNcENlaGlIenJlU3pOVGN6a2M5ZCI/PiA8eDp4bXBtZXRhIHhtbG5zOng9ImFkb2JlOm5zOm1ldGEvIiB4OnhtcHRrPSJBZG9iZSBYTVAgQ29yZSA1LjMtYzAxMSA2Ni4xNDU2NjEsIDIwMTIvMDIvMDYtMTQ6NTY6MjcgICAgICAgICI+IDxyZGY6UkRGIHhtbG5zOnJkZj0iaHR0cDovL3d3dy53My5vcmcvMTk5OS8wMi8yMi1yZGYtc3ludGF4LW5zIyI+IDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiIHhtbG5zOnhtcD0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wLyIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bXA6Q3JlYXRvclRvb2w9IkFkb2JlIFBob3Rvc2hvcCBDUzYgKFdpbmRvd3MpIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOjREMEQwRkY0RjgwNDExRUE5OTY2RDgxODY3NkJFODMxIiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOjREMEQwRkY1RjgwNDExRUE5OTY2RDgxODY3NkJFODMxIj4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6NEQwRDBGRjJGODA0MTFFQTk5NjZEODE4Njc2QkU4MzEiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6NEQwRDBGRjNGODA0MTFFQTk5NjZEODE4Njc2QkU4MzEiLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz7/7gAOQWRvYmUAZMAAAAAB/9sAhAAGBAQEBQQGBQUGCQYFBgkLCAYGCAsMCgoLCgoMEAwMDAwMDBAMDg8QDw4MExMUFBMTHBsbGxwfHx8fHx8fHx8fAQcHBw0MDRgQEBgaFREVGh8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx//wAARCADIAMgDAREAAhEBAxEB/8QAcQABAQEAAwEBAAAAAAAAAAAAAAUEAQMGAgcBAQAAAAAAAAAAAAAAAAAAAAAQAAIBAwICBgkDBQAAAAAAAAABAhEDBCEFMVFBYXGREiKBscHRMkJSEyOh4XLxYjNDFBEBAAAAAAAAAAAAAAAAAAAAAP/aAAwDAQACEQMRAD8A/fAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHbHFyZ/Dam+yLA+Z2L0Pjtyj2poD4AAAAAAAAAAAAAAAAAAAAAAAAKWFs9y6lcvvwQeqj8z9wFaziY1n/HbUX9XF97A7QAGXI23EvJ1goyfzR0YEfN269jeZ+a03pNe0DIAAAAAAAAAAAAAAAAAAAACvtO3RcVkXlWutuL9YFYAAAAAOJRjKLjJVi9GmB5/csH/mu1h/in8PU+QGMAAAAAAAAAAAAAAAAAAaMDG/6MmMH8C80+xAelSSVFolwQAAAAAAAHVlWI37ErUulaPk+hgeYnCUJuElSUXRrrQHAAAAAAAAAAAAAAAAABa2Oz4bM7r4zdF2ICmAAAAAAAAAg7zZ8GX41wuJP0rRgYAAAAAAAAAAAAAAAAAD0m2R8ODaXU33tsDSAAAAAAAAAlb9HyWZcnJd9PcBHAAAAAAAAAAAAAAAAAPS7e64Vn+KA0AAAAAAAAAJm+v8Ftf3ewCKAAAAAAAAAAAAAAAAAX9muqeGo9NttP06+0DcAAAAAAAAAjb7dTu2ra+VOT9P8AQCWAAAAAAAAAAAAAAAAAUNmyPt5Ltv4bui/kuAF0AAAAAAADiUlGLlJ0SVW+oDzOXfd/Ind6JPRdS0QHSAAAAAAAAAAAAAAAAAE2nVaNcGB6Lbs6OTao9LsF51z60BrAAAAAABJ3jOVHjW3r/sa9QEgAAAAAAAAAAAAAAAAAAAPu1duWriuW34ZR4MC9hbnZyEoy8l36XwfYBsAAADaSq9EuLAlZ+7xSdrGdW9Hc5dgEdtt1erfFgAAAAAAAAAAAAAAAAADVjbblX6NR8MH80tEBRs7HYivyzlN8lovaBPzduvY0m6eK10TXtAyAarO55lpJK54orolr+4GqO/Xaea1FvqbXvA+Z77kNeW3GPbV+4DJfzcm/pcm3H6Vou5AdAFLC2ed2Pjv1txa8sV8T6wOL+yZEKu1JXFy4MDBOE4ScZxcZLinoB8gAAAAAAAAAAAB242LeyJ+C3GvN9C7QLmJtePYpKS+5c+p8F2IDYAANJqj1T4oCfk7Nj3G5Wn9qXJax7gJ93Z82D8sVNc4v30A6Xg5i42Z+iLfqARwcyT0sz9MWvWBps7LlTf5Grce9/oBTxdtxseklHxT+uWr9AGoAB138ezfj4bsFJdD6V2MCPm7RdtJzs1uW1xXzL3gTgAAAAAAAAADRhYc8q74I6RWs5ckB6GxYtWLat21SK731sDsAAAAAAAAAAAAAAAASt021NO/YjrxuQXT1oCOAAAAAAABzGLlJRSq26JAelwsWONYjbXxcZvmwO8AAAAAAAAAAAAAAAAAAef3TEWPkVivx3NY9T6UBiAAAAAABo2+VmGXblddIJ8eivRUD0oAAAAAAAAAAAAAAAAAAAYt4tKeFKVNYNSXfRgefAAAAAAAAr7VuSSWPedKaW5v1MCsAAAAAAAAAAAAAAAAAAIe6bj96Ts2n+JPzSXzP3ATgAAAAAAAAFbbt1UUrOQ9FpC4/UwK6aaqtU+DAAAAAAAAAAAAAAA4lKMIuUmoxWrb4ARNx3R3q2rLpa4Sl0y/YCcAAAAAAAAAAANmFud7G8r89r6X0dgFvGzLGRGtuWvTF6NAdwAAAAAAAAAAAy5W442PVN+K59EePp5ARMvOv5MvO6QXCC4AZwAAAAAAAAAAAAAcxlKLUotprg1owN+PvORborq+7Hnwl3gUbO74VzRydt8pKn68ANcJwmqwkpLmnUDkAAAAfNy9atqtyagut0AxXt5xIV8Fbj6lRd7Am5G65V6qUvtwfyx94GMAAAAAAAAAAAAAAAAAAAOU2nVOj5gdsc3LiqRvTpyqwOxbnnrhdfpSfrQB7pnv/AGvuS9gHXPMy5/Fem1yq0v0A6W29XqwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAf//Z";
|
||||
const _sfc_main = {
|
||||
name: "u-avatar",
|
||||
mixins: [uni_modules_uviewPlus_libs_mixin_mpMixin.mpMixin, uni_modules_uviewPlus_libs_mixin_mixin.mixin, uni_modules_uviewPlus_components_uAvatar_props.props],
|
||||
data() {
|
||||
return {
|
||||
// 如果配置randomBgColor参数为true,在图标或者文字的模式下,会随机从中取出一个颜色值当做背景色
|
||||
colors: [
|
||||
"#ffb34b",
|
||||
"#f2bba9",
|
||||
"#f7a196",
|
||||
"#f18080",
|
||||
"#88a867",
|
||||
"#bfbf39",
|
||||
"#89c152",
|
||||
"#94d554",
|
||||
"#f19ec2",
|
||||
"#afaae4",
|
||||
"#e1b0df",
|
||||
"#c38cc1",
|
||||
"#72dcdc",
|
||||
"#9acdcb",
|
||||
"#77b1cc",
|
||||
"#448aca",
|
||||
"#86cefa",
|
||||
"#98d1ee",
|
||||
"#73d1f1",
|
||||
"#80a7dc"
|
||||
],
|
||||
avatarUrl: this.src,
|
||||
allowMp: false
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
// 监听头像src的变化,赋值给内部的avatarUrl变量,因为图片加载失败时,需要修改图片的src为默认值
|
||||
// 而组件内部不能直接修改props的值,所以需要一个中间变量
|
||||
src: {
|
||||
immediate: true,
|
||||
handler(newVal) {
|
||||
this.avatarUrl = newVal;
|
||||
if (!newVal) {
|
||||
this.errorHandler();
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
imageStyle() {
|
||||
const style = {};
|
||||
return style;
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.init();
|
||||
},
|
||||
emits: ["click"],
|
||||
methods: {
|
||||
addStyle: uni_modules_uviewPlus_libs_function_index.addStyle,
|
||||
addUnit: uni_modules_uviewPlus_libs_function_index.addUnit,
|
||||
random: uni_modules_uviewPlus_libs_function_index.random,
|
||||
init() {
|
||||
},
|
||||
// 判断传入的name属性,是否图片路径,只要带有"/"均认为是图片形式
|
||||
isImg() {
|
||||
return this.src.indexOf("/") !== -1;
|
||||
},
|
||||
// 图片加载时失败时触发
|
||||
errorHandler() {
|
||||
this.avatarUrl = this.defaultUrl || base64Avatar;
|
||||
},
|
||||
clickHandler() {
|
||||
this.$emit("click", this.name);
|
||||
}
|
||||
}
|
||||
};
|
||||
if (!Array) {
|
||||
const _easycom_u_icon2 = common_vendor.resolveComponent("u-icon");
|
||||
const _easycom_up_text2 = common_vendor.resolveComponent("up-text");
|
||||
(_easycom_u_icon2 + _easycom_up_text2)();
|
||||
}
|
||||
const _easycom_u_icon = () => "../u-icon/u-icon.js";
|
||||
const _easycom_up_text = () => "../u-text/u-text.js";
|
||||
if (!Math) {
|
||||
(_easycom_u_icon + _easycom_up_text)();
|
||||
}
|
||||
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
return common_vendor.e({
|
||||
a: _ctx.mpAvatar && $data.allowMp
|
||||
}, _ctx.mpAvatar && $data.allowMp ? {} : _ctx.icon ? {
|
||||
c: common_vendor.p({
|
||||
name: _ctx.icon,
|
||||
size: _ctx.fontSize,
|
||||
color: _ctx.color
|
||||
})
|
||||
} : _ctx.text ? {
|
||||
e: common_vendor.p({
|
||||
text: _ctx.text,
|
||||
size: _ctx.fontSize,
|
||||
color: _ctx.color,
|
||||
align: "center",
|
||||
customStyle: "justify-content: center"
|
||||
})
|
||||
} : {
|
||||
f: common_vendor.n(`u-avatar__image--${_ctx.shape}`),
|
||||
g: $data.avatarUrl || _ctx.defaultUrl,
|
||||
h: _ctx.mode,
|
||||
i: common_vendor.o((...args) => $options.errorHandler && $options.errorHandler(...args)),
|
||||
j: common_vendor.s({
|
||||
width: $options.addUnit(_ctx.size),
|
||||
height: $options.addUnit(_ctx.size)
|
||||
})
|
||||
}, {
|
||||
b: _ctx.icon,
|
||||
d: _ctx.text,
|
||||
k: common_vendor.n(`u-avatar--${_ctx.shape}`),
|
||||
l: common_vendor.s({
|
||||
backgroundColor: _ctx.text || _ctx.icon ? _ctx.randomBgColor ? $data.colors[_ctx.colorIndex !== "" ? _ctx.colorIndex : $options.random(0, 19)] : _ctx.bgColor : "transparent",
|
||||
width: $options.addUnit(_ctx.size),
|
||||
height: $options.addUnit(_ctx.size)
|
||||
}),
|
||||
m: common_vendor.s($options.addStyle(_ctx.customStyle)),
|
||||
n: common_vendor.o((...args) => $options.clickHandler && $options.clickHandler(...args))
|
||||
});
|
||||
}
|
||||
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-34d954f9"]]);
|
||||
my.createComponent(Component);
|
||||
8
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-avatar/u-avatar.json
vendored
Normal file
8
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-avatar/u-avatar.json
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"component": true,
|
||||
"styleIsolation": "apply-shared",
|
||||
"usingComponents": {
|
||||
"u-icon": "../u-icon/u-icon",
|
||||
"up-text": "../u-text/u-text"
|
||||
}
|
||||
}
|
||||
155
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-button/props.js
vendored
Normal file
155
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-button/props.js
vendored
Normal file
@@ -0,0 +1,155 @@
|
||||
"use strict";
|
||||
const uni_modules_uviewPlus_libs_config_props = require("../../libs/config/props.js");
|
||||
const props = {
|
||||
props: {
|
||||
// 是否细边框
|
||||
hairline: {
|
||||
type: Boolean,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.button.hairline
|
||||
},
|
||||
// 按钮的预置样式,info,primary,error,warning,success
|
||||
type: {
|
||||
type: String,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.button.type
|
||||
},
|
||||
// 按钮尺寸,large,normal,small,mini
|
||||
size: {
|
||||
type: String,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.button.size
|
||||
},
|
||||
// 按钮形状,circle(两边为半圆),square(带圆角)
|
||||
shape: {
|
||||
type: String,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.button.shape
|
||||
},
|
||||
// 按钮是否镂空
|
||||
plain: {
|
||||
type: Boolean,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.button.plain
|
||||
},
|
||||
// 是否禁止状态
|
||||
disabled: {
|
||||
type: Boolean,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.button.disabled
|
||||
},
|
||||
// 是否加载中
|
||||
loading: {
|
||||
type: Boolean,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.button.loading
|
||||
},
|
||||
// 加载中提示文字
|
||||
loadingText: {
|
||||
type: [String, Number],
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.button.loadingText
|
||||
},
|
||||
// 加载状态图标类型
|
||||
loadingMode: {
|
||||
type: String,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.button.loadingMode
|
||||
},
|
||||
// 加载图标大小
|
||||
loadingSize: {
|
||||
type: [String, Number],
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.button.loadingSize
|
||||
},
|
||||
// 开放能力,具体请看uniapp稳定关于button组件部分说明
|
||||
// https://uniapp.dcloud.io/component/button
|
||||
openType: {
|
||||
type: String,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.button.openType
|
||||
},
|
||||
// 用于 <form> 组件,点击分别会触发 <form> 组件的 submit/reset 事件
|
||||
// 取值为submit(提交表单),reset(重置表单)
|
||||
formType: {
|
||||
type: String,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.button.formType
|
||||
},
|
||||
// 打开 APP 时,向 APP 传递的参数,open-type=launchApp时有效
|
||||
// 只微信小程序、QQ小程序有效
|
||||
appParameter: {
|
||||
type: String,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.button.appParameter
|
||||
},
|
||||
// 指定是否阻止本节点的祖先节点出现点击态,微信小程序有效
|
||||
hoverStopPropagation: {
|
||||
type: Boolean,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.button.hoverStopPropagation
|
||||
},
|
||||
// 指定返回用户信息的语言,zh_CN 简体中文,zh_TW 繁体中文,en 英文。只微信小程序有效
|
||||
lang: {
|
||||
type: String,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.button.lang
|
||||
},
|
||||
// 会话来源,open-type="contact"时有效。只微信小程序有效
|
||||
sessionFrom: {
|
||||
type: String,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.button.sessionFrom
|
||||
},
|
||||
// 会话内消息卡片标题,open-type="contact"时有效
|
||||
// 默认当前标题,只微信小程序有效
|
||||
sendMessageTitle: {
|
||||
type: String,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.button.sendMessageTitle
|
||||
},
|
||||
// 会话内消息卡片点击跳转小程序路径,open-type="contact"时有效
|
||||
// 默认当前分享路径,只微信小程序有效
|
||||
sendMessagePath: {
|
||||
type: String,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.button.sendMessagePath
|
||||
},
|
||||
// 会话内消息卡片图片,open-type="contact"时有效
|
||||
// 默认当前页面截图,只微信小程序有效
|
||||
sendMessageImg: {
|
||||
type: String,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.button.sendMessageImg
|
||||
},
|
||||
// 是否显示会话内消息卡片,设置此参数为 true,用户进入客服会话会在右下角显示"可能要发送的小程序"提示,
|
||||
// 用户点击后可以快速发送小程序消息,open-type="contact"时有效
|
||||
showMessageCard: {
|
||||
type: Boolean,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.button.showMessageCard
|
||||
},
|
||||
// 额外传参参数,用于小程序的data-xxx属性,通过target.dataset.name获取
|
||||
dataName: {
|
||||
type: String,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.button.dataName
|
||||
},
|
||||
// 节流,一定时间内只能触发一次
|
||||
throttleTime: {
|
||||
type: [String, Number],
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.button.throttleTime
|
||||
},
|
||||
// 按住后多久出现点击态,单位毫秒
|
||||
hoverStartTime: {
|
||||
type: [String, Number],
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.button.hoverStartTime
|
||||
},
|
||||
// 手指松开后点击态保留时间,单位毫秒
|
||||
hoverStayTime: {
|
||||
type: [String, Number],
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.button.hoverStayTime
|
||||
},
|
||||
// 按钮文字,之所以通过props传入,是因为slot传入的话
|
||||
// nvue中无法控制文字的样式
|
||||
text: {
|
||||
type: [String, Number],
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.button.text
|
||||
},
|
||||
// 按钮图标
|
||||
icon: {
|
||||
type: String,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.button.icon
|
||||
},
|
||||
// 按钮图标
|
||||
iconColor: {
|
||||
type: String,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.button.icon
|
||||
},
|
||||
// 按钮颜色,支持传入linear-gradient渐变色
|
||||
color: {
|
||||
type: String,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.button.color
|
||||
}
|
||||
}
|
||||
};
|
||||
exports.props = props;
|
||||
163
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-button/u-button.acss
vendored
Normal file
163
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-button/u-button.acss
vendored
Normal file
@@ -0,0 +1,163 @@
|
||||
.u-empty.data-v-5ce41ee6,
|
||||
.u-empty__wrap.data-v-5ce41ee6,
|
||||
.u-tabs.data-v-5ce41ee6,
|
||||
.u-tabs__wrapper.data-v-5ce41ee6,
|
||||
.u-tabs__wrapper__scroll-view-wrapper.data-v-5ce41ee6,
|
||||
.u-tabs__wrapper__scroll-view.data-v-5ce41ee6,
|
||||
.u-tabs__wrapper__nav.data-v-5ce41ee6,
|
||||
.u-tabs__wrapper__nav__line.data-v-5ce41ee6 {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
flex-shrink: 0;
|
||||
flex-grow: 0;
|
||||
flex-basis: auto;
|
||||
align-items: stretch;
|
||||
align-content: flex-start;
|
||||
}
|
||||
.u-button.data-v-5ce41ee6 {
|
||||
width: 100%;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.u-button__text.data-v-5ce41ee6 {
|
||||
white-space: nowrap;
|
||||
line-height: 1;
|
||||
}
|
||||
.u-button.data-v-5ce41ee6:before {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border: inherit;
|
||||
border-radius: inherit;
|
||||
transform: translate(-50%, -50%);
|
||||
opacity: 0;
|
||||
content: " ";
|
||||
background-color: #000;
|
||||
border-color: #000;
|
||||
}
|
||||
.u-button--active.data-v-5ce41ee6:before {
|
||||
opacity: 0.15;
|
||||
}
|
||||
.u-button__icon + .u-button__text.data-v-5ce41ee6:not(:empty), .u-button__loading-text.data-v-5ce41ee6 {
|
||||
margin-left: 4px;
|
||||
}
|
||||
.u-button--plain.u-button--primary.data-v-5ce41ee6 {
|
||||
color: #3c9cff;
|
||||
}
|
||||
.u-button--plain.u-button--info.data-v-5ce41ee6 {
|
||||
color: #909399;
|
||||
}
|
||||
.u-button--plain.u-button--success.data-v-5ce41ee6 {
|
||||
color: #5ac725;
|
||||
}
|
||||
.u-button--plain.u-button--error.data-v-5ce41ee6 {
|
||||
color: #f56c6c;
|
||||
}
|
||||
.u-button--plain.u-button--warning.data-v-5ce41ee6 {
|
||||
color: #f56c6c;
|
||||
}
|
||||
.u-button.data-v-5ce41ee6 {
|
||||
height: 38px;
|
||||
position: relative;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
box-sizing: border-box;
|
||||
flex-direction: row;
|
||||
}
|
||||
.u-button__text.data-v-5ce41ee6 {
|
||||
font-size: 15px;
|
||||
}
|
||||
.u-button__loading-text.data-v-5ce41ee6 {
|
||||
font-size: 15px;
|
||||
margin-left: 4px;
|
||||
}
|
||||
.u-button--large.data-v-5ce41ee6 {
|
||||
width: 100%;
|
||||
height: 50px;
|
||||
padding: 0 15px;
|
||||
}
|
||||
.u-button--normal.data-v-5ce41ee6 {
|
||||
padding: 0 12px;
|
||||
font-size: 14px;
|
||||
}
|
||||
.u-button--small.data-v-5ce41ee6 {
|
||||
min-width: 60px;
|
||||
height: 30px;
|
||||
padding: 0px 8px;
|
||||
font-size: 12px;
|
||||
}
|
||||
.u-button--mini.data-v-5ce41ee6 {
|
||||
height: 22px;
|
||||
font-size: 10px;
|
||||
min-width: 50px;
|
||||
padding: 0px 8px;
|
||||
}
|
||||
.u-button--disabled.data-v-5ce41ee6 {
|
||||
opacity: 0.5;
|
||||
}
|
||||
.u-button--info.data-v-5ce41ee6 {
|
||||
color: #323233;
|
||||
background-color: #fff;
|
||||
border-color: #ebedf0;
|
||||
border-width: 1px;
|
||||
border-style: solid;
|
||||
}
|
||||
.u-button--success.data-v-5ce41ee6 {
|
||||
color: #fff;
|
||||
background-color: #5ac725;
|
||||
border-color: #5ac725;
|
||||
border-width: 1px;
|
||||
border-style: solid;
|
||||
}
|
||||
.u-button--primary.data-v-5ce41ee6 {
|
||||
color: #fff;
|
||||
background-color: #3c9cff;
|
||||
border-color: #3c9cff;
|
||||
border-width: 1px;
|
||||
border-style: solid;
|
||||
}
|
||||
.u-button--error.data-v-5ce41ee6 {
|
||||
color: #fff;
|
||||
background-color: #f56c6c;
|
||||
border-color: #f56c6c;
|
||||
border-width: 1px;
|
||||
border-style: solid;
|
||||
}
|
||||
.u-button--warning.data-v-5ce41ee6 {
|
||||
color: #fff;
|
||||
background-color: #f9ae3d;
|
||||
border-color: #f9ae3d;
|
||||
border-width: 1px;
|
||||
border-style: solid;
|
||||
}
|
||||
.u-button--block.data-v-5ce41ee6 {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
width: 100%;
|
||||
}
|
||||
.u-button--circle.data-v-5ce41ee6 {
|
||||
border-top-right-radius: 100px;
|
||||
border-top-left-radius: 100px;
|
||||
border-bottom-left-radius: 100px;
|
||||
border-bottom-right-radius: 100px;
|
||||
}
|
||||
.u-button--square.data-v-5ce41ee6 {
|
||||
border-bottom-left-radius: 3px;
|
||||
border-bottom-right-radius: 3px;
|
||||
border-top-left-radius: 3px;
|
||||
border-top-right-radius: 3px;
|
||||
}
|
||||
.u-button__icon.data-v-5ce41ee6 {
|
||||
min-width: 1em;
|
||||
line-height: inherit !important;
|
||||
vertical-align: top;
|
||||
}
|
||||
.u-button--plain.data-v-5ce41ee6 {
|
||||
background-color: #fff;
|
||||
}
|
||||
.u-button--hairline.data-v-5ce41ee6 {
|
||||
border-width: 0.5px !important;
|
||||
}
|
||||
1
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-button/u-button.axml
vendored
Normal file
1
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-button/u-button.axml
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<button hover-start-time="{{i}}" hover-stay-time="{{j}}" form-type="{{k}}" open-type="{{l}}" app-parameter="{{m}}" hover-stop-propagation="{{n}}" send-message-title="{{o}}" send-message-path="{{p}}" lang="{{q}}" data-name="{{r}}" session-from="{{s}}" send-message-img="{{t}}" show-message-card="{{v}}" onGetphonenumber="{{w}}" onGetuserinfo="{{x}}" onError="{{y}}" onOpensetting="{{z}}" onLaunchapp="{{A}}" onAgreeprivacyauthorization="{{B}}" hover-class="{{C}}" style="{{D + ';' + E}}" onTap="{{F}}" class="{{('u-button') + ' ' + 'u-reset-button' + ' ' + 'data-v-5ce41ee6' + ' ' + G}}"><block a:if="{{a}}"><u-loading-icon class="data-v-5ce41ee6" u-i="5ce41ee6-0" onVI="__l" u-p="{{b}}"></u-loading-icon><text class="u-button__loading-text data-v-5ce41ee6" style="{{d}}">{{c}}</text></block><block a:else><u-icon a:if="{{e}}" class="data-v-5ce41ee6" u-i="5ce41ee6-1" onVI="__l" u-p="{{f}}"></u-icon><slot><text class="u-button__text data-v-5ce41ee6" style="{{h}}">{{g}}</text></slot></block></button>
|
||||
207
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-button/u-button.js
vendored
Normal file
207
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-button/u-button.js
vendored
Normal file
@@ -0,0 +1,207 @@
|
||||
"use strict";
|
||||
const uni_modules_uviewPlus_libs_mixin_button = require("../../libs/mixin/button.js");
|
||||
const uni_modules_uviewPlus_libs_mixin_openType = require("../../libs/mixin/openType.js");
|
||||
const uni_modules_uviewPlus_libs_mixin_mpMixin = require("../../libs/mixin/mpMixin.js");
|
||||
const uni_modules_uviewPlus_libs_mixin_mixin = require("../../libs/mixin/mixin.js");
|
||||
const uni_modules_uviewPlus_components_uButton_props = require("./props.js");
|
||||
const uni_modules_uviewPlus_libs_function_index = require("../../libs/function/index.js");
|
||||
const uni_modules_uviewPlus_libs_function_throttle = require("../../libs/function/throttle.js");
|
||||
const uni_modules_uviewPlus_libs_config_color = require("../../libs/config/color.js");
|
||||
const common_vendor = require("../../../../common/vendor.js");
|
||||
const _sfc_main = {
|
||||
name: "u-button",
|
||||
mixins: [uni_modules_uviewPlus_libs_mixin_mpMixin.mpMixin, uni_modules_uviewPlus_libs_mixin_mixin.mixin, uni_modules_uviewPlus_libs_mixin_button.button, uni_modules_uviewPlus_libs_mixin_openType.openType, uni_modules_uviewPlus_components_uButton_props.props],
|
||||
data() {
|
||||
return {};
|
||||
},
|
||||
computed: {
|
||||
// 生成bem风格的类名
|
||||
bemClass() {
|
||||
if (!this.color) {
|
||||
return this.bem(
|
||||
"button",
|
||||
["type", "shape", "size"],
|
||||
["disabled", "plain", "hairline"]
|
||||
);
|
||||
} else {
|
||||
return this.bem(
|
||||
"button",
|
||||
["shape", "size"],
|
||||
["disabled", "plain", "hairline"]
|
||||
);
|
||||
}
|
||||
},
|
||||
loadingColor() {
|
||||
if (this.plain) {
|
||||
return this.color ? this.color : uni_modules_uviewPlus_libs_config_color.color[`u-${this.type}`];
|
||||
}
|
||||
if (this.type === "info") {
|
||||
return "#c9c9c9";
|
||||
}
|
||||
return "rgb(200, 200, 200)";
|
||||
},
|
||||
iconColorCom() {
|
||||
if (this.iconColor)
|
||||
return this.iconColor;
|
||||
if (this.plain) {
|
||||
return this.color ? this.color : this.type;
|
||||
} else {
|
||||
return this.type === "info" ? "#000000" : "#ffffff";
|
||||
}
|
||||
},
|
||||
baseColor() {
|
||||
let style = {};
|
||||
if (this.color) {
|
||||
style.color = this.plain ? this.color : "white";
|
||||
if (!this.plain) {
|
||||
style["background-color"] = this.color;
|
||||
}
|
||||
if (this.color.indexOf("gradient") !== -1) {
|
||||
style.borderTopWidth = 0;
|
||||
style.borderRightWidth = 0;
|
||||
style.borderBottomWidth = 0;
|
||||
style.borderLeftWidth = 0;
|
||||
if (!this.plain) {
|
||||
style.backgroundImage = this.color;
|
||||
}
|
||||
} else {
|
||||
style.borderColor = this.color;
|
||||
style.borderWidth = "1px";
|
||||
style.borderStyle = "solid";
|
||||
}
|
||||
}
|
||||
return style;
|
||||
},
|
||||
// nvue版本按钮的字体不会继承父组件的颜色,需要对每一个text组件进行单独的设置
|
||||
nvueTextStyle() {
|
||||
let style = {};
|
||||
if (this.type === "info") {
|
||||
style.color = "#323233";
|
||||
}
|
||||
if (this.color) {
|
||||
style.color = this.plain ? this.color : "white";
|
||||
}
|
||||
style.fontSize = this.textSize + "px";
|
||||
return style;
|
||||
},
|
||||
// 字体大小
|
||||
textSize() {
|
||||
let fontSize = 14, { size } = this;
|
||||
if (size === "large")
|
||||
fontSize = 16;
|
||||
if (size === "normal")
|
||||
fontSize = 14;
|
||||
if (size === "small")
|
||||
fontSize = 12;
|
||||
if (size === "mini")
|
||||
fontSize = 10;
|
||||
return fontSize;
|
||||
}
|
||||
},
|
||||
emits: [
|
||||
"click",
|
||||
"getphonenumber",
|
||||
"getuserinfo",
|
||||
"error",
|
||||
"opensetting",
|
||||
"launchapp",
|
||||
"agreeprivacyauthorization"
|
||||
],
|
||||
methods: {
|
||||
addStyle: uni_modules_uviewPlus_libs_function_index.addStyle,
|
||||
clickHandler() {
|
||||
if (!this.disabled && !this.loading) {
|
||||
uni_modules_uviewPlus_libs_function_throttle.throttle(() => {
|
||||
this.$emit("click");
|
||||
}, this.throttleTime);
|
||||
}
|
||||
},
|
||||
// 下面为对接uniapp官方按钮开放能力事件回调的对接
|
||||
getphonenumber(res) {
|
||||
this.$emit("getphonenumber", res);
|
||||
},
|
||||
getuserinfo(res) {
|
||||
this.$emit("getuserinfo", res);
|
||||
},
|
||||
error(res) {
|
||||
this.$emit("error", res);
|
||||
},
|
||||
opensetting(res) {
|
||||
this.$emit("opensetting", res);
|
||||
},
|
||||
launchapp(res) {
|
||||
this.$emit("launchapp", res);
|
||||
},
|
||||
agreeprivacyauthorization(res) {
|
||||
this.$emit("agreeprivacyauthorization", res);
|
||||
}
|
||||
}
|
||||
};
|
||||
if (!Array) {
|
||||
const _easycom_u_loading_icon2 = common_vendor.resolveComponent("u-loading-icon");
|
||||
const _easycom_u_icon2 = common_vendor.resolveComponent("u-icon");
|
||||
(_easycom_u_loading_icon2 + _easycom_u_icon2)();
|
||||
}
|
||||
const _easycom_u_loading_icon = () => "../u-loading-icon/u-loading-icon.js";
|
||||
const _easycom_u_icon = () => "../u-icon/u-icon.js";
|
||||
if (!Math) {
|
||||
(_easycom_u_loading_icon + _easycom_u_icon)();
|
||||
}
|
||||
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
return common_vendor.e({
|
||||
a: _ctx.loading
|
||||
}, _ctx.loading ? {
|
||||
b: common_vendor.p({
|
||||
mode: _ctx.loadingMode,
|
||||
size: _ctx.loadingSize * 1.15,
|
||||
color: $options.loadingColor
|
||||
}),
|
||||
c: common_vendor.t(_ctx.loadingText || _ctx.text),
|
||||
d: common_vendor.s({
|
||||
fontSize: $options.textSize + "px"
|
||||
})
|
||||
} : common_vendor.e({
|
||||
e: _ctx.icon
|
||||
}, _ctx.icon ? {
|
||||
f: common_vendor.p({
|
||||
name: _ctx.icon,
|
||||
color: $options.iconColorCom,
|
||||
size: $options.textSize * 1.35,
|
||||
customStyle: {
|
||||
marginRight: "2px"
|
||||
}
|
||||
})
|
||||
} : {}, {
|
||||
g: common_vendor.t(_ctx.text),
|
||||
h: common_vendor.s({
|
||||
fontSize: $options.textSize + "px"
|
||||
})
|
||||
}), {
|
||||
i: Number(_ctx.hoverStartTime),
|
||||
j: Number(_ctx.hoverStayTime),
|
||||
k: _ctx.formType,
|
||||
l: _ctx.openType,
|
||||
m: _ctx.appParameter,
|
||||
n: _ctx.hoverStopPropagation,
|
||||
o: _ctx.sendMessageTitle,
|
||||
p: _ctx.sendMessagePath,
|
||||
q: _ctx.lang,
|
||||
r: _ctx.dataName,
|
||||
s: _ctx.sessionFrom,
|
||||
t: _ctx.sendMessageImg,
|
||||
v: _ctx.showMessageCard,
|
||||
w: common_vendor.o((...args) => $options.getphonenumber && $options.getphonenumber(...args)),
|
||||
x: common_vendor.o((...args) => $options.getuserinfo && $options.getuserinfo(...args)),
|
||||
y: common_vendor.o((...args) => $options.error && $options.error(...args)),
|
||||
z: common_vendor.o((...args) => $options.opensetting && $options.opensetting(...args)),
|
||||
A: common_vendor.o((...args) => $options.launchapp && $options.launchapp(...args)),
|
||||
B: common_vendor.o((...args) => $options.agreeprivacyauthorization && $options.agreeprivacyauthorization(...args)),
|
||||
C: !_ctx.disabled && !_ctx.loading ? "u-button--active" : "",
|
||||
D: common_vendor.s($options.baseColor),
|
||||
E: common_vendor.s($options.addStyle(_ctx.customStyle)),
|
||||
F: common_vendor.o((...args) => $options.clickHandler && $options.clickHandler(...args)),
|
||||
G: common_vendor.n($options.bemClass)
|
||||
});
|
||||
}
|
||||
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-5ce41ee6"]]);
|
||||
my.createComponent(Component);
|
||||
8
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-button/u-button.json
vendored
Normal file
8
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-button/u-button.json
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"component": true,
|
||||
"styleIsolation": "apply-shared",
|
||||
"usingComponents": {
|
||||
"u-loading-icon": "../u-loading-icon/u-loading-icon",
|
||||
"u-icon": "../u-icon/u-icon"
|
||||
}
|
||||
}
|
||||
17
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-cell-group/props.js
vendored
Normal file
17
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-cell-group/props.js
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
"use strict";
|
||||
const uni_modules_uviewPlus_libs_config_props = require("../../libs/config/props.js");
|
||||
const props = {
|
||||
props: {
|
||||
// 分组标题
|
||||
title: {
|
||||
type: String,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.cellGroup.title
|
||||
},
|
||||
// 是否显示外边框
|
||||
border: {
|
||||
type: Boolean,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.cellGroup.border
|
||||
}
|
||||
}
|
||||
};
|
||||
exports.props = props;
|
||||
30
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-cell-group/u-cell-group.acss
vendored
Normal file
30
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-cell-group/u-cell-group.acss
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
.u-empty.data-v-014d39dc,
|
||||
.u-empty__wrap.data-v-014d39dc,
|
||||
.u-tabs.data-v-014d39dc,
|
||||
.u-tabs__wrapper.data-v-014d39dc,
|
||||
.u-tabs__wrapper__scroll-view-wrapper.data-v-014d39dc,
|
||||
.u-tabs__wrapper__scroll-view.data-v-014d39dc,
|
||||
.u-tabs__wrapper__nav.data-v-014d39dc,
|
||||
.u-tabs__wrapper__nav__line.data-v-014d39dc {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
flex-shrink: 0;
|
||||
flex-grow: 0;
|
||||
flex-basis: auto;
|
||||
align-items: stretch;
|
||||
align-content: flex-start;
|
||||
}
|
||||
.u-cell-group.data-v-014d39dc {
|
||||
flex: 1;
|
||||
}
|
||||
.u-cell-group__title.data-v-014d39dc {
|
||||
padding: 16px 16px 8px;
|
||||
}
|
||||
.u-cell-group__title__text.data-v-014d39dc {
|
||||
font-size: 15px;
|
||||
line-height: 16px;
|
||||
color: #303133;
|
||||
}
|
||||
.u-cell-group__wrapper.data-v-014d39dc {
|
||||
position: relative;
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
<view style="{{d}}" class="{{(e) + ' ' + 'u-cell-group' + ' ' + 'data-v-014d39dc'}}"><view a:if="{{a}}" class="u-cell-group__title data-v-014d39dc"><slot name="title"><text class="u-cell-group__title__text data-v-014d39dc">{{b}}</text></slot></view><view class="u-cell-group__wrapper data-v-014d39dc"><u-line a:if="{{c}}" class="data-v-014d39dc" u-i="014d39dc-0" onVI="__l"></u-line><slot/></view></view>
|
||||
35
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-cell-group/u-cell-group.js
vendored
Normal file
35
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-cell-group/u-cell-group.js
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
"use strict";
|
||||
const uni_modules_uviewPlus_components_uCellGroup_props = require("./props.js");
|
||||
const uni_modules_uviewPlus_libs_mixin_mpMixin = require("../../libs/mixin/mpMixin.js");
|
||||
const uni_modules_uviewPlus_libs_mixin_mixin = require("../../libs/mixin/mixin.js");
|
||||
const uni_modules_uviewPlus_libs_function_index = require("../../libs/function/index.js");
|
||||
const common_vendor = require("../../../../common/vendor.js");
|
||||
const _sfc_main = {
|
||||
name: "u-cell-group",
|
||||
mixins: [uni_modules_uviewPlus_libs_mixin_mpMixin.mpMixin, uni_modules_uviewPlus_libs_mixin_mixin.mixin, uni_modules_uviewPlus_components_uCellGroup_props.props],
|
||||
methods: {
|
||||
addStyle: uni_modules_uviewPlus_libs_function_index.addStyle
|
||||
}
|
||||
};
|
||||
if (!Array) {
|
||||
const _easycom_u_line2 = common_vendor.resolveComponent("u-line");
|
||||
_easycom_u_line2();
|
||||
}
|
||||
const _easycom_u_line = () => "../u-line/u-line.js";
|
||||
if (!Math) {
|
||||
_easycom_u_line();
|
||||
}
|
||||
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
return common_vendor.e({
|
||||
a: _ctx.title
|
||||
}, _ctx.title ? {
|
||||
b: common_vendor.t(_ctx.title)
|
||||
} : {}, {
|
||||
c: _ctx.border
|
||||
}, _ctx.border ? {} : {}, {
|
||||
d: common_vendor.s($options.addStyle(_ctx.customStyle)),
|
||||
e: common_vendor.n(_ctx.customClass)
|
||||
});
|
||||
}
|
||||
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-014d39dc"]]);
|
||||
my.createComponent(Component);
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"component": true,
|
||||
"styleIsolation": "apply-shared",
|
||||
"usingComponents": {
|
||||
"u-line": "../u-line/u-line"
|
||||
}
|
||||
}
|
||||
113
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-cell/props.js
vendored
Normal file
113
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-cell/props.js
vendored
Normal file
@@ -0,0 +1,113 @@
|
||||
"use strict";
|
||||
const uni_modules_uviewPlus_libs_config_props = require("../../libs/config/props.js");
|
||||
const props = {
|
||||
props: {
|
||||
// 标题
|
||||
title: {
|
||||
type: [String, Number],
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.cell.title
|
||||
},
|
||||
// 标题下方的描述信息
|
||||
label: {
|
||||
type: [String, Number],
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.cell.label
|
||||
},
|
||||
// 右侧的内容
|
||||
value: {
|
||||
type: [String, Number],
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.cell.value
|
||||
},
|
||||
// 左侧图标名称,或者图片链接(本地文件建议使用绝对地址)
|
||||
icon: {
|
||||
type: String,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.cell.icon
|
||||
},
|
||||
// 是否禁用cell
|
||||
disabled: {
|
||||
type: Boolean,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.cell.disabled
|
||||
},
|
||||
// 是否显示下边框
|
||||
border: {
|
||||
type: Boolean,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.cell.border
|
||||
},
|
||||
// 内容是否垂直居中(主要是针对右侧的value部分)
|
||||
center: {
|
||||
type: Boolean,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.cell.center
|
||||
},
|
||||
// 点击后跳转的URL地址
|
||||
url: {
|
||||
type: String,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.cell.url
|
||||
},
|
||||
// 链接跳转的方式,内部使用的是uView封装的route方法,可能会进行拦截操作
|
||||
linkType: {
|
||||
type: String,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.cell.linkType
|
||||
},
|
||||
// 是否开启点击反馈(表现为点击时加上灰色背景)
|
||||
clickable: {
|
||||
type: Boolean,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.cell.clickable
|
||||
},
|
||||
// 是否展示右侧箭头并开启点击反馈
|
||||
isLink: {
|
||||
type: Boolean,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.cell.isLink
|
||||
},
|
||||
// 是否显示表单状态下的必填星号(此组件可能会内嵌入input组件)
|
||||
required: {
|
||||
type: Boolean,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.cell.required
|
||||
},
|
||||
// 右侧的图标箭头
|
||||
rightIcon: {
|
||||
type: String,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.cell.rightIcon
|
||||
},
|
||||
// 右侧箭头的方向,可选值为:left,up,down
|
||||
arrowDirection: {
|
||||
type: String,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.cell.arrowDirection
|
||||
},
|
||||
// 左侧图标样式
|
||||
iconStyle: {
|
||||
type: [Object, String],
|
||||
default: () => {
|
||||
return uni_modules_uviewPlus_libs_config_props.defProps.cell.iconStyle;
|
||||
}
|
||||
},
|
||||
// 右侧箭头图标的样式
|
||||
rightIconStyle: {
|
||||
type: [Object, String],
|
||||
default: () => {
|
||||
return uni_modules_uviewPlus_libs_config_props.defProps.cell.rightIconStyle;
|
||||
}
|
||||
},
|
||||
// 标题的样式
|
||||
titleStyle: {
|
||||
type: [Object, String],
|
||||
default: () => {
|
||||
return uni_modules_uviewPlus_libs_config_props.defProps.cell.titleStyle;
|
||||
}
|
||||
},
|
||||
// 单位元的大小,可选值为large
|
||||
size: {
|
||||
type: String,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.cell.size
|
||||
},
|
||||
// 点击cell是否阻止事件传播
|
||||
stop: {
|
||||
type: Boolean,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.cell.stop
|
||||
},
|
||||
// 标识符,cell被点击时返回
|
||||
name: {
|
||||
type: [Number, String],
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.cell.name
|
||||
}
|
||||
}
|
||||
};
|
||||
exports.props = props;
|
||||
94
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-cell/u-cell.acss
vendored
Normal file
94
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-cell/u-cell.acss
vendored
Normal file
@@ -0,0 +1,94 @@
|
||||
.u-empty.data-v-3fd6feca,
|
||||
.u-empty__wrap.data-v-3fd6feca,
|
||||
.u-tabs.data-v-3fd6feca,
|
||||
.u-tabs__wrapper.data-v-3fd6feca,
|
||||
.u-tabs__wrapper__scroll-view-wrapper.data-v-3fd6feca,
|
||||
.u-tabs__wrapper__scroll-view.data-v-3fd6feca,
|
||||
.u-tabs__wrapper__nav.data-v-3fd6feca,
|
||||
.u-tabs__wrapper__nav__line.data-v-3fd6feca {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
flex-shrink: 0;
|
||||
flex-grow: 0;
|
||||
flex-basis: auto;
|
||||
align-items: stretch;
|
||||
align-content: flex-start;
|
||||
}
|
||||
.u-cell__body.data-v-3fd6feca {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
box-sizing: border-box;
|
||||
padding: 13px 15px;
|
||||
font-size: 15px;
|
||||
color: #303133;
|
||||
align-items: center;
|
||||
}
|
||||
.u-cell__body__content.data-v-3fd6feca {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
flex: 1;
|
||||
}
|
||||
.u-cell__body--large.data-v-3fd6feca {
|
||||
padding-top: 13px;
|
||||
padding-bottom: 13px;
|
||||
}
|
||||
.u-cell__left-icon-wrap.data-v-3fd6feca, .u-cell__right-icon-wrap.data-v-3fd6feca {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
font-size: 16px;
|
||||
}
|
||||
.u-cell__left-icon-wrap.data-v-3fd6feca {
|
||||
margin-right: 4px;
|
||||
}
|
||||
.u-cell__right-icon-wrap.data-v-3fd6feca {
|
||||
margin-left: 4px;
|
||||
transition: transform 0.3s;
|
||||
}
|
||||
.u-cell__right-icon-wrap--up.data-v-3fd6feca {
|
||||
transform: rotate(-90deg);
|
||||
}
|
||||
.u-cell__right-icon-wrap--down.data-v-3fd6feca {
|
||||
transform: rotate(90deg);
|
||||
}
|
||||
.u-cell__title.data-v-3fd6feca {
|
||||
flex: 1;
|
||||
}
|
||||
.u-cell__title-text.data-v-3fd6feca {
|
||||
font-size: 15px;
|
||||
line-height: 22px;
|
||||
color: #303133;
|
||||
}
|
||||
.u-cell__title-text--large.data-v-3fd6feca {
|
||||
font-size: 16px;
|
||||
}
|
||||
.u-cell__label.data-v-3fd6feca {
|
||||
margin-top: 5px;
|
||||
font-size: 12px;
|
||||
color: #909193;
|
||||
line-height: 18px;
|
||||
}
|
||||
.u-cell__label--large.data-v-3fd6feca {
|
||||
font-size: 14px;
|
||||
}
|
||||
.u-cell__value.data-v-3fd6feca {
|
||||
text-align: right;
|
||||
margin-left: auto;
|
||||
font-size: 14px;
|
||||
line-height: 24px;
|
||||
color: #606266;
|
||||
}
|
||||
.u-cell__value--large.data-v-3fd6feca {
|
||||
font-size: 15px;
|
||||
}
|
||||
.u-cell--clickable.data-v-3fd6feca {
|
||||
background-color: #f3f4f6;
|
||||
}
|
||||
.u-cell--disabled.data-v-3fd6feca {
|
||||
color: #c8c9cc;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
.u-cell--center.data-v-3fd6feca {
|
||||
align-items: center;
|
||||
}
|
||||
1
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-cell/u-cell.axml
vendored
Normal file
1
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-cell/u-cell.axml
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<view class="{{('u-cell') + ' ' + 'data-v-3fd6feca' + ' ' + A}}" style="{{B}}" hover-class="{{C}}" hover-stay-time="{{250}}" onTap="{{D}}"><view class="{{('u-cell__body') + ' ' + 'data-v-3fd6feca' + ' ' + x + ' ' + y}}"><view class="u-cell__body__content data-v-3fd6feca"><view a:if="{{a}}" class="u-cell__left-icon-wrap data-v-3fd6feca"><slot a:if="{{b}}" name="icon"></slot><u-icon a:else class="data-v-3fd6feca" u-i="3fd6feca-0" onVI="__l" u-p="{{c||''}}"></u-icon></view><view class="u-cell__title data-v-3fd6feca"><slot a:if="{{d}}" name="title"></slot><text a:else style="{{f}}" class="{{('u-cell__title-text') + ' ' + 'data-v-3fd6feca' + ' ' + g + ' ' + h}}">{{e}}</text><slot name="label"><text a:if="{{i}}" class="{{('u-cell__label') + ' ' + 'data-v-3fd6feca' + ' ' + k + ' ' + l}}">{{j}}</text></slot></view></view><slot name="value"><text a:if="{{m}}" class="{{('u-cell__value') + ' ' + 'data-v-3fd6feca' + ' ' + o + ' ' + p}}">{{n}}</text></slot><view a:if="{{q}}" class="{{('u-cell__right-icon-wrap') + ' ' + 'data-v-3fd6feca' + ' ' + t}}"><u-icon a:if="{{r}}" class="data-v-3fd6feca" u-i="3fd6feca-1" onVI="__l" u-p="{{s}}"></u-icon><slot a:else name="right-icon"></slot></view><view a:if="{{v}}" class="{{('u-cell__right-icon-wrap') + ' ' + 'data-v-3fd6feca' + ' ' + w}}"><slot name="righticon"></slot></view></view><u-line a:if="{{z}}" class="data-v-3fd6feca" u-i="3fd6feca-2" onVI="__l"></u-line></view>
|
||||
104
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-cell/u-cell.js
vendored
Normal file
104
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-cell/u-cell.js
vendored
Normal file
@@ -0,0 +1,104 @@
|
||||
"use strict";
|
||||
const uni_modules_uviewPlus_components_uCell_props = require("./props.js");
|
||||
const uni_modules_uviewPlus_libs_mixin_mpMixin = require("../../libs/mixin/mpMixin.js");
|
||||
const uni_modules_uviewPlus_libs_mixin_mixin = require("../../libs/mixin/mixin.js");
|
||||
const uni_modules_uviewPlus_libs_function_index = require("../../libs/function/index.js");
|
||||
const uni_modules_uviewPlus_libs_function_test = require("../../libs/function/test.js");
|
||||
const common_vendor = require("../../../../common/vendor.js");
|
||||
const _sfc_main = {
|
||||
name: "u-cell",
|
||||
data() {
|
||||
return {};
|
||||
},
|
||||
mixins: [uni_modules_uviewPlus_libs_mixin_mpMixin.mpMixin, uni_modules_uviewPlus_libs_mixin_mixin.mixin, uni_modules_uviewPlus_components_uCell_props.props],
|
||||
computed: {
|
||||
titleTextStyle() {
|
||||
return uni_modules_uviewPlus_libs_function_index.addStyle(this.titleStyle);
|
||||
}
|
||||
},
|
||||
emits: ["click"],
|
||||
methods: {
|
||||
addStyle: uni_modules_uviewPlus_libs_function_index.addStyle,
|
||||
testEmpty: uni_modules_uviewPlus_libs_function_test.test.empty,
|
||||
// 点击cell
|
||||
clickHandler(e) {
|
||||
if (this.disabled)
|
||||
return;
|
||||
this.$emit("click", {
|
||||
name: this.name
|
||||
});
|
||||
this.openPage();
|
||||
this.stop && this.preventEvent(e);
|
||||
}
|
||||
}
|
||||
};
|
||||
if (!Array) {
|
||||
const _easycom_u_icon2 = common_vendor.resolveComponent("u-icon");
|
||||
const _easycom_u_line2 = common_vendor.resolveComponent("u-line");
|
||||
(_easycom_u_icon2 + _easycom_u_line2)();
|
||||
}
|
||||
const _easycom_u_icon = () => "../u-icon/u-icon.js";
|
||||
const _easycom_u_line = () => "../u-line/u-line.js";
|
||||
if (!Math) {
|
||||
(_easycom_u_icon + _easycom_u_line)();
|
||||
}
|
||||
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
return common_vendor.e({
|
||||
a: _ctx.$slots.icon || _ctx.icon
|
||||
}, _ctx.$slots.icon || _ctx.icon ? common_vendor.e({
|
||||
b: _ctx.$slots.icon
|
||||
}, _ctx.$slots.icon ? {} : {
|
||||
c: common_vendor.p({
|
||||
name: _ctx.icon,
|
||||
["custom-style"]: _ctx.iconStyle,
|
||||
size: _ctx.size === "large" ? 22 : 18
|
||||
})
|
||||
}) : {}, {
|
||||
d: _ctx.$slots.title || !_ctx.title
|
||||
}, _ctx.$slots.title || !_ctx.title ? {} : {
|
||||
e: common_vendor.t(_ctx.title),
|
||||
f: common_vendor.s($options.titleTextStyle),
|
||||
g: common_vendor.n(_ctx.disabled && "u-cell--disabled"),
|
||||
h: common_vendor.n(_ctx.size === "large" && "u-cell__title-text--large")
|
||||
}, {
|
||||
i: _ctx.label
|
||||
}, _ctx.label ? {
|
||||
j: common_vendor.t(_ctx.label),
|
||||
k: common_vendor.n(_ctx.disabled && "u-cell--disabled"),
|
||||
l: common_vendor.n(_ctx.size === "large" && "u-cell__label--large")
|
||||
} : {}, {
|
||||
m: !$options.testEmpty(_ctx.value)
|
||||
}, !$options.testEmpty(_ctx.value) ? {
|
||||
n: common_vendor.t(_ctx.value),
|
||||
o: common_vendor.n(_ctx.disabled && "u-cell--disabled"),
|
||||
p: common_vendor.n(_ctx.size === "large" && "u-cell__value--large")
|
||||
} : {}, {
|
||||
q: _ctx.$slots["right-icon"] || _ctx.isLink
|
||||
}, _ctx.$slots["right-icon"] || _ctx.isLink ? common_vendor.e({
|
||||
r: _ctx.rightIcon && !_ctx.$slots["right-icon"]
|
||||
}, _ctx.rightIcon && !_ctx.$slots["right-icon"] ? {
|
||||
s: common_vendor.p({
|
||||
name: _ctx.rightIcon,
|
||||
["custom-style"]: _ctx.rightIconStyle,
|
||||
color: _ctx.disabled ? "#c8c9cc" : "info",
|
||||
size: _ctx.size === "large" ? 18 : 16
|
||||
})
|
||||
} : {}, {
|
||||
t: common_vendor.n(`u-cell__right-icon-wrap--${_ctx.arrowDirection}`)
|
||||
}) : {}, {
|
||||
v: _ctx.$slots["righticon"]
|
||||
}, _ctx.$slots["righticon"] ? {
|
||||
w: common_vendor.n(`u-cell__right-icon-wrap--${_ctx.arrowDirection}`)
|
||||
} : {}, {
|
||||
x: common_vendor.n(_ctx.center && "u-cell--center"),
|
||||
y: common_vendor.n(_ctx.size === "large" && "u-cell__body--large"),
|
||||
z: _ctx.border
|
||||
}, _ctx.border ? {} : {}, {
|
||||
A: common_vendor.n(_ctx.customClass),
|
||||
B: common_vendor.s($options.addStyle(_ctx.customStyle)),
|
||||
C: !_ctx.disabled && (_ctx.clickable || _ctx.isLink) ? "u-cell--clickable" : "",
|
||||
D: common_vendor.o((...args) => $options.clickHandler && $options.clickHandler(...args))
|
||||
});
|
||||
}
|
||||
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-3fd6feca"]]);
|
||||
my.createComponent(Component);
|
||||
8
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-cell/u-cell.json
vendored
Normal file
8
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-cell/u-cell.json
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"component": true,
|
||||
"styleIsolation": "apply-shared",
|
||||
"usingComponents": {
|
||||
"u-icon": "../u-icon/u-icon",
|
||||
"u-line": "../u-line/u-line"
|
||||
}
|
||||
}
|
||||
82
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-checkbox-group/props.js
vendored
Normal file
82
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-checkbox-group/props.js
vendored
Normal file
@@ -0,0 +1,82 @@
|
||||
"use strict";
|
||||
const uni_modules_uviewPlus_libs_config_props = require("../../libs/config/props.js");
|
||||
const props = {
|
||||
props: {
|
||||
// 标识符
|
||||
name: {
|
||||
type: String,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.checkboxGroup.name
|
||||
},
|
||||
// 绑定的值
|
||||
modelValue: {
|
||||
type: Array,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.checkboxGroup.value
|
||||
},
|
||||
// 形状,circle-圆形,square-方形
|
||||
shape: {
|
||||
type: String,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.checkboxGroup.shape
|
||||
},
|
||||
// 是否禁用全部checkbox
|
||||
disabled: {
|
||||
type: Boolean,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.checkboxGroup.disabled
|
||||
},
|
||||
// 选中状态下的颜色,如设置此值,将会覆盖parent的activeColor值
|
||||
activeColor: {
|
||||
type: String,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.checkboxGroup.activeColor
|
||||
},
|
||||
// 未选中的颜色
|
||||
inactiveColor: {
|
||||
type: String,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.checkboxGroup.inactiveColor
|
||||
},
|
||||
// 整个组件的尺寸,默认px
|
||||
size: {
|
||||
type: [String, Number],
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.checkboxGroup.size
|
||||
},
|
||||
// 布局方式,row-横向,column-纵向
|
||||
placement: {
|
||||
type: String,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.checkboxGroup.placement
|
||||
},
|
||||
// label的字体大小,px单位
|
||||
labelSize: {
|
||||
type: [String, Number],
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.checkboxGroup.labelSize
|
||||
},
|
||||
// label的字体颜色
|
||||
labelColor: {
|
||||
type: [String],
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.checkboxGroup.labelColor
|
||||
},
|
||||
// 是否禁止点击文本操作
|
||||
labelDisabled: {
|
||||
type: Boolean,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.checkboxGroup.labelDisabled
|
||||
},
|
||||
// 图标颜色
|
||||
iconColor: {
|
||||
type: String,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.checkboxGroup.iconColor
|
||||
},
|
||||
// 图标的大小,单位px
|
||||
iconSize: {
|
||||
type: [String, Number],
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.checkboxGroup.iconSize
|
||||
},
|
||||
// 勾选图标的对齐方式,left-左边,right-右边
|
||||
iconPlacement: {
|
||||
type: String,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.checkboxGroup.iconPlacement
|
||||
},
|
||||
// 竖向配列时,是否显示下划线
|
||||
borderBottom: {
|
||||
type: Boolean,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.checkboxGroup.borderBottom
|
||||
}
|
||||
}
|
||||
};
|
||||
exports.props = props;
|
||||
@@ -0,0 +1,24 @@
|
||||
.u-empty.data-v-ff0492f0,
|
||||
.u-empty__wrap.data-v-ff0492f0,
|
||||
.u-tabs.data-v-ff0492f0,
|
||||
.u-tabs__wrapper.data-v-ff0492f0,
|
||||
.u-tabs__wrapper__scroll-view-wrapper.data-v-ff0492f0,
|
||||
.u-tabs__wrapper__scroll-view.data-v-ff0492f0,
|
||||
.u-tabs__wrapper__nav.data-v-ff0492f0,
|
||||
.u-tabs__wrapper__nav__line.data-v-ff0492f0 {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
flex-shrink: 0;
|
||||
flex-grow: 0;
|
||||
flex-basis: auto;
|
||||
align-items: stretch;
|
||||
align-content: flex-start;
|
||||
}
|
||||
.u-checkbox-group--row.data-v-ff0492f0 {
|
||||
display: flex;
|
||||
flex-flow: row wrap;
|
||||
}
|
||||
.u-checkbox-group--column.data-v-ff0492f0 {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
<view class="{{('u-checkbox-group') + ' ' + 'data-v-ff0492f0' + ' ' + a}}"><slot></slot></view>
|
||||
@@ -0,0 +1,71 @@
|
||||
"use strict";
|
||||
const uni_modules_uviewPlus_components_uCheckboxGroup_props = require("./props.js");
|
||||
const uni_modules_uviewPlus_libs_mixin_mpMixin = require("../../libs/mixin/mpMixin.js");
|
||||
const uni_modules_uviewPlus_libs_mixin_mixin = require("../../libs/mixin/mixin.js");
|
||||
const common_vendor = require("../../../../common/vendor.js");
|
||||
const _sfc_main = {
|
||||
name: "u-checkbox-group",
|
||||
mixins: [uni_modules_uviewPlus_libs_mixin_mpMixin.mpMixin, uni_modules_uviewPlus_libs_mixin_mixin.mixin, uni_modules_uviewPlus_components_uCheckboxGroup_props.props],
|
||||
computed: {
|
||||
// 这里computed的变量,都是子组件u-checkbox需要用到的,由于头条小程序的兼容性差异,子组件无法实时监听父组件参数的变化
|
||||
// 所以需要手动通知子组件,这里返回一个parentData变量,供watch监听,在其中去通知每一个子组件重新从父组件(u-checkbox-group)
|
||||
// 拉取父组件新的变化后的参数
|
||||
parentData() {
|
||||
return [
|
||||
this.modelValue,
|
||||
this.disabled,
|
||||
this.inactiveColor,
|
||||
this.activeColor,
|
||||
this.size,
|
||||
this.labelDisabled,
|
||||
this.shape,
|
||||
this.iconSize,
|
||||
this.borderBottom,
|
||||
this.placement
|
||||
];
|
||||
},
|
||||
bemClass() {
|
||||
return this.bem("checkbox-group", ["placement"]);
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
// 当父组件需要子组件需要共享的参数发生了变化,手动通知子组件
|
||||
parentData: {
|
||||
handler() {
|
||||
if (this.children.length) {
|
||||
this.children.map((child) => {
|
||||
typeof child.init === "function" && child.init();
|
||||
});
|
||||
}
|
||||
},
|
||||
deep: true
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {};
|
||||
},
|
||||
created() {
|
||||
this.children = [];
|
||||
},
|
||||
emits: ["update:modelValue", "change"],
|
||||
methods: {
|
||||
// 将其他的checkbox设置为未选中的状态
|
||||
unCheckedOther(childInstance) {
|
||||
const values = [];
|
||||
this.children.map((child) => {
|
||||
if (child.isChecked) {
|
||||
values.push(child.name);
|
||||
}
|
||||
});
|
||||
this.$emit("change", values);
|
||||
this.$emit("update:modelValue", values);
|
||||
}
|
||||
}
|
||||
};
|
||||
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
return {
|
||||
a: common_vendor.n($options.bemClass)
|
||||
};
|
||||
}
|
||||
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-ff0492f0"]]);
|
||||
my.createComponent(Component);
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"component": true,
|
||||
"styleIsolation": "apply-shared",
|
||||
"usingComponents": {}
|
||||
}
|
||||
77
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-checkbox/props.js
vendored
Normal file
77
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-checkbox/props.js
vendored
Normal file
@@ -0,0 +1,77 @@
|
||||
"use strict";
|
||||
const uni_modules_uviewPlus_libs_config_props = require("../../libs/config/props.js");
|
||||
const props = {
|
||||
props: {
|
||||
// checkbox的名称
|
||||
name: {
|
||||
type: [String, Number, Boolean],
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.checkbox.name
|
||||
},
|
||||
// 形状,square为方形,circle为圆型
|
||||
shape: {
|
||||
type: String,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.checkbox.shape
|
||||
},
|
||||
// 整体的大小
|
||||
size: {
|
||||
type: [String, Number],
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.checkbox.size
|
||||
},
|
||||
// 是否默认选中
|
||||
checked: {
|
||||
type: Boolean,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.checkbox.checked
|
||||
},
|
||||
// 是否禁用
|
||||
disabled: {
|
||||
type: [String, Boolean],
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.checkbox.disabled
|
||||
},
|
||||
// 选中状态下的颜色,如设置此值,将会覆盖parent的activeColor值
|
||||
activeColor: {
|
||||
type: String,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.checkbox.activeColor
|
||||
},
|
||||
// 未选中的颜色
|
||||
inactiveColor: {
|
||||
type: String,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.checkbox.inactiveColor
|
||||
},
|
||||
// 图标的大小,单位px
|
||||
iconSize: {
|
||||
type: [String, Number],
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.checkbox.iconSize
|
||||
},
|
||||
// 图标颜色
|
||||
iconColor: {
|
||||
type: String,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.checkbox.iconColor
|
||||
},
|
||||
// label提示文字,因为nvue下,直接slot进来的文字,由于特殊的结构,无法修改样式
|
||||
label: {
|
||||
type: [String, Number],
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.checkbox.label
|
||||
},
|
||||
// label的字体大小,px单位
|
||||
labelSize: {
|
||||
type: [String, Number],
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.checkbox.labelSize
|
||||
},
|
||||
// label的颜色
|
||||
labelColor: {
|
||||
type: String,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.checkbox.labelColor
|
||||
},
|
||||
// 是否禁止点击提示语选中复选框
|
||||
labelDisabled: {
|
||||
type: [String, Boolean],
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.checkbox.labelDisabled
|
||||
},
|
||||
// 是否独立使用
|
||||
usedAlone: {
|
||||
type: [Boolean],
|
||||
default: () => false
|
||||
}
|
||||
}
|
||||
};
|
||||
exports.props = props;
|
||||
76
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-checkbox/u-checkbox.acss
vendored
Normal file
76
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-checkbox/u-checkbox.acss
vendored
Normal file
@@ -0,0 +1,76 @@
|
||||
.u-empty.data-v-41713600,
|
||||
.u-empty__wrap.data-v-41713600,
|
||||
.u-tabs.data-v-41713600,
|
||||
.u-tabs__wrapper.data-v-41713600,
|
||||
.u-tabs__wrapper__scroll-view-wrapper.data-v-41713600,
|
||||
.u-tabs__wrapper__scroll-view.data-v-41713600,
|
||||
.u-tabs__wrapper__nav.data-v-41713600,
|
||||
.u-tabs__wrapper__nav__line.data-v-41713600 {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
flex-shrink: 0;
|
||||
flex-grow: 0;
|
||||
flex-basis: auto;
|
||||
align-items: stretch;
|
||||
align-content: flex-start;
|
||||
}
|
||||
.u-checkbox.data-v-41713600 {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
overflow: hidden;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
margin-bottom: 5px;
|
||||
margin-top: 5px;
|
||||
}
|
||||
.u-checkbox-label--left.data-v-41713600 {
|
||||
flex-direction: row;
|
||||
}
|
||||
.u-checkbox-label--right.data-v-41713600 {
|
||||
flex-direction: row-reverse;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.u-checkbox__icon-wrap.data-v-41713600 {
|
||||
box-sizing: border-box;
|
||||
transition-property: border-color, background-color, color;
|
||||
transition-duration: 0.2s;
|
||||
color: #606266;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
color: transparent;
|
||||
text-align: center;
|
||||
margin-right: 6px;
|
||||
font-size: 6px;
|
||||
border-width: 1px;
|
||||
border-color: #c8c9cc;
|
||||
border-style: solid;
|
||||
}
|
||||
.u-checkbox__icon-wrap--circle.data-v-41713600 {
|
||||
border-radius: 100%;
|
||||
}
|
||||
.u-checkbox__icon-wrap--square.data-v-41713600 {
|
||||
border-radius: 3px;
|
||||
}
|
||||
.u-checkbox__icon-wrap--checked.data-v-41713600 {
|
||||
color: #fff;
|
||||
background-color: red;
|
||||
border-color: #2979ff;
|
||||
}
|
||||
.u-checkbox__icon-wrap--disabled.data-v-41713600 {
|
||||
background-color: #ebedf0 !important;
|
||||
}
|
||||
.u-checkbox__icon-wrap--disabled--checked.data-v-41713600 {
|
||||
color: #c8c9cc !important;
|
||||
}
|
||||
.u-checkbox__label.data-v-41713600 {
|
||||
word-wrap: break-word;
|
||||
margin-left: 5px;
|
||||
margin-right: 12px;
|
||||
color: #606266;
|
||||
font-size: 15px;
|
||||
}
|
||||
.u-checkbox__label--disabled.data-v-41713600 {
|
||||
color: #c8c9cc;
|
||||
}
|
||||
1
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-checkbox/u-checkbox.axml
vendored
Normal file
1
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-checkbox/u-checkbox.axml
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<view style="{{j}}" catchTap="{{k}}" class="{{('u-checkbox') + ' ' + 'cursor-pointer' + ' ' + 'data-v-41713600' + ' ' + l + ' ' + m}}"><view catchTap="{{b}}" class="{{('u-checkbox__icon-wrap') + ' ' + 'cursor-pointer' + ' ' + 'data-v-41713600' + ' ' + c}}" style="{{d}}"><slot name="icon"><u-icon class="u-checkbox__icon-wrap__icon data-v-41713600" u-i="41713600-0" onVI="__l" u-p="{{a}}"/></slot></view><text class="data-v-41713600" catchTap="{{f}}" style="{{'color:' + g + ';' + ('font-size:' + h) + ';' + ('line-height:' + i)}}">{{e}}</text></view>
|
||||
214
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-checkbox/u-checkbox.js
vendored
Normal file
214
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-checkbox/u-checkbox.js
vendored
Normal file
@@ -0,0 +1,214 @@
|
||||
"use strict";
|
||||
const uni_modules_uviewPlus_components_uCheckbox_props = require("./props.js");
|
||||
const uni_modules_uviewPlus_libs_mixin_mpMixin = require("../../libs/mixin/mpMixin.js");
|
||||
const uni_modules_uviewPlus_libs_mixin_mixin = require("../../libs/mixin/mixin.js");
|
||||
const uni_modules_uviewPlus_libs_function_index = require("../../libs/function/index.js");
|
||||
const uni_modules_uviewPlus_libs_function_test = require("../../libs/function/test.js");
|
||||
const common_vendor = require("../../../../common/vendor.js");
|
||||
const _sfc_main = {
|
||||
name: "u-checkbox",
|
||||
mixins: [uni_modules_uviewPlus_libs_mixin_mpMixin.mpMixin, uni_modules_uviewPlus_libs_mixin_mixin.mixin, uni_modules_uviewPlus_components_uCheckbox_props.props],
|
||||
data() {
|
||||
return {
|
||||
isChecked: false,
|
||||
// 父组件的默认值,因为头条小程序不支持在computed中使用this.parent.shape的形式
|
||||
// 故只能使用如此方法
|
||||
parentData: {
|
||||
iconSize: 12,
|
||||
labelDisabled: null,
|
||||
disabled: null,
|
||||
shape: "square",
|
||||
activeColor: null,
|
||||
inactiveColor: null,
|
||||
size: 18,
|
||||
modelValue: null,
|
||||
iconColor: null,
|
||||
placement: "row",
|
||||
borderBottom: false,
|
||||
iconPlacement: "left"
|
||||
}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
// 是否禁用,如果父组件u-raios-group禁用的话,将会忽略子组件的配置
|
||||
elDisabled() {
|
||||
return this.disabled !== "" ? this.disabled : this.parentData.disabled !== null ? this.parentData.disabled : false;
|
||||
},
|
||||
// 是否禁用label点击
|
||||
elLabelDisabled() {
|
||||
return this.labelDisabled !== "" ? this.labelDisabled : this.parentData.labelDisabled !== null ? this.parentData.labelDisabled : false;
|
||||
},
|
||||
// 组件尺寸,对应size的值,默认值为21px
|
||||
elSize() {
|
||||
return this.size ? this.size : this.parentData.size ? this.parentData.size : 21;
|
||||
},
|
||||
// 组件的勾选图标的尺寸,默认12px
|
||||
elIconSize() {
|
||||
return this.iconSize ? this.iconSize : this.parentData.iconSize ? this.parentData.iconSize : 12;
|
||||
},
|
||||
// 组件选中激活时的颜色
|
||||
elActiveColor() {
|
||||
return this.activeColor ? this.activeColor : this.parentData.activeColor ? this.parentData.activeColor : "#2979ff";
|
||||
},
|
||||
// 组件选未中激活时的颜色
|
||||
elInactiveColor() {
|
||||
return this.inactiveColor ? this.inactiveColor : this.parentData.inactiveColor ? this.parentData.inactiveColor : "#c8c9cc";
|
||||
},
|
||||
// label的颜色
|
||||
elLabelColor() {
|
||||
return this.labelColor ? this.labelColor : this.parentData.labelColor ? this.parentData.labelColor : "#606266";
|
||||
},
|
||||
// 组件的形状
|
||||
elShape() {
|
||||
return this.shape ? this.shape : this.parentData.shape ? this.parentData.shape : "circle";
|
||||
},
|
||||
// label大小
|
||||
elLabelSize() {
|
||||
return uni_modules_uviewPlus_libs_function_index.addUnit(this.labelSize ? this.labelSize : this.parentData.labelSize ? this.parentData.labelSize : "15");
|
||||
},
|
||||
elIconColor() {
|
||||
const iconColor = this.iconColor ? this.iconColor : this.parentData.iconColor ? this.parentData.iconColor : "#ffffff";
|
||||
if (this.elDisabled) {
|
||||
return this.isChecked ? this.elInactiveColor : "transparent";
|
||||
} else {
|
||||
return this.isChecked ? iconColor : "transparent";
|
||||
}
|
||||
},
|
||||
iconClasses() {
|
||||
let classes = [];
|
||||
classes.push("u-checkbox__icon-wrap--" + this.elShape);
|
||||
if (this.elDisabled) {
|
||||
classes.push("u-checkbox__icon-wrap--disabled");
|
||||
}
|
||||
if (this.isChecked && this.elDisabled) {
|
||||
classes.push("u-checkbox__icon-wrap--disabled--checked");
|
||||
}
|
||||
classes = classes.join(" ");
|
||||
return classes;
|
||||
},
|
||||
iconWrapStyle() {
|
||||
const style = {};
|
||||
style.backgroundColor = this.isChecked && !this.elDisabled ? this.elActiveColor : "#ffffff";
|
||||
style.borderColor = this.isChecked && !this.elDisabled ? this.elActiveColor : this.elInactiveColor;
|
||||
style.width = uni_modules_uviewPlus_libs_function_index.addUnit(this.elSize);
|
||||
style.height = uni_modules_uviewPlus_libs_function_index.addUnit(this.elSize);
|
||||
if (!this.usedAlone) {
|
||||
if (this.parentData.iconPlacement === "right") {
|
||||
style.marginRight = 0;
|
||||
}
|
||||
}
|
||||
return style;
|
||||
},
|
||||
checkboxStyle() {
|
||||
const style = {};
|
||||
if (!this.usedAlone) {
|
||||
if (this.parentData.borderBottom && this.parentData.placement === "row") {
|
||||
uni_modules_uviewPlus_libs_function_index.error("检测到您将borderBottom设置为true,需要同时将u-checkbox-group的placement设置为column才有效");
|
||||
}
|
||||
if (this.parentData.borderBottom && this.parentData.placement === "column") {
|
||||
style.paddingBottom = "8px";
|
||||
}
|
||||
}
|
||||
return uni_modules_uviewPlus_libs_function_index.deepMerge(style, uni_modules_uviewPlus_libs_function_index.addStyle(this.customStyle));
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.init();
|
||||
},
|
||||
emits: ["change"],
|
||||
methods: {
|
||||
init() {
|
||||
if (!this.usedAlone) {
|
||||
this.updateParentData();
|
||||
if (!this.parent) {
|
||||
uni_modules_uviewPlus_libs_function_index.error("u-checkbox必须搭配u-checkbox-group组件使用");
|
||||
}
|
||||
}
|
||||
const value = this.parentData.modelValue;
|
||||
if (this.checked) {
|
||||
this.isChecked = true;
|
||||
} else if (!this.usedAlone && uni_modules_uviewPlus_libs_function_test.test.array(value)) {
|
||||
this.isChecked = value.some((item) => {
|
||||
return item === this.name;
|
||||
});
|
||||
}
|
||||
},
|
||||
updateParentData() {
|
||||
this.getParentData("u-checkbox-group");
|
||||
},
|
||||
// 横向两端排列时,点击组件即可触发选中事件
|
||||
wrapperClickHandler(e) {
|
||||
if (!this.usedAlone) {
|
||||
this.parentData.iconPlacement === "right" && this.iconClickHandler(e);
|
||||
} else {
|
||||
this.iconClickHandler(e);
|
||||
}
|
||||
},
|
||||
// 点击图标
|
||||
iconClickHandler(e) {
|
||||
this.preventEvent(e);
|
||||
if (!this.elDisabled) {
|
||||
this.setRadioCheckedStatus();
|
||||
}
|
||||
},
|
||||
// 点击label
|
||||
labelClickHandler(e) {
|
||||
this.preventEvent(e);
|
||||
if (!this.elLabelDisabled && !this.elDisabled) {
|
||||
this.setRadioCheckedStatus();
|
||||
}
|
||||
},
|
||||
emitEvent() {
|
||||
this.$emit("change", this.isChecked);
|
||||
this.$nextTick(() => {
|
||||
uni_modules_uviewPlus_libs_function_index.formValidate(this, "change");
|
||||
});
|
||||
},
|
||||
// 改变组件选中状态
|
||||
// 这里的改变的依据是,更改本组件的checked值为true,同时通过父组件遍历所有u-checkbox实例
|
||||
// 将本组件外的其他u-checkbox的checked都设置为false(都被取消选中状态),因而只剩下一个为选中状态
|
||||
setRadioCheckedStatus() {
|
||||
this.isChecked = !this.isChecked;
|
||||
this.emitEvent();
|
||||
if (!this.usedAlone) {
|
||||
typeof this.parent.unCheckedOther === "function" && this.parent.unCheckedOther(this);
|
||||
}
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
checked() {
|
||||
this.isChecked = this.checked;
|
||||
}
|
||||
}
|
||||
};
|
||||
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();
|
||||
}
|
||||
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
return {
|
||||
a: common_vendor.p({
|
||||
name: "checkbox-mark",
|
||||
size: $options.elIconSize,
|
||||
color: $options.elIconColor
|
||||
}),
|
||||
b: common_vendor.o((...args) => $options.iconClickHandler && $options.iconClickHandler(...args)),
|
||||
c: common_vendor.n($options.iconClasses),
|
||||
d: common_vendor.s($options.iconWrapStyle),
|
||||
e: common_vendor.t(_ctx.label),
|
||||
f: common_vendor.o((...args) => $options.labelClickHandler && $options.labelClickHandler(...args)),
|
||||
g: $options.elDisabled ? $options.elInactiveColor : $options.elLabelColor,
|
||||
h: $options.elLabelSize,
|
||||
i: $options.elLabelSize,
|
||||
j: common_vendor.s($options.checkboxStyle),
|
||||
k: common_vendor.o((...args) => $options.wrapperClickHandler && $options.wrapperClickHandler(...args)),
|
||||
l: common_vendor.n(`u-checkbox-label--${$data.parentData.iconPlacement}`),
|
||||
m: common_vendor.n($data.parentData.borderBottom && $data.parentData.placement === "column" && "u-border-bottom")
|
||||
};
|
||||
}
|
||||
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-41713600"]]);
|
||||
my.createComponent(Component);
|
||||
7
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-checkbox/u-checkbox.json
vendored
Normal file
7
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-checkbox/u-checkbox.json
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"component": true,
|
||||
"styleIsolation": "apply-shared",
|
||||
"usingComponents": {
|
||||
"u-icon": "../u-icon/u-icon"
|
||||
}
|
||||
}
|
||||
216
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-icon/icons.js
vendored
Normal file
216
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-icon/icons.js
vendored
Normal file
@@ -0,0 +1,216 @@
|
||||
"use strict";
|
||||
const icons = {
|
||||
"uicon-level": "",
|
||||
"uicon-column-line": "",
|
||||
"uicon-checkbox-mark": "",
|
||||
"uicon-folder": "",
|
||||
"uicon-movie": "",
|
||||
"uicon-star-fill": "",
|
||||
"uicon-star": "",
|
||||
"uicon-phone-fill": "",
|
||||
"uicon-phone": "",
|
||||
"uicon-apple-fill": "",
|
||||
"uicon-chrome-circle-fill": "",
|
||||
"uicon-backspace": "",
|
||||
"uicon-attach": "",
|
||||
"uicon-cut": "",
|
||||
"uicon-empty-car": "",
|
||||
"uicon-empty-coupon": "",
|
||||
"uicon-empty-address": "",
|
||||
"uicon-empty-favor": "",
|
||||
"uicon-empty-permission": "",
|
||||
"uicon-empty-news": "",
|
||||
"uicon-empty-search": "",
|
||||
"uicon-github-circle-fill": "",
|
||||
"uicon-rmb": "",
|
||||
"uicon-person-delete-fill": "",
|
||||
"uicon-reload": "",
|
||||
"uicon-order": "",
|
||||
"uicon-server-man": "",
|
||||
"uicon-search": "",
|
||||
"uicon-fingerprint": "",
|
||||
"uicon-more-dot-fill": "",
|
||||
"uicon-scan": "",
|
||||
"uicon-share-square": "",
|
||||
"uicon-map": "",
|
||||
"uicon-map-fill": "",
|
||||
"uicon-tags": "",
|
||||
"uicon-tags-fill": "",
|
||||
"uicon-bookmark-fill": "",
|
||||
"uicon-bookmark": "",
|
||||
"uicon-eye": "",
|
||||
"uicon-eye-fill": "",
|
||||
"uicon-mic": "",
|
||||
"uicon-mic-off": "",
|
||||
"uicon-calendar": "",
|
||||
"uicon-calendar-fill": "",
|
||||
"uicon-trash": "",
|
||||
"uicon-trash-fill": "",
|
||||
"uicon-play-left": "",
|
||||
"uicon-play-right": "",
|
||||
"uicon-minus": "",
|
||||
"uicon-plus": "",
|
||||
"uicon-info": "",
|
||||
"uicon-info-circle": "",
|
||||
"uicon-info-circle-fill": "",
|
||||
"uicon-question": "",
|
||||
"uicon-error": "",
|
||||
"uicon-close": "",
|
||||
"uicon-checkmark": "",
|
||||
"uicon-android-circle-fill": "",
|
||||
"uicon-android-fill": "",
|
||||
"uicon-ie": "",
|
||||
"uicon-IE-circle-fill": "",
|
||||
"uicon-google": "",
|
||||
"uicon-google-circle-fill": "",
|
||||
"uicon-setting-fill": "",
|
||||
"uicon-setting": "",
|
||||
"uicon-minus-square-fill": "",
|
||||
"uicon-plus-square-fill": "",
|
||||
"uicon-heart": "",
|
||||
"uicon-heart-fill": "",
|
||||
"uicon-camera": "",
|
||||
"uicon-camera-fill": "",
|
||||
"uicon-more-circle": "",
|
||||
"uicon-more-circle-fill": "",
|
||||
"uicon-chat": "",
|
||||
"uicon-chat-fill": "",
|
||||
"uicon-bag-fill": "",
|
||||
"uicon-bag": "",
|
||||
"uicon-error-circle-fill": "",
|
||||
"uicon-error-circle": "",
|
||||
"uicon-close-circle": "",
|
||||
"uicon-close-circle-fill": "",
|
||||
"uicon-checkmark-circle": "",
|
||||
"uicon-checkmark-circle-fill": "",
|
||||
"uicon-question-circle-fill": "",
|
||||
"uicon-question-circle": "",
|
||||
"uicon-share": "",
|
||||
"uicon-share-fill": "",
|
||||
"uicon-shopping-cart": "",
|
||||
"uicon-shopping-cart-fill": "",
|
||||
"uicon-bell": "",
|
||||
"uicon-bell-fill": "",
|
||||
"uicon-list": "",
|
||||
"uicon-list-dot": "",
|
||||
"uicon-zhihu": "",
|
||||
"uicon-zhihu-circle-fill": "",
|
||||
"uicon-zhifubao": "",
|
||||
"uicon-zhifubao-circle-fill": "",
|
||||
"uicon-weixin-circle-fill": "",
|
||||
"uicon-weixin-fill": "",
|
||||
"uicon-twitter-circle-fill": "",
|
||||
"uicon-twitter": "",
|
||||
"uicon-taobao-circle-fill": "",
|
||||
"uicon-taobao": "",
|
||||
"uicon-weibo-circle-fill": "",
|
||||
"uicon-weibo": "",
|
||||
"uicon-qq-fill": "",
|
||||
"uicon-qq-circle-fill": "",
|
||||
"uicon-moments-circel-fill": "",
|
||||
"uicon-moments": "",
|
||||
"uicon-qzone": "",
|
||||
"uicon-qzone-circle-fill": "",
|
||||
"uicon-baidu-circle-fill": "",
|
||||
"uicon-baidu": "",
|
||||
"uicon-facebook-circle-fill": "",
|
||||
"uicon-facebook": "",
|
||||
"uicon-car": "",
|
||||
"uicon-car-fill": "",
|
||||
"uicon-warning-fill": "",
|
||||
"uicon-warning": "",
|
||||
"uicon-clock-fill": "",
|
||||
"uicon-clock": "",
|
||||
"uicon-edit-pen": "",
|
||||
"uicon-edit-pen-fill": "",
|
||||
"uicon-email": "",
|
||||
"uicon-email-fill": "",
|
||||
"uicon-minus-circle": "",
|
||||
"uicon-minus-circle-fill": "",
|
||||
"uicon-plus-circle": "",
|
||||
"uicon-plus-circle-fill": "",
|
||||
"uicon-file-text": "",
|
||||
"uicon-file-text-fill": "",
|
||||
"uicon-pushpin": "",
|
||||
"uicon-pushpin-fill": "",
|
||||
"uicon-grid": "",
|
||||
"uicon-grid-fill": "",
|
||||
"uicon-play-circle": "",
|
||||
"uicon-play-circle-fill": "",
|
||||
"uicon-pause-circle-fill": "",
|
||||
"uicon-pause": "",
|
||||
"uicon-pause-circle": "",
|
||||
"uicon-eye-off": "",
|
||||
"uicon-eye-off-outline": "",
|
||||
"uicon-gift-fill": "",
|
||||
"uicon-gift": "",
|
||||
"uicon-rmb-circle-fill": "",
|
||||
"uicon-rmb-circle": "",
|
||||
"uicon-kefu-ermai": "",
|
||||
"uicon-server-fill": "",
|
||||
"uicon-coupon-fill": "",
|
||||
"uicon-coupon": "",
|
||||
"uicon-integral": "",
|
||||
"uicon-integral-fill": "",
|
||||
"uicon-home-fill": "",
|
||||
"uicon-home": "",
|
||||
"uicon-hourglass-half-fill": "",
|
||||
"uicon-hourglass": "",
|
||||
"uicon-account": "",
|
||||
"uicon-plus-people-fill": "",
|
||||
"uicon-minus-people-fill": "",
|
||||
"uicon-account-fill": "",
|
||||
"uicon-thumb-down-fill": "",
|
||||
"uicon-thumb-down": "",
|
||||
"uicon-thumb-up": "",
|
||||
"uicon-thumb-up-fill": "",
|
||||
"uicon-lock-fill": "",
|
||||
"uicon-lock-open": "",
|
||||
"uicon-lock-opened-fill": "",
|
||||
"uicon-lock": "",
|
||||
"uicon-red-packet-fill": "",
|
||||
"uicon-photo-fill": "",
|
||||
"uicon-photo": "",
|
||||
"uicon-volume-off-fill": "",
|
||||
"uicon-volume-off": "",
|
||||
"uicon-volume-fill": "",
|
||||
"uicon-volume": "",
|
||||
"uicon-red-packet": "",
|
||||
"uicon-download": "",
|
||||
"uicon-arrow-up-fill": "",
|
||||
"uicon-arrow-down-fill": "",
|
||||
"uicon-play-left-fill": "",
|
||||
"uicon-play-right-fill": "",
|
||||
"uicon-rewind-left-fill": "",
|
||||
"uicon-rewind-right-fill": "",
|
||||
"uicon-arrow-downward": "",
|
||||
"uicon-arrow-leftward": "",
|
||||
"uicon-arrow-rightward": "",
|
||||
"uicon-arrow-upward": "",
|
||||
"uicon-arrow-down": "",
|
||||
"uicon-arrow-right": "",
|
||||
"uicon-arrow-left": "",
|
||||
"uicon-arrow-up": "",
|
||||
"uicon-skip-back-left": "",
|
||||
"uicon-skip-forward-right": "",
|
||||
"uicon-rewind-right": "",
|
||||
"uicon-rewind-left": "",
|
||||
"uicon-arrow-right-double": "",
|
||||
"uicon-arrow-left-double": "",
|
||||
"uicon-wifi-off": "",
|
||||
"uicon-wifi": "",
|
||||
"uicon-empty-data": "",
|
||||
"uicon-empty-history": "",
|
||||
"uicon-empty-list": "",
|
||||
"uicon-empty-page": "",
|
||||
"uicon-empty-order": "",
|
||||
"uicon-man": "",
|
||||
"uicon-woman": "",
|
||||
"uicon-man-add": "",
|
||||
"uicon-man-add-fill": "",
|
||||
"uicon-man-delete": "",
|
||||
"uicon-man-delete-fill": "",
|
||||
"uicon-zh": "",
|
||||
"uicon-en": ""
|
||||
};
|
||||
exports.icons = icons;
|
||||
92
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-icon/props.js
vendored
Normal file
92
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-icon/props.js
vendored
Normal file
@@ -0,0 +1,92 @@
|
||||
"use strict";
|
||||
const uni_modules_uviewPlus_libs_config_props = require("../../libs/config/props.js");
|
||||
const props = {
|
||||
props: {
|
||||
// 图标类名
|
||||
name: {
|
||||
type: String,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.icon.name
|
||||
},
|
||||
// 图标颜色,可接受主题色
|
||||
color: {
|
||||
type: String,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.icon.color
|
||||
},
|
||||
// 字体大小,单位px
|
||||
size: {
|
||||
type: [String, Number],
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.icon.size
|
||||
},
|
||||
// 是否显示粗体
|
||||
bold: {
|
||||
type: Boolean,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.icon.bold
|
||||
},
|
||||
// 点击图标的时候传递事件出去的index(用于区分点击了哪一个)
|
||||
index: {
|
||||
type: [String, Number],
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.icon.index
|
||||
},
|
||||
// 触摸图标时的类名
|
||||
hoverClass: {
|
||||
type: String,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.icon.hoverClass
|
||||
},
|
||||
// 自定义扩展前缀,方便用户扩展自己的图标库
|
||||
customPrefix: {
|
||||
type: String,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.icon.customPrefix
|
||||
},
|
||||
// 图标右边或者下面的文字
|
||||
label: {
|
||||
type: [String, Number],
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.icon.label
|
||||
},
|
||||
// label的位置,只能右边或者下边
|
||||
labelPos: {
|
||||
type: String,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.icon.labelPos
|
||||
},
|
||||
// label的大小
|
||||
labelSize: {
|
||||
type: [String, Number],
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.icon.labelSize
|
||||
},
|
||||
// label的颜色
|
||||
labelColor: {
|
||||
type: String,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.icon.labelColor
|
||||
},
|
||||
// label与图标的距离
|
||||
space: {
|
||||
type: [String, Number],
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.icon.space
|
||||
},
|
||||
// 图片的mode
|
||||
imgMode: {
|
||||
type: String,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.icon.imgMode
|
||||
},
|
||||
// 用于显示图片小图标时,图片的宽度
|
||||
width: {
|
||||
type: [String, Number],
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.icon.width
|
||||
},
|
||||
// 用于显示图片小图标时,图片的高度
|
||||
height: {
|
||||
type: [String, Number],
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.icon.height
|
||||
},
|
||||
// 用于解决某些情况下,让图标垂直居中的用途
|
||||
top: {
|
||||
type: [String, Number],
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.icon.top
|
||||
},
|
||||
// 是否阻止事件传播
|
||||
stop: {
|
||||
type: Boolean,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.icon.stop
|
||||
}
|
||||
}
|
||||
};
|
||||
exports.props = props;
|
||||
69
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-icon/u-icon.acss
vendored
Normal file
69
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-icon/u-icon.acss
vendored
Normal file
@@ -0,0 +1,69 @@
|
||||
.u-empty.data-v-ac70166d,
|
||||
.u-empty__wrap.data-v-ac70166d,
|
||||
.u-tabs.data-v-ac70166d,
|
||||
.u-tabs__wrapper.data-v-ac70166d,
|
||||
.u-tabs__wrapper__scroll-view-wrapper.data-v-ac70166d,
|
||||
.u-tabs__wrapper__scroll-view.data-v-ac70166d,
|
||||
.u-tabs__wrapper__nav.data-v-ac70166d,
|
||||
.u-tabs__wrapper__nav__line.data-v-ac70166d {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
flex-shrink: 0;
|
||||
flex-grow: 0;
|
||||
flex-basis: auto;
|
||||
align-items: stretch;
|
||||
align-content: flex-start;
|
||||
}
|
||||
@font-face {
|
||||
font-family: "uicon-iconfont";
|
||||
src: url("https://at.alicdn.com/t/font_2225171_8kdcwk4po24.ttf") format("truetype");
|
||||
}
|
||||
.u-icon.data-v-ac70166d {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.u-icon--left.data-v-ac70166d {
|
||||
flex-direction: row-reverse;
|
||||
align-items: center;
|
||||
}
|
||||
.u-icon--right.data-v-ac70166d {
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
}
|
||||
.u-icon--top.data-v-ac70166d {
|
||||
flex-direction: column-reverse;
|
||||
justify-content: center;
|
||||
}
|
||||
.u-icon--bottom.data-v-ac70166d {
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
}
|
||||
.u-icon__icon.data-v-ac70166d {
|
||||
font-family: uicon-iconfont;
|
||||
position: relative;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
}
|
||||
.u-icon__icon--primary.data-v-ac70166d {
|
||||
color: #3c9cff;
|
||||
}
|
||||
.u-icon__icon--success.data-v-ac70166d {
|
||||
color: #5ac725;
|
||||
}
|
||||
.u-icon__icon--error.data-v-ac70166d {
|
||||
color: #f56c6c;
|
||||
}
|
||||
.u-icon__icon--warning.data-v-ac70166d {
|
||||
color: #f9ae3d;
|
||||
}
|
||||
.u-icon__icon--info.data-v-ac70166d {
|
||||
color: #909399;
|
||||
}
|
||||
.u-icon__img.data-v-ac70166d {
|
||||
height: auto;
|
||||
will-change: transform;
|
||||
}
|
||||
.u-icon__label.data-v-ac70166d {
|
||||
line-height: 1;
|
||||
}
|
||||
1
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-icon/u-icon.axml
vendored
Normal file
1
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-icon/u-icon.axml
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<view onTap="{{s}}" class="{{('u-icon') + ' ' + 'data-v-ac70166d' + ' ' + t}}"><image a:if="{{a}}" class="u-icon__img data-v-ac70166d" src="{{b}}" mode="{{c}}" style="{{d + ';' + e}}"></image><text a:else class="{{('u-icon__icon') + ' ' + 'data-v-ac70166d' + ' ' + g}}" style="{{h + ';' + i}}" hover-class="{{j}}">{{f}}</text><text a:if="{{k}}" class="u-icon__label data-v-ac70166d" style="{{'color:' + m + ';' + ('font-size:' + n) + ';' + ('margin-left:' + o) + ';' + ('margin-top:' + p) + ';' + ('margin-right:' + q) + ';' + ('margin-bottom:' + r)}}">{{l}}</text></view>
|
||||
99
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-icon/u-icon.js
vendored
Normal file
99
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-icon/u-icon.js
vendored
Normal file
@@ -0,0 +1,99 @@
|
||||
"use strict";
|
||||
const uni_modules_uviewPlus_components_uIcon_icons = require("./icons.js");
|
||||
const uni_modules_uviewPlus_components_uIcon_props = require("./props.js");
|
||||
const uni_modules_uviewPlus_libs_mixin_mpMixin = require("../../libs/mixin/mpMixin.js");
|
||||
const uni_modules_uviewPlus_libs_mixin_mixin = require("../../libs/mixin/mixin.js");
|
||||
const uni_modules_uviewPlus_libs_function_index = require("../../libs/function/index.js");
|
||||
const uni_modules_uviewPlus_libs_config_config = require("../../libs/config/config.js");
|
||||
const common_vendor = require("../../../../common/vendor.js");
|
||||
const _sfc_main = {
|
||||
name: "u-icon",
|
||||
data() {
|
||||
return {};
|
||||
},
|
||||
emits: ["click"],
|
||||
mixins: [uni_modules_uviewPlus_libs_mixin_mpMixin.mpMixin, uni_modules_uviewPlus_libs_mixin_mixin.mixin, uni_modules_uviewPlus_components_uIcon_props.props],
|
||||
computed: {
|
||||
uClasses() {
|
||||
let classes = [];
|
||||
classes.push(this.customPrefix + "-" + this.name);
|
||||
if (this.customPrefix == "uicon") {
|
||||
classes.push("u-iconfont");
|
||||
} else {
|
||||
classes.push(this.customPrefix);
|
||||
}
|
||||
if (this.color && uni_modules_uviewPlus_libs_config_config.config.type.includes(this.color))
|
||||
classes.push("u-icon__icon--" + this.color);
|
||||
classes = classes.join(" ");
|
||||
return classes;
|
||||
},
|
||||
iconStyle() {
|
||||
let style = {};
|
||||
style = {
|
||||
fontSize: uni_modules_uviewPlus_libs_function_index.addUnit(this.size),
|
||||
lineHeight: uni_modules_uviewPlus_libs_function_index.addUnit(this.size),
|
||||
fontWeight: this.bold ? "bold" : "normal",
|
||||
// 某些特殊情况需要设置一个到顶部的距离,才能更好的垂直居中
|
||||
top: uni_modules_uviewPlus_libs_function_index.addUnit(this.top)
|
||||
};
|
||||
if (this.color && !uni_modules_uviewPlus_libs_config_config.config.type.includes(this.color))
|
||||
style.color = this.color;
|
||||
return style;
|
||||
},
|
||||
// 判断传入的name属性,是否图片路径,只要带有"/"均认为是图片形式
|
||||
isImg() {
|
||||
return this.name.indexOf("/") !== -1;
|
||||
},
|
||||
imgStyle() {
|
||||
let style = {};
|
||||
style.width = this.width ? uni_modules_uviewPlus_libs_function_index.addUnit(this.width) : uni_modules_uviewPlus_libs_function_index.addUnit(this.size);
|
||||
style.height = this.height ? uni_modules_uviewPlus_libs_function_index.addUnit(this.height) : uni_modules_uviewPlus_libs_function_index.addUnit(this.size);
|
||||
return style;
|
||||
},
|
||||
// 通过图标名,查找对应的图标
|
||||
icon() {
|
||||
if (this.customPrefix !== "uicon")
|
||||
return "";
|
||||
return uni_modules_uviewPlus_components_uIcon_icons.icons["uicon-" + this.name] || this.name;
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
addStyle: uni_modules_uviewPlus_libs_function_index.addStyle,
|
||||
addUnit: uni_modules_uviewPlus_libs_function_index.addUnit,
|
||||
clickHandler(e) {
|
||||
this.$emit("click", this.index);
|
||||
this.stop && this.preventEvent(e);
|
||||
}
|
||||
}
|
||||
};
|
||||
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
return common_vendor.e({
|
||||
a: $options.isImg
|
||||
}, $options.isImg ? {
|
||||
b: _ctx.name,
|
||||
c: _ctx.imgMode,
|
||||
d: common_vendor.s($options.imgStyle),
|
||||
e: common_vendor.s($options.addStyle(_ctx.customStyle))
|
||||
} : {
|
||||
f: common_vendor.t($options.icon),
|
||||
g: common_vendor.n($options.uClasses),
|
||||
h: common_vendor.s($options.iconStyle),
|
||||
i: common_vendor.s($options.addStyle(_ctx.customStyle)),
|
||||
j: _ctx.hoverClass
|
||||
}, {
|
||||
k: _ctx.label !== ""
|
||||
}, _ctx.label !== "" ? {
|
||||
l: common_vendor.t(_ctx.label),
|
||||
m: _ctx.labelColor,
|
||||
n: $options.addUnit(_ctx.labelSize),
|
||||
o: _ctx.labelPos == "right" ? $options.addUnit(_ctx.space) : 0,
|
||||
p: _ctx.labelPos == "bottom" ? $options.addUnit(_ctx.space) : 0,
|
||||
q: _ctx.labelPos == "left" ? $options.addUnit(_ctx.space) : 0,
|
||||
r: _ctx.labelPos == "top" ? $options.addUnit(_ctx.space) : 0
|
||||
} : {}, {
|
||||
s: common_vendor.o((...args) => $options.clickHandler && $options.clickHandler(...args)),
|
||||
t: common_vendor.n("u-icon--" + _ctx.labelPos)
|
||||
});
|
||||
}
|
||||
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-ac70166d"]]);
|
||||
my.createComponent(Component);
|
||||
5
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-icon/u-icon.json
vendored
Normal file
5
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-icon/u-icon.json
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"component": true,
|
||||
"styleIsolation": "apply-shared",
|
||||
"usingComponents": {}
|
||||
}
|
||||
189
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-input/props.js
vendored
Normal file
189
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-input/props.js
vendored
Normal file
@@ -0,0 +1,189 @@
|
||||
"use strict";
|
||||
const uni_modules_uviewPlus_libs_config_props = require("../../libs/config/props.js");
|
||||
const props = {
|
||||
props: {
|
||||
// 绑定的值
|
||||
modelValue: {
|
||||
type: [String, Number],
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.input.value
|
||||
},
|
||||
// number-数字输入键盘,app-vue下可以输入浮点数,app-nvue和小程序平台下只能输入整数
|
||||
// idcard-身份证输入键盘,微信、支付宝、百度、QQ小程序
|
||||
// digit-带小数点的数字键盘,App的nvue页面、微信、支付宝、百度、头条、QQ小程序
|
||||
// text-文本输入键盘
|
||||
type: {
|
||||
type: String,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.input.type
|
||||
},
|
||||
// 如果 textarea 是在一个 position:fixed 的区域,需要显示指定属性 fixed 为 true,
|
||||
// 兼容性:微信小程序、百度小程序、字节跳动小程序、QQ小程序
|
||||
fixed: {
|
||||
type: Boolean,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.input.fixed
|
||||
},
|
||||
// 是否禁用输入框
|
||||
disabled: {
|
||||
type: Boolean,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.input.disabled
|
||||
},
|
||||
// 禁用状态时的背景色
|
||||
disabledColor: {
|
||||
type: String,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.input.disabledColor
|
||||
},
|
||||
// 是否显示清除控件
|
||||
clearable: {
|
||||
type: Boolean,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.input.clearable
|
||||
},
|
||||
// 是否密码类型
|
||||
password: {
|
||||
type: Boolean,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.input.password
|
||||
},
|
||||
// 最大输入长度,设置为 -1 的时候不限制最大长度
|
||||
maxlength: {
|
||||
type: [String, Number],
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.input.maxlength
|
||||
},
|
||||
// 输入框为空时的占位符
|
||||
placeholder: {
|
||||
type: String,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.input.placeholder
|
||||
},
|
||||
// 指定placeholder的样式类,注意页面或组件的style中写了scoped时,需要在类名前写/deep/
|
||||
placeholderClass: {
|
||||
type: String,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.input.placeholderClass
|
||||
},
|
||||
// 指定placeholder的样式
|
||||
placeholderStyle: {
|
||||
type: [String, Object],
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.input.placeholderStyle
|
||||
},
|
||||
// 是否显示输入字数统计,只在 type ="text"或type ="textarea"时有效
|
||||
showWordLimit: {
|
||||
type: Boolean,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.input.showWordLimit
|
||||
},
|
||||
// 设置右下角按钮的文字,有效值:send|search|next|go|done,兼容性详见uni-app文档
|
||||
// https://uniapp.dcloud.io/component/input
|
||||
// https://uniapp.dcloud.io/component/textarea
|
||||
confirmType: {
|
||||
type: String,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.input.confirmType
|
||||
},
|
||||
// 点击键盘右下角按钮时是否保持键盘不收起,H5无效
|
||||
confirmHold: {
|
||||
type: Boolean,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.input.confirmHold
|
||||
},
|
||||
// focus时,点击页面的时候不收起键盘,微信小程序有效
|
||||
holdKeyboard: {
|
||||
type: Boolean,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.input.holdKeyboard
|
||||
},
|
||||
// 自动获取焦点
|
||||
// 在 H5 平台能否聚焦以及软键盘是否跟随弹出,取决于当前浏览器本身的实现。nvue 页面不支持,需使用组件的 focus()、blur() 方法控制焦点
|
||||
focus: {
|
||||
type: Boolean,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.input.focus
|
||||
},
|
||||
// 键盘收起时,是否自动失去焦点,目前仅App3.0.0+有效
|
||||
autoBlur: {
|
||||
type: Boolean,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.input.autoBlur
|
||||
},
|
||||
// 是否去掉 iOS 下的默认内边距,仅微信小程序,且type=textarea时有效
|
||||
disableDefaultPadding: {
|
||||
type: Boolean,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.input.disableDefaultPadding
|
||||
},
|
||||
// 指定focus时光标的位置
|
||||
cursor: {
|
||||
type: [String, Number],
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.input.cursor
|
||||
},
|
||||
// 输入框聚焦时底部与键盘的距离
|
||||
cursorSpacing: {
|
||||
type: [String, Number],
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.input.cursorSpacing
|
||||
},
|
||||
// 光标起始位置,自动聚集时有效,需与selection-end搭配使用
|
||||
selectionStart: {
|
||||
type: [String, Number],
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.input.selectionStart
|
||||
},
|
||||
// 光标结束位置,自动聚集时有效,需与selection-start搭配使用
|
||||
selectionEnd: {
|
||||
type: [String, Number],
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.input.selectionEnd
|
||||
},
|
||||
// 键盘弹起时,是否自动上推页面
|
||||
adjustPosition: {
|
||||
type: Boolean,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.input.adjustPosition
|
||||
},
|
||||
// 输入框内容对齐方式,可选值为:left|center|right
|
||||
inputAlign: {
|
||||
type: String,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.input.inputAlign
|
||||
},
|
||||
// 输入框字体的大小
|
||||
fontSize: {
|
||||
type: [String, Number],
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.input.fontSize
|
||||
},
|
||||
// 输入框字体颜色
|
||||
color: {
|
||||
type: String,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.input.color
|
||||
},
|
||||
// 输入框前置图标
|
||||
prefixIcon: {
|
||||
type: String,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.input.prefixIcon
|
||||
},
|
||||
// 前置图标样式,对象或字符串
|
||||
prefixIconStyle: {
|
||||
type: [String, Object],
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.input.prefixIconStyle
|
||||
},
|
||||
// 输入框后置图标
|
||||
suffixIcon: {
|
||||
type: String,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.input.suffixIcon
|
||||
},
|
||||
// 后置图标样式,对象或字符串
|
||||
suffixIconStyle: {
|
||||
type: [String, Object],
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.input.suffixIconStyle
|
||||
},
|
||||
// 边框类型,surround-四周边框,bottom-底部边框,none-无边框
|
||||
border: {
|
||||
type: String,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.input.border
|
||||
},
|
||||
// 是否只读,与disabled不同之处在于disabled会置灰组件,而readonly则不会
|
||||
readonly: {
|
||||
type: Boolean,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.input.readonly
|
||||
},
|
||||
// 输入框形状,circle-圆形,square-方形
|
||||
shape: {
|
||||
type: String,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.input.shape
|
||||
},
|
||||
// 用于处理或者过滤输入框内容的方法
|
||||
formatter: {
|
||||
type: [Function, null],
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.input.formatter
|
||||
},
|
||||
// 是否忽略组件内对文本合成系统事件的处理
|
||||
ignoreCompositionEvent: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
}
|
||||
}
|
||||
};
|
||||
exports.props = props;
|
||||
72
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-input/u-input.acss
vendored
Normal file
72
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-input/u-input.acss
vendored
Normal file
@@ -0,0 +1,72 @@
|
||||
.u-empty.data-v-df79975b,
|
||||
.u-empty__wrap.data-v-df79975b,
|
||||
.u-tabs.data-v-df79975b,
|
||||
.u-tabs__wrapper.data-v-df79975b,
|
||||
.u-tabs__wrapper__scroll-view-wrapper.data-v-df79975b,
|
||||
.u-tabs__wrapper__scroll-view.data-v-df79975b,
|
||||
.u-tabs__wrapper__nav.data-v-df79975b,
|
||||
.u-tabs__wrapper__nav__line.data-v-df79975b {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
flex-shrink: 0;
|
||||
flex-grow: 0;
|
||||
flex-basis: auto;
|
||||
align-items: stretch;
|
||||
align-content: flex-start;
|
||||
}
|
||||
.u-input.data-v-df79975b {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
flex: 1;
|
||||
}
|
||||
.u-input--radius.data-v-df79975b, .u-input--square.data-v-df79975b {
|
||||
border-radius: 4px;
|
||||
}
|
||||
.u-input--no-radius.data-v-df79975b {
|
||||
border-radius: 0;
|
||||
}
|
||||
.u-input--circle.data-v-df79975b {
|
||||
border-radius: 100px;
|
||||
}
|
||||
.u-input__content.data-v-df79975b {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.u-input__content__field-wrapper.data-v-df79975b {
|
||||
position: relative;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
margin: 0;
|
||||
flex: 1;
|
||||
}
|
||||
.u-input__content__field-wrapper__field.data-v-df79975b {
|
||||
line-height: 26px;
|
||||
text-align: left;
|
||||
color: #303133;
|
||||
height: 24px;
|
||||
font-size: 15px;
|
||||
flex: 1;
|
||||
}
|
||||
.u-input__content__clear.data-v-df79975b {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
border-radius: 100px;
|
||||
background-color: #c6c7cb;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
transform: scale(0.82);
|
||||
margin-left: 4px;
|
||||
}
|
||||
.u-input__content__subfix-icon.data-v-df79975b {
|
||||
margin-left: 4px;
|
||||
}
|
||||
.u-input__content__prefix-icon.data-v-df79975b {
|
||||
margin-right: 4px;
|
||||
}
|
||||
1
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-input/u-input.axml
vendored
Normal file
1
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-input/u-input.axml
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<view class="{{('u-input') + ' ' + 'data-v-df79975b' + ' ' + I}}" style="{{J}}"><view class="u-input__content data-v-df79975b"><view a:if="{{a}}" class="u-input__content__prefix-icon data-v-df79975b"><slot name="prefix"><u-icon class="data-v-df79975b" u-i="df79975b-0" onVI="__l" u-p="{{b}}"></u-icon></slot></view><view class="u-input__content__field-wrapper data-v-df79975b" onTap="{{C}}"><input class="u-input__content__field-wrapper__field data-v-df79975b" style="{{c}}" type="{{d}}" focus="{{e}}" cursor="{{f}}" value="{{g}}" auto-blur="{{h}}" disabled="{{i}}" maxlength="{{j}}" placeholder="{{k}}" placeholder-style="{{l}}" placeholder-class="{{m}}" confirm-type="{{n}}" confirm-hold="{{o}}" hold-keyboard="{{p}}" cursor-spacing="{{q}}" adjust-position="{{r}}" selection-end="{{s}}" selection-start="{{t}}" password="{{v}}" ignoreCompositionEvent="{{w}}" onInput="{{x}}" onBlur="{{y}}" onFocus="{{z}}" onConfirm="{{A}}" onKeyboardheightchange="{{B}}"/></view><view a:if="{{D}}" class="u-input__content__clear data-v-df79975b" onTap="{{F}}"><u-icon class="data-v-df79975b" u-i="df79975b-1" onVI="__l" u-p="{{E}}"></u-icon></view><view a:if="{{G}}" class="u-input__content__subfix-icon data-v-df79975b"><slot name="suffix"><u-icon class="data-v-df79975b" u-i="df79975b-2" onVI="__l" u-p="{{H}}"></u-icon></slot></view></view></view>
|
||||
218
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-input/u-input.js
vendored
Normal file
218
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-input/u-input.js
vendored
Normal file
@@ -0,0 +1,218 @@
|
||||
"use strict";
|
||||
const uni_modules_uviewPlus_components_uInput_props = require("./props.js");
|
||||
const uni_modules_uviewPlus_libs_mixin_mpMixin = require("../../libs/mixin/mpMixin.js");
|
||||
const uni_modules_uviewPlus_libs_mixin_mixin = require("../../libs/mixin/mixin.js");
|
||||
const uni_modules_uviewPlus_libs_function_index = require("../../libs/function/index.js");
|
||||
const common_vendor = require("../../../../common/vendor.js");
|
||||
const _sfc_main = {
|
||||
name: "u-input",
|
||||
mixins: [uni_modules_uviewPlus_libs_mixin_mpMixin.mpMixin, uni_modules_uviewPlus_libs_mixin_mixin.mixin, uni_modules_uviewPlus_components_uInput_props.props],
|
||||
data() {
|
||||
return {
|
||||
// 清除操作
|
||||
clearInput: false,
|
||||
// 输入框的值
|
||||
innerValue: "",
|
||||
// 是否处于获得焦点状态
|
||||
focused: false,
|
||||
// value是否第一次变化,在watch中,由于加入immediate属性,会在第一次触发,此时不应该认为value发生了变化
|
||||
firstChange: true,
|
||||
// value绑定值的变化是由内部还是外部引起的
|
||||
changeFromInner: false,
|
||||
// 过滤处理方法
|
||||
innerFormatter: (value) => value
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
modelValue: {
|
||||
immediate: true,
|
||||
handler(newVal, oldVal) {
|
||||
this.innerValue = newVal;
|
||||
this.firstChange = false;
|
||||
this.changeFromInner = false;
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
// 是否显示清除控件
|
||||
isShowClear() {
|
||||
const { clearable, readonly, focused, innerValue } = this;
|
||||
return !!clearable && !readonly && !!focused && innerValue !== "";
|
||||
},
|
||||
// 组件的类名
|
||||
inputClass() {
|
||||
let classes = [], { border, disabled, shape } = this;
|
||||
border === "surround" && (classes = classes.concat(["u-border", "u-input--radius"]));
|
||||
classes.push(`u-input--${shape}`);
|
||||
border === "bottom" && (classes = classes.concat([
|
||||
"u-border-bottom",
|
||||
"u-input--no-radius"
|
||||
]));
|
||||
return classes.join(" ");
|
||||
},
|
||||
// 组件的样式
|
||||
wrapperStyle() {
|
||||
const style = {};
|
||||
if (this.disabled) {
|
||||
style.backgroundColor = this.disabledColor;
|
||||
}
|
||||
if (this.border === "none") {
|
||||
style.padding = "0";
|
||||
} else {
|
||||
style.paddingTop = "6px";
|
||||
style.paddingBottom = "6px";
|
||||
style.paddingLeft = "9px";
|
||||
style.paddingRight = "9px";
|
||||
}
|
||||
return uni_modules_uviewPlus_libs_function_index.deepMerge(style, uni_modules_uviewPlus_libs_function_index.addStyle(this.customStyle));
|
||||
},
|
||||
// 输入框的样式
|
||||
inputStyle() {
|
||||
const style = {
|
||||
color: this.color,
|
||||
fontSize: uni_modules_uviewPlus_libs_function_index.addUnit(this.fontSize),
|
||||
textAlign: this.inputAlign
|
||||
};
|
||||
return style;
|
||||
}
|
||||
},
|
||||
emits: ["update:modelValue", "focus", "blur", "change", "confirm", "clear", "keyboardheightchange"],
|
||||
methods: {
|
||||
// 在微信小程序中,不支持将函数当做props参数,故只能通过ref形式调用
|
||||
setFormatter(e) {
|
||||
this.innerFormatter = e;
|
||||
},
|
||||
// 当键盘输入时,触发input事件
|
||||
onInput(e) {
|
||||
let { value = "" } = e.detail || {};
|
||||
const formatter = this.formatter || this.innerFormatter;
|
||||
const formatValue = formatter(value);
|
||||
this.innerValue = value;
|
||||
this.$nextTick(() => {
|
||||
this.innerValue = formatValue;
|
||||
this.valueChange();
|
||||
});
|
||||
},
|
||||
// 输入框失去焦点时触发
|
||||
onBlur(event) {
|
||||
this.$emit("blur", event.detail.value);
|
||||
uni_modules_uviewPlus_libs_function_index.sleep(150).then(() => {
|
||||
this.focused = false;
|
||||
});
|
||||
uni_modules_uviewPlus_libs_function_index.formValidate(this, "blur");
|
||||
},
|
||||
// 输入框聚焦时触发
|
||||
onFocus(event) {
|
||||
this.focused = true;
|
||||
this.$emit("focus");
|
||||
},
|
||||
// 点击完成按钮时触发
|
||||
onConfirm(event) {
|
||||
this.$emit("confirm", this.innerValue);
|
||||
},
|
||||
// 键盘高度发生变化的时候触发此事件
|
||||
// 兼容性:微信小程序2.7.0+、App 3.1.0+
|
||||
onkeyboardheightchange(event) {
|
||||
this.$emit("keyboardheightchange", event);
|
||||
},
|
||||
// 内容发生变化,进行处理
|
||||
valueChange() {
|
||||
if (this.clearInput) {
|
||||
this.innerValue = "";
|
||||
this.clearInput = false;
|
||||
}
|
||||
const value = this.innerValue;
|
||||
this.$nextTick(() => {
|
||||
this.$emit("update:modelValue", value);
|
||||
this.changeFromInner = true;
|
||||
this.$emit("change", value);
|
||||
uni_modules_uviewPlus_libs_function_index.formValidate(this, "change");
|
||||
});
|
||||
},
|
||||
// 点击清除控件
|
||||
onClear() {
|
||||
this.clearInput = true;
|
||||
this.innerValue = "";
|
||||
this.$nextTick(() => {
|
||||
this.valueChange();
|
||||
this.$emit("clear");
|
||||
});
|
||||
},
|
||||
/**
|
||||
* 在安卓nvue上,事件无法冒泡
|
||||
* 在某些时间,我们希望监听u-from-item的点击事件,此时会导致点击u-form-item内的u-input后
|
||||
* 无法触发u-form-item的点击事件,这里通过手动调用u-form-item的方法进行触发
|
||||
*/
|
||||
clickHandler() {
|
||||
}
|
||||
}
|
||||
};
|
||||
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();
|
||||
}
|
||||
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
return common_vendor.e({
|
||||
a: _ctx.prefixIcon || _ctx.$slots.prefix
|
||||
}, _ctx.prefixIcon || _ctx.$slots.prefix ? {
|
||||
b: common_vendor.p({
|
||||
name: _ctx.prefixIcon,
|
||||
size: "18",
|
||||
customStyle: _ctx.prefixIconStyle
|
||||
})
|
||||
} : {}, {
|
||||
c: common_vendor.s($options.inputStyle),
|
||||
d: _ctx.type,
|
||||
e: _ctx.focus,
|
||||
f: _ctx.cursor,
|
||||
g: $data.innerValue,
|
||||
h: _ctx.autoBlur,
|
||||
i: _ctx.disabled || _ctx.readonly,
|
||||
j: _ctx.maxlength,
|
||||
k: _ctx.placeholder,
|
||||
l: _ctx.placeholderStyle,
|
||||
m: _ctx.placeholderClass,
|
||||
n: _ctx.confirmType,
|
||||
o: _ctx.confirmHold,
|
||||
p: _ctx.holdKeyboard,
|
||||
q: _ctx.cursorSpacing,
|
||||
r: _ctx.adjustPosition,
|
||||
s: _ctx.selectionEnd,
|
||||
t: _ctx.selectionStart,
|
||||
v: _ctx.password || _ctx.type === "password" || false,
|
||||
w: _ctx.ignoreCompositionEvent,
|
||||
x: common_vendor.o((...args) => $options.onInput && $options.onInput(...args)),
|
||||
y: common_vendor.o((...args) => $options.onBlur && $options.onBlur(...args)),
|
||||
z: common_vendor.o((...args) => $options.onFocus && $options.onFocus(...args)),
|
||||
A: common_vendor.o((...args) => $options.onConfirm && $options.onConfirm(...args)),
|
||||
B: common_vendor.o((...args) => $options.onkeyboardheightchange && $options.onkeyboardheightchange(...args)),
|
||||
C: common_vendor.o((...args) => $options.clickHandler && $options.clickHandler(...args)),
|
||||
D: $options.isShowClear
|
||||
}, $options.isShowClear ? {
|
||||
E: common_vendor.p({
|
||||
name: "close",
|
||||
size: "11",
|
||||
color: "#ffffff",
|
||||
customStyle: "line-height: 12px"
|
||||
}),
|
||||
F: common_vendor.o((...args) => $options.onClear && $options.onClear(...args))
|
||||
} : {}, {
|
||||
G: _ctx.suffixIcon || _ctx.$slots.suffix
|
||||
}, _ctx.suffixIcon || _ctx.$slots.suffix ? {
|
||||
H: common_vendor.p({
|
||||
name: _ctx.suffixIcon,
|
||||
size: "18",
|
||||
customStyle: _ctx.suffixIconStyle,
|
||||
imgMode: "widthFix"
|
||||
})
|
||||
} : {}, {
|
||||
I: common_vendor.n($options.inputClass),
|
||||
J: common_vendor.s($options.wrapperStyle)
|
||||
});
|
||||
}
|
||||
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-df79975b"]]);
|
||||
my.createComponent(Component);
|
||||
7
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-input/u-input.json
vendored
Normal file
7
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-input/u-input.json
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"component": true,
|
||||
"styleIsolation": "apply-shared",
|
||||
"usingComponents": {
|
||||
"u-icon": "../u-icon/u-icon"
|
||||
}
|
||||
}
|
||||
36
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-line/props.js
vendored
Normal file
36
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-line/props.js
vendored
Normal file
@@ -0,0 +1,36 @@
|
||||
"use strict";
|
||||
const uni_modules_uviewPlus_libs_config_props = require("../../libs/config/props.js");
|
||||
const props = {
|
||||
props: {
|
||||
color: {
|
||||
type: String,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.line.color
|
||||
},
|
||||
// 长度,竖向时表现为高度,横向时表现为长度,可以为百分比,带px单位的值等
|
||||
length: {
|
||||
type: [String, Number],
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.line.length
|
||||
},
|
||||
// 线条方向,col-竖向,row-横向
|
||||
direction: {
|
||||
type: String,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.line.direction
|
||||
},
|
||||
// 是否显示细边框
|
||||
hairline: {
|
||||
type: Boolean,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.line.hairline
|
||||
},
|
||||
// 线条与上下左右元素的间距,字符串形式,如"30px"、"20px 30px"
|
||||
margin: {
|
||||
type: [String, Number],
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.line.margin
|
||||
},
|
||||
// 是否虚线,true-虚线,false-实线
|
||||
dashed: {
|
||||
type: Boolean,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.line.dashed
|
||||
}
|
||||
}
|
||||
};
|
||||
exports.props = props;
|
||||
19
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-line/u-line.acss
vendored
Normal file
19
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-line/u-line.acss
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
.u-empty.data-v-72791e59,
|
||||
.u-empty__wrap.data-v-72791e59,
|
||||
.u-tabs.data-v-72791e59,
|
||||
.u-tabs__wrapper.data-v-72791e59,
|
||||
.u-tabs__wrapper__scroll-view-wrapper.data-v-72791e59,
|
||||
.u-tabs__wrapper__scroll-view.data-v-72791e59,
|
||||
.u-tabs__wrapper__nav.data-v-72791e59,
|
||||
.u-tabs__wrapper__nav__line.data-v-72791e59 {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
flex-shrink: 0;
|
||||
flex-grow: 0;
|
||||
flex-basis: auto;
|
||||
align-items: stretch;
|
||||
align-content: flex-start;
|
||||
}
|
||||
.u-line.data-v-72791e59 {
|
||||
vertical-align: middle;
|
||||
}
|
||||
1
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-line/u-line.axml
vendored
Normal file
1
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-line/u-line.axml
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<view class="u-line data-v-72791e59" style="{{a}}"></view>
|
||||
38
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-line/u-line.js
vendored
Normal file
38
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-line/u-line.js
vendored
Normal file
@@ -0,0 +1,38 @@
|
||||
"use strict";
|
||||
const uni_modules_uviewPlus_components_uLine_props = require("./props.js");
|
||||
const uni_modules_uviewPlus_libs_mixin_mpMixin = require("../../libs/mixin/mpMixin.js");
|
||||
const uni_modules_uviewPlus_libs_mixin_mixin = require("../../libs/mixin/mixin.js");
|
||||
const uni_modules_uviewPlus_libs_function_index = require("../../libs/function/index.js");
|
||||
const common_vendor = require("../../../../common/vendor.js");
|
||||
const _sfc_main = {
|
||||
name: "u-line",
|
||||
mixins: [uni_modules_uviewPlus_libs_mixin_mpMixin.mpMixin, uni_modules_uviewPlus_libs_mixin_mixin.mixin, uni_modules_uviewPlus_components_uLine_props.props],
|
||||
computed: {
|
||||
lineStyle() {
|
||||
const style = {};
|
||||
style.margin = this.margin;
|
||||
if (this.direction === "row") {
|
||||
style.borderBottomWidth = "1px";
|
||||
style.borderBottomStyle = this.dashed ? "dashed" : "solid";
|
||||
style.width = uni_modules_uviewPlus_libs_function_index.addUnit(this.length);
|
||||
if (this.hairline)
|
||||
style.transform = "scaleY(0.5)";
|
||||
} else {
|
||||
style.borderLeftWidth = "1px";
|
||||
style.borderLeftStyle = this.dashed ? "dashed" : "solid";
|
||||
style.height = uni_modules_uviewPlus_libs_function_index.addUnit(this.length);
|
||||
if (this.hairline)
|
||||
style.transform = "scaleX(0.5)";
|
||||
}
|
||||
style.borderColor = this.color;
|
||||
return uni_modules_uviewPlus_libs_function_index.deepMerge(style, uni_modules_uviewPlus_libs_function_index.addStyle(this.customStyle));
|
||||
}
|
||||
}
|
||||
};
|
||||
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
return {
|
||||
a: common_vendor.s($options.lineStyle)
|
||||
};
|
||||
}
|
||||
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-72791e59"]]);
|
||||
my.createComponent(Component);
|
||||
5
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-line/u-line.json
vendored
Normal file
5
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-line/u-line.json
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"component": true,
|
||||
"styleIsolation": "apply-shared",
|
||||
"usingComponents": {}
|
||||
}
|
||||
42
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-link/props.js
vendored
Normal file
42
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-link/props.js
vendored
Normal file
@@ -0,0 +1,42 @@
|
||||
"use strict";
|
||||
const uni_modules_uviewPlus_libs_config_props = require("../../libs/config/props.js");
|
||||
const props = {
|
||||
props: {
|
||||
// 文字颜色
|
||||
color: {
|
||||
type: String,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.link.color
|
||||
},
|
||||
// 字体大小,单位px
|
||||
fontSize: {
|
||||
type: [String, Number],
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.link.fontSize
|
||||
},
|
||||
// 是否显示下划线
|
||||
underLine: {
|
||||
type: Boolean,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.link.underLine
|
||||
},
|
||||
// 要跳转的链接
|
||||
href: {
|
||||
type: String,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.link.href
|
||||
},
|
||||
// 小程序中复制到粘贴板的提示语
|
||||
mpTips: {
|
||||
type: String,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.link.mpTips
|
||||
},
|
||||
// 下划线颜色
|
||||
lineColor: {
|
||||
type: String,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.link.lineColor
|
||||
},
|
||||
// 超链接的问题,不使用slot形式传入,是因为nvue下无法修改颜色
|
||||
text: {
|
||||
type: String,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.link.text
|
||||
}
|
||||
}
|
||||
};
|
||||
exports.props = props;
|
||||
23
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-link/u-link.acss
vendored
Normal file
23
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-link/u-link.acss
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
.u-empty.data-v-12f6646d,
|
||||
.u-empty__wrap.data-v-12f6646d,
|
||||
.u-tabs.data-v-12f6646d,
|
||||
.u-tabs__wrapper.data-v-12f6646d,
|
||||
.u-tabs__wrapper__scroll-view-wrapper.data-v-12f6646d,
|
||||
.u-tabs__wrapper__scroll-view.data-v-12f6646d,
|
||||
.u-tabs__wrapper__nav.data-v-12f6646d,
|
||||
.u-tabs__wrapper__nav__line.data-v-12f6646d {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
flex-shrink: 0;
|
||||
flex-grow: 0;
|
||||
flex-basis: auto;
|
||||
align-items: stretch;
|
||||
align-content: flex-start;
|
||||
}
|
||||
.u-link.data-v-12f6646d {
|
||||
line-height: 1;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
flex-wrap: wrap;
|
||||
flex: 1;
|
||||
}
|
||||
1
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-link/u-link.axml
vendored
Normal file
1
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-link/u-link.axml
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<text class="u-link data-v-12f6646d" catchTap="{{b}}" style="{{c + ';' + d}}">{{a}}</text>
|
||||
48
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-link/u-link.js
vendored
Normal file
48
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-link/u-link.js
vendored
Normal file
@@ -0,0 +1,48 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../../../common/vendor.js");
|
||||
const uni_modules_uviewPlus_components_uLink_props = require("./props.js");
|
||||
const uni_modules_uviewPlus_libs_mixin_mpMixin = require("../../libs/mixin/mpMixin.js");
|
||||
const uni_modules_uviewPlus_libs_mixin_mixin = require("../../libs/mixin/mixin.js");
|
||||
const uni_modules_uviewPlus_libs_function_index = require("../../libs/function/index.js");
|
||||
const _sfc_main = {
|
||||
name: "u-link",
|
||||
mixins: [uni_modules_uviewPlus_libs_mixin_mpMixin.mpMixin, uni_modules_uviewPlus_libs_mixin_mixin.mixin, uni_modules_uviewPlus_components_uLink_props.props],
|
||||
computed: {
|
||||
linkStyle() {
|
||||
const style = {
|
||||
color: this.color,
|
||||
fontSize: uni_modules_uviewPlus_libs_function_index.addUnit(this.fontSize),
|
||||
// line-height设置为比字体大小多2px
|
||||
lineHeight: uni_modules_uviewPlus_libs_function_index.addUnit(uni_modules_uviewPlus_libs_function_index.getPx(this.fontSize) + 2),
|
||||
textDecoration: this.underLine ? "underline" : "none"
|
||||
};
|
||||
return style;
|
||||
}
|
||||
},
|
||||
emits: ["click"],
|
||||
methods: {
|
||||
addStyle: uni_modules_uviewPlus_libs_function_index.addStyle,
|
||||
openLink() {
|
||||
common_vendor.index.setClipboardData({
|
||||
data: this.href,
|
||||
success: () => {
|
||||
common_vendor.index.hideToast();
|
||||
this.$nextTick(() => {
|
||||
uni_modules_uviewPlus_libs_function_index.toast(this.mpTips);
|
||||
});
|
||||
}
|
||||
});
|
||||
this.$emit("click");
|
||||
}
|
||||
}
|
||||
};
|
||||
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
return {
|
||||
a: common_vendor.t(_ctx.text),
|
||||
b: common_vendor.o((...args) => $options.openLink && $options.openLink(...args)),
|
||||
c: common_vendor.s($options.linkStyle),
|
||||
d: common_vendor.s($options.addStyle(_ctx.customStyle))
|
||||
};
|
||||
}
|
||||
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-12f6646d"]]);
|
||||
my.createComponent(Component);
|
||||
5
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-link/u-link.json
vendored
Normal file
5
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-link/u-link.json
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"component": true,
|
||||
"styleIsolation": "apply-shared",
|
||||
"usingComponents": {}
|
||||
}
|
||||
62
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-loading-icon/props.js
vendored
Normal file
62
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-loading-icon/props.js
vendored
Normal file
@@ -0,0 +1,62 @@
|
||||
"use strict";
|
||||
const uni_modules_uviewPlus_libs_config_props = require("../../libs/config/props.js");
|
||||
const props = {
|
||||
props: {
|
||||
// 是否显示组件
|
||||
show: {
|
||||
type: Boolean,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.loadingIcon.show
|
||||
},
|
||||
// 颜色
|
||||
color: {
|
||||
type: String,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.loadingIcon.color
|
||||
},
|
||||
// 提示文字颜色
|
||||
textColor: {
|
||||
type: String,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.loadingIcon.textColor
|
||||
},
|
||||
// 文字和图标是否垂直排列
|
||||
vertical: {
|
||||
type: Boolean,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.loadingIcon.vertical
|
||||
},
|
||||
// 模式选择,circle-圆形,spinner-花朵形,semicircle-半圆形
|
||||
mode: {
|
||||
type: String,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.loadingIcon.mode
|
||||
},
|
||||
// 图标大小,单位默认px
|
||||
size: {
|
||||
type: [String, Number],
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.loadingIcon.size
|
||||
},
|
||||
// 文字大小
|
||||
textSize: {
|
||||
type: [String, Number],
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.loadingIcon.textSize
|
||||
},
|
||||
// 文字内容
|
||||
text: {
|
||||
type: [String, Number],
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.loadingIcon.text
|
||||
},
|
||||
// 动画模式
|
||||
timingFunction: {
|
||||
type: String,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.loadingIcon.timingFunction
|
||||
},
|
||||
// 动画执行周期时间
|
||||
duration: {
|
||||
type: [String, Number],
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.loadingIcon.duration
|
||||
},
|
||||
// mode=circle时的暗边颜色
|
||||
inactiveColor: {
|
||||
type: String,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.loadingIcon.inactiveColor
|
||||
}
|
||||
}
|
||||
};
|
||||
exports.props = props;
|
||||
148
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-loading-icon/u-loading-icon.acss
vendored
Normal file
148
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-loading-icon/u-loading-icon.acss
vendored
Normal file
@@ -0,0 +1,148 @@
|
||||
.u-empty.data-v-2af81691,
|
||||
.u-empty__wrap.data-v-2af81691,
|
||||
.u-tabs.data-v-2af81691,
|
||||
.u-tabs__wrapper.data-v-2af81691,
|
||||
.u-tabs__wrapper__scroll-view-wrapper.data-v-2af81691,
|
||||
.u-tabs__wrapper__scroll-view.data-v-2af81691,
|
||||
.u-tabs__wrapper__nav.data-v-2af81691,
|
||||
.u-tabs__wrapper__nav__line.data-v-2af81691 {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
flex-shrink: 0;
|
||||
flex-grow: 0;
|
||||
flex-basis: auto;
|
||||
align-items: stretch;
|
||||
align-content: flex-start;
|
||||
}
|
||||
.u-loading-icon.data-v-2af81691 {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
color: #c8c9cc;
|
||||
}
|
||||
.u-loading-icon__text.data-v-2af81691 {
|
||||
margin-left: 4px;
|
||||
color: #606266;
|
||||
font-size: 14px;
|
||||
line-height: 20px;
|
||||
}
|
||||
.u-loading-icon__spinner.data-v-2af81691 {
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
position: relative;
|
||||
box-sizing: border-box;
|
||||
max-width: 100%;
|
||||
max-height: 100%;
|
||||
animation: u-rotate-2af81691 1s linear infinite;
|
||||
}
|
||||
.u-loading-icon__spinner--semicircle.data-v-2af81691 {
|
||||
border-width: 2px;
|
||||
border-color: transparent;
|
||||
border-top-right-radius: 100px;
|
||||
border-top-left-radius: 100px;
|
||||
border-bottom-left-radius: 100px;
|
||||
border-bottom-right-radius: 100px;
|
||||
border-style: solid;
|
||||
}
|
||||
.u-loading-icon__spinner--circle.data-v-2af81691 {
|
||||
border-top-right-radius: 100px;
|
||||
border-top-left-radius: 100px;
|
||||
border-bottom-left-radius: 100px;
|
||||
border-bottom-right-radius: 100px;
|
||||
border-width: 2px;
|
||||
border-top-color: #e5e5e5;
|
||||
border-right-color: #e5e5e5;
|
||||
border-bottom-color: #e5e5e5;
|
||||
border-left-color: #e5e5e5;
|
||||
border-style: solid;
|
||||
}
|
||||
.u-loading-icon--vertical.data-v-2af81691 {
|
||||
flex-direction: column;
|
||||
}
|
||||
.data-v-2af81691:host {
|
||||
font-size: 0px;
|
||||
line-height: 1;
|
||||
}
|
||||
.u-loading-icon__spinner--spinner.data-v-2af81691 {
|
||||
animation-timing-function: steps(12);
|
||||
}
|
||||
.u-loading-icon__text.data-v-2af81691:empty {
|
||||
display: none;
|
||||
}
|
||||
.u-loading-icon--vertical .u-loading-icon__text.data-v-2af81691 {
|
||||
margin: 6px 0 0;
|
||||
color: #606266;
|
||||
}
|
||||
.u-loading-icon__dot.data-v-2af81691 {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
.u-loading-icon__dot.data-v-2af81691:before {
|
||||
display: block;
|
||||
width: 2px;
|
||||
height: 25%;
|
||||
margin: 0 auto;
|
||||
background-color: currentColor;
|
||||
border-radius: 40%;
|
||||
content: " ";
|
||||
}
|
||||
.u-loading-icon__dot.data-v-2af81691:nth-of-type(1) {
|
||||
transform: rotate(30deg);
|
||||
opacity: 1;
|
||||
}
|
||||
.u-loading-icon__dot.data-v-2af81691:nth-of-type(2) {
|
||||
transform: rotate(60deg);
|
||||
opacity: 0.9375;
|
||||
}
|
||||
.u-loading-icon__dot.data-v-2af81691:nth-of-type(3) {
|
||||
transform: rotate(90deg);
|
||||
opacity: 0.875;
|
||||
}
|
||||
.u-loading-icon__dot.data-v-2af81691:nth-of-type(4) {
|
||||
transform: rotate(120deg);
|
||||
opacity: 0.8125;
|
||||
}
|
||||
.u-loading-icon__dot.data-v-2af81691:nth-of-type(5) {
|
||||
transform: rotate(150deg);
|
||||
opacity: 0.75;
|
||||
}
|
||||
.u-loading-icon__dot.data-v-2af81691:nth-of-type(6) {
|
||||
transform: rotate(180deg);
|
||||
opacity: 0.6875;
|
||||
}
|
||||
.u-loading-icon__dot.data-v-2af81691:nth-of-type(7) {
|
||||
transform: rotate(210deg);
|
||||
opacity: 0.625;
|
||||
}
|
||||
.u-loading-icon__dot.data-v-2af81691:nth-of-type(8) {
|
||||
transform: rotate(240deg);
|
||||
opacity: 0.5625;
|
||||
}
|
||||
.u-loading-icon__dot.data-v-2af81691:nth-of-type(9) {
|
||||
transform: rotate(270deg);
|
||||
opacity: 0.5;
|
||||
}
|
||||
.u-loading-icon__dot.data-v-2af81691:nth-of-type(10) {
|
||||
transform: rotate(300deg);
|
||||
opacity: 0.4375;
|
||||
}
|
||||
.u-loading-icon__dot.data-v-2af81691:nth-of-type(11) {
|
||||
transform: rotate(330deg);
|
||||
opacity: 0.375;
|
||||
}
|
||||
.u-loading-icon__dot.data-v-2af81691:nth-of-type(12) {
|
||||
transform: rotate(360deg);
|
||||
opacity: 0.3125;
|
||||
}
|
||||
@keyframes u-rotate-2af81691 {
|
||||
0% {
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
to {
|
||||
transform: rotate(1turn);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
<view a:if="{{a}}" style="{{s}}" class="{{('u-loading-icon') + ' ' + 'data-v-2af81691' + ' ' + t}}"><view a:if="{{b}}" class="{{('u-loading-icon__spinner') + ' ' + 'data-v-2af81691' + ' ' + e}}" ref="ani" style="{{'color:' + f + ';' + ('width:' + g) + ';' + ('height:' + h) + ';' + ('border-top-color:' + i) + ';' + ('border-bottom-color:' + j) + ';' + ('border-left-color:' + k) + ';' + ('border-right-color:' + l) + ';' + ('animation-duration:' + m) + ';' + ('animation-timing-function:' + n)}}"><block a:if="{{c}}"><view a:for="{{d}}" a:for-item="item" a:key="a" class="u-loading-icon__dot data-v-2af81691"></view></block></view><text a:if="{{o}}" class="u-loading-icon__text data-v-2af81691" style="{{'font-size:' + q + ';' + ('color:' + r)}}">{{p}}</text></view>
|
||||
105
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-loading-icon/u-loading-icon.js
vendored
Normal file
105
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-loading-icon/u-loading-icon.js
vendored
Normal file
@@ -0,0 +1,105 @@
|
||||
"use strict";
|
||||
const uni_modules_uviewPlus_components_uLoadingIcon_props = require("./props.js");
|
||||
const uni_modules_uviewPlus_libs_mixin_mpMixin = require("../../libs/mixin/mpMixin.js");
|
||||
const uni_modules_uviewPlus_libs_mixin_mixin = require("../../libs/mixin/mixin.js");
|
||||
const uni_modules_uviewPlus_libs_function_index = require("../../libs/function/index.js");
|
||||
const uni_modules_uviewPlus_libs_function_colorGradient = require("../../libs/function/colorGradient.js");
|
||||
const common_vendor = require("../../../../common/vendor.js");
|
||||
const _sfc_main = {
|
||||
name: "u-loading-icon",
|
||||
mixins: [uni_modules_uviewPlus_libs_mixin_mpMixin.mpMixin, uni_modules_uviewPlus_libs_mixin_mixin.mixin, uni_modules_uviewPlus_components_uLoadingIcon_props.props],
|
||||
data() {
|
||||
return {
|
||||
// Array.form可以通过一个伪数组对象创建指定长度的数组
|
||||
// https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Array/from
|
||||
array12: Array.from({
|
||||
length: 12
|
||||
}),
|
||||
// 这里需要设置默认值为360,否则在安卓nvue上,会延迟一个duration周期后才执行
|
||||
// 在iOS nvue上,则会一开始默认执行两个周期的动画
|
||||
aniAngel: 360,
|
||||
// 动画旋转角度
|
||||
webviewHide: false,
|
||||
// 监听webview的状态,如果隐藏了页面,则停止动画,以免性能消耗
|
||||
loading: false
|
||||
// 是否运行中,针对nvue使用
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
// 当为circle类型时,给其另外三边设置一个更轻一些的颜色
|
||||
// 之所以需要这么做的原因是,比如父组件传了color为红色,那么需要另外的三个边为浅红色
|
||||
// 而不能是固定的某一个其他颜色(因为这个固定的颜色可能浅蓝,导致效果没有那么细腻良好)
|
||||
otherBorderColor() {
|
||||
const lightColor = uni_modules_uviewPlus_libs_function_colorGradient.colorGradient$1(this.color, "#ffffff", 100)[80];
|
||||
if (this.mode === "circle") {
|
||||
return this.inactiveColor ? this.inactiveColor : lightColor;
|
||||
} else {
|
||||
return "transparent";
|
||||
}
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
show(n) {
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.init();
|
||||
},
|
||||
methods: {
|
||||
addUnit: uni_modules_uviewPlus_libs_function_index.addUnit,
|
||||
addStyle: uni_modules_uviewPlus_libs_function_index.addStyle,
|
||||
init() {
|
||||
setTimeout(() => {
|
||||
}, 20);
|
||||
},
|
||||
// 监听webview的显示与隐藏
|
||||
addEventListenerToWebview() {
|
||||
const pages = getCurrentPages();
|
||||
const page = pages[pages.length - 1];
|
||||
const currentWebview = page.$getAppWebview();
|
||||
currentWebview.addEventListener("hide", () => {
|
||||
this.webviewHide = true;
|
||||
});
|
||||
currentWebview.addEventListener("show", () => {
|
||||
this.webviewHide = false;
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
return common_vendor.e({
|
||||
a: _ctx.show
|
||||
}, _ctx.show ? common_vendor.e({
|
||||
b: !$data.webviewHide
|
||||
}, !$data.webviewHide ? common_vendor.e({
|
||||
c: _ctx.mode === "spinner"
|
||||
}, _ctx.mode === "spinner" ? {
|
||||
d: common_vendor.f($data.array12, (item, index, i0) => {
|
||||
return {
|
||||
a: index
|
||||
};
|
||||
})
|
||||
} : {}, {
|
||||
e: common_vendor.n(`u-loading-icon__spinner--${_ctx.mode}`),
|
||||
f: _ctx.color,
|
||||
g: $options.addUnit(_ctx.size),
|
||||
h: $options.addUnit(_ctx.size),
|
||||
i: _ctx.color,
|
||||
j: $options.otherBorderColor,
|
||||
k: $options.otherBorderColor,
|
||||
l: $options.otherBorderColor,
|
||||
m: `${_ctx.duration}ms`,
|
||||
n: _ctx.mode === "semicircle" || _ctx.mode === "circle" ? _ctx.timingFunction : ""
|
||||
}) : {}, {
|
||||
o: _ctx.text
|
||||
}, _ctx.text ? {
|
||||
p: common_vendor.t(_ctx.text),
|
||||
q: $options.addUnit(_ctx.textSize),
|
||||
r: _ctx.textColor
|
||||
} : {}, {
|
||||
s: common_vendor.s($options.addStyle(_ctx.customStyle)),
|
||||
t: common_vendor.n(_ctx.vertical && "u-loading-icon--vertical")
|
||||
}) : {});
|
||||
}
|
||||
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-2af81691"]]);
|
||||
my.createComponent(Component);
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"component": true,
|
||||
"styleIsolation": "apply-shared",
|
||||
"usingComponents": {}
|
||||
}
|
||||
27
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-overlay/props.js
vendored
Normal file
27
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-overlay/props.js
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
"use strict";
|
||||
const uni_modules_uviewPlus_libs_config_props = require("../../libs/config/props.js");
|
||||
const props = {
|
||||
props: {
|
||||
// 是否显示遮罩
|
||||
show: {
|
||||
type: Boolean,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.overlay.show
|
||||
},
|
||||
// 层级z-index
|
||||
zIndex: {
|
||||
type: [String, Number],
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.overlay.zIndex
|
||||
},
|
||||
// 遮罩的过渡时间,单位为ms
|
||||
duration: {
|
||||
type: [String, Number],
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.overlay.duration
|
||||
},
|
||||
// 不透明度值,当做rgba的第四个参数
|
||||
opacity: {
|
||||
type: [String, Number],
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.overlay.opacity
|
||||
}
|
||||
}
|
||||
};
|
||||
exports.props = props;
|
||||
24
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-overlay/u-overlay.acss
vendored
Normal file
24
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-overlay/u-overlay.acss
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
.u-empty.data-v-9112bed9,
|
||||
.u-empty__wrap.data-v-9112bed9,
|
||||
.u-tabs.data-v-9112bed9,
|
||||
.u-tabs__wrapper.data-v-9112bed9,
|
||||
.u-tabs__wrapper__scroll-view-wrapper.data-v-9112bed9,
|
||||
.u-tabs__wrapper__scroll-view.data-v-9112bed9,
|
||||
.u-tabs__wrapper__nav.data-v-9112bed9,
|
||||
.u-tabs__wrapper__nav__line.data-v-9112bed9 {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
flex-shrink: 0;
|
||||
flex-grow: 0;
|
||||
flex-basis: auto;
|
||||
align-items: stretch;
|
||||
align-content: flex-start;
|
||||
}
|
||||
.u-overlay.data-v-9112bed9 {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-color: rgba(0, 0, 0, 0.7);
|
||||
}
|
||||
1
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-overlay/u-overlay.axml
vendored
Normal file
1
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-overlay/u-overlay.axml
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<u-transition class="data-v-9112bed9" u-s="{{['d']}}" onClick="{{a}}" u-i="9112bed9-0" onVI="__l" u-p="{{b}}"><slot/></u-transition>
|
||||
51
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-overlay/u-overlay.js
vendored
Normal file
51
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-overlay/u-overlay.js
vendored
Normal file
@@ -0,0 +1,51 @@
|
||||
"use strict";
|
||||
const uni_modules_uviewPlus_components_uOverlay_props = require("./props.js");
|
||||
const uni_modules_uviewPlus_libs_mixin_mpMixin = require("../../libs/mixin/mpMixin.js");
|
||||
const uni_modules_uviewPlus_libs_mixin_mixin = require("../../libs/mixin/mixin.js");
|
||||
const uni_modules_uviewPlus_libs_function_index = require("../../libs/function/index.js");
|
||||
const common_vendor = require("../../../../common/vendor.js");
|
||||
const _sfc_main = {
|
||||
name: "u-overlay",
|
||||
mixins: [uni_modules_uviewPlus_libs_mixin_mpMixin.mpMixin, uni_modules_uviewPlus_libs_mixin_mixin.mixin, uni_modules_uviewPlus_components_uOverlay_props.props],
|
||||
computed: {
|
||||
overlayStyle() {
|
||||
const style = {
|
||||
position: "fixed",
|
||||
top: 0,
|
||||
left: 0,
|
||||
right: 0,
|
||||
zIndex: this.zIndex,
|
||||
bottom: 0,
|
||||
"background-color": `rgba(0, 0, 0, ${this.opacity})`
|
||||
};
|
||||
return uni_modules_uviewPlus_libs_function_index.deepMerge(style, uni_modules_uviewPlus_libs_function_index.addStyle(this.customStyle));
|
||||
}
|
||||
},
|
||||
emits: ["click"],
|
||||
methods: {
|
||||
clickHandler() {
|
||||
this.$emit("click");
|
||||
}
|
||||
}
|
||||
};
|
||||
if (!Array) {
|
||||
const _easycom_u_transition2 = common_vendor.resolveComponent("u-transition");
|
||||
_easycom_u_transition2();
|
||||
}
|
||||
const _easycom_u_transition = () => "../u-transition/u-transition.js";
|
||||
if (!Math) {
|
||||
_easycom_u_transition();
|
||||
}
|
||||
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
return {
|
||||
a: common_vendor.o($options.clickHandler),
|
||||
b: common_vendor.p({
|
||||
show: _ctx.show,
|
||||
["custom-class"]: "u-overlay",
|
||||
duration: _ctx.duration,
|
||||
["custom-style"]: $options.overlayStyle
|
||||
})
|
||||
};
|
||||
}
|
||||
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-9112bed9"]]);
|
||||
my.createComponent(Component);
|
||||
7
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-overlay/u-overlay.json
vendored
Normal file
7
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-overlay/u-overlay.json
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"component": true,
|
||||
"styleIsolation": "apply-shared",
|
||||
"usingComponents": {
|
||||
"u-transition": "../u-transition/u-transition"
|
||||
}
|
||||
}
|
||||
87
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-picker/props.js
vendored
Normal file
87
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-picker/props.js
vendored
Normal file
@@ -0,0 +1,87 @@
|
||||
"use strict";
|
||||
const uni_modules_uviewPlus_libs_config_props = require("../../libs/config/props.js");
|
||||
const props = {
|
||||
props: {
|
||||
// 是否展示picker弹窗
|
||||
show: {
|
||||
type: Boolean,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.picker.show
|
||||
},
|
||||
// 弹出的方向,可选值为 top bottom right left center
|
||||
popupMode: {
|
||||
type: String,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.picker.popupMode
|
||||
},
|
||||
// 是否展示顶部的操作栏
|
||||
showToolbar: {
|
||||
type: Boolean,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.picker.showToolbar
|
||||
},
|
||||
// 顶部标题
|
||||
title: {
|
||||
type: String,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.picker.title
|
||||
},
|
||||
// 对象数组,设置每一列的数据
|
||||
columns: {
|
||||
type: Array,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.picker.columns
|
||||
},
|
||||
// 是否显示加载中状态
|
||||
loading: {
|
||||
type: Boolean,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.picker.loading
|
||||
},
|
||||
// 各列中,单个选项的高度
|
||||
itemHeight: {
|
||||
type: [String, Number],
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.picker.itemHeight
|
||||
},
|
||||
// 取消按钮的文字
|
||||
cancelText: {
|
||||
type: String,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.picker.cancelText
|
||||
},
|
||||
// 确认按钮的文字
|
||||
confirmText: {
|
||||
type: String,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.picker.confirmText
|
||||
},
|
||||
// 取消按钮的颜色
|
||||
cancelColor: {
|
||||
type: String,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.picker.cancelColor
|
||||
},
|
||||
// 确认按钮的颜色
|
||||
confirmColor: {
|
||||
type: String,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.picker.confirmColor
|
||||
},
|
||||
// 每列中可见选项的数量
|
||||
visibleItemCount: {
|
||||
type: [String, Number],
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.picker.visibleItemCount
|
||||
},
|
||||
// 选项对象中,需要展示的属性键名
|
||||
keyName: {
|
||||
type: String,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.picker.keyName
|
||||
},
|
||||
// 是否允许点击遮罩关闭选择器
|
||||
closeOnClickOverlay: {
|
||||
type: Boolean,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.picker.closeOnClickOverlay
|
||||
},
|
||||
// 各列的默认索引
|
||||
defaultIndex: {
|
||||
type: Array,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.picker.defaultIndex
|
||||
},
|
||||
// 是否在手指松开时立即触发 change 事件。若不开启则会在滚动动画结束后触发 change 事件,只在微信2.21.1及以上有效
|
||||
immediateChange: {
|
||||
type: Boolean,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.picker.immediateChange
|
||||
}
|
||||
}
|
||||
};
|
||||
exports.props = props;
|
||||
52
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-picker/u-picker.acss
vendored
Normal file
52
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-picker/u-picker.acss
vendored
Normal file
@@ -0,0 +1,52 @@
|
||||
.u-empty.data-v-91b05052,
|
||||
.u-empty__wrap.data-v-91b05052,
|
||||
.u-tabs.data-v-91b05052,
|
||||
.u-tabs__wrapper.data-v-91b05052,
|
||||
.u-tabs__wrapper__scroll-view-wrapper.data-v-91b05052,
|
||||
.u-tabs__wrapper__scroll-view.data-v-91b05052,
|
||||
.u-tabs__wrapper__nav.data-v-91b05052,
|
||||
.u-tabs__wrapper__nav__line.data-v-91b05052 {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
flex-shrink: 0;
|
||||
flex-grow: 0;
|
||||
flex-basis: auto;
|
||||
align-items: stretch;
|
||||
align-content: flex-start;
|
||||
}
|
||||
.u-picker.data-v-91b05052 {
|
||||
position: relative;
|
||||
}
|
||||
.u-picker__view__column.data-v-91b05052 {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
flex: 1;
|
||||
justify-content: center;
|
||||
}
|
||||
.u-picker__view__column__item.data-v-91b05052 {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
font-size: 16px;
|
||||
text-align: center;
|
||||
display: block;
|
||||
color: #303133;
|
||||
}
|
||||
.u-picker__view__column__item--disabled.data-v-91b05052 {
|
||||
cursor: not-allowed;
|
||||
opacity: 0.35;
|
||||
}
|
||||
.u-picker--loading.data-v-91b05052 {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
background-color: rgba(255, 255, 255, 0.87);
|
||||
z-index: 1000;
|
||||
}
|
||||
1
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-picker/u-picker.axml
vendored
Normal file
1
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-picker/u-picker.axml
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<u-popup class="data-v-91b05052" u-s="{{['d']}}" onClose="{{m}}" u-i="91b05052-0" onVI="__l" u-p="{{n}}"><view class="u-picker data-v-91b05052"><u-toolbar a:if="{{a}}" class="data-v-91b05052" onCancel="{{b}}" onConfirm="{{c}}" u-i="91b05052-1,91b05052-0" onVI="__l" u-p="{{d}}"></u-toolbar><picker-view class="u-picker__view data-v-91b05052" indicatorStyle="{{f}}" value="{{g}}" immediateChange="{{h}}" style="{{'height:' + i}}" onChange="{{j}}"><picker-view-column a:for="{{e}}" a:for-item="item" a:key="e" class="u-picker__view__column data-v-91b05052"><block a:if="{{item.a}}"><view a:for="{{item.b}}" a:for-item="item1" a:key="b" class="u-picker__view__column__item u-line-1 data-v-91b05052" style="{{'height:' + item.c + ';' + ('line-height:' + item.d) + ';' + ('font-weight:' + item1.c) + ';' + ('display:' + 'block')}}">{{item1.a}}</view></block></picker-view-column></picker-view><view a:if="{{k}}" class="u-picker--loading data-v-91b05052"><u-loading-icon class="data-v-91b05052" u-i="91b05052-2,91b05052-0" onVI="__l" u-p="{{l}}"></u-loading-icon></view></view></u-popup>
|
||||
211
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-picker/u-picker.js
vendored
Normal file
211
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-picker/u-picker.js
vendored
Normal file
@@ -0,0 +1,211 @@
|
||||
"use strict";
|
||||
const uni_modules_uviewPlus_components_uPicker_props = require("./props.js");
|
||||
const uni_modules_uviewPlus_libs_mixin_mpMixin = require("../../libs/mixin/mpMixin.js");
|
||||
const uni_modules_uviewPlus_libs_mixin_mixin = require("../../libs/mixin/mixin.js");
|
||||
const uni_modules_uviewPlus_libs_function_index = require("../../libs/function/index.js");
|
||||
const uni_modules_uviewPlus_libs_function_test = require("../../libs/function/test.js");
|
||||
const common_vendor = require("../../../../common/vendor.js");
|
||||
const _sfc_main = {
|
||||
name: "u-picker",
|
||||
mixins: [uni_modules_uviewPlus_libs_mixin_mpMixin.mpMixin, uni_modules_uviewPlus_libs_mixin_mixin.mixin, uni_modules_uviewPlus_components_uPicker_props.props],
|
||||
data() {
|
||||
return {
|
||||
// 上一次选择的列索引
|
||||
lastIndex: [],
|
||||
// 索引值 ,对应picker-view的value
|
||||
innerIndex: [],
|
||||
// 各列的值
|
||||
innerColumns: [],
|
||||
// 上一次的变化列索引
|
||||
columnIndex: 0
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
// 监听默认索引的变化,重新设置对应的值
|
||||
defaultIndex: {
|
||||
immediate: true,
|
||||
handler(n) {
|
||||
this.setIndexs(n, true);
|
||||
}
|
||||
},
|
||||
// 监听columns参数的变化
|
||||
columns: {
|
||||
immediate: true,
|
||||
deep: true,
|
||||
handler(n) {
|
||||
this.setColumns(n);
|
||||
}
|
||||
}
|
||||
},
|
||||
emits: ["close", "cancel", "confirm", "change"],
|
||||
methods: {
|
||||
addUnit: uni_modules_uviewPlus_libs_function_index.addUnit,
|
||||
testArray: uni_modules_uviewPlus_libs_function_test.test.array,
|
||||
// 获取item需要显示的文字,判别为对象还是文本
|
||||
getItemText(item) {
|
||||
if (uni_modules_uviewPlus_libs_function_test.test.object(item)) {
|
||||
return item[this.keyName];
|
||||
} else {
|
||||
return item;
|
||||
}
|
||||
},
|
||||
// 关闭选择器
|
||||
closeHandler() {
|
||||
if (this.closeOnClickOverlay) {
|
||||
this.$emit("close");
|
||||
}
|
||||
},
|
||||
// 点击工具栏的取消按钮
|
||||
cancel() {
|
||||
this.$emit("cancel");
|
||||
},
|
||||
// 点击工具栏的确定按钮
|
||||
confirm() {
|
||||
this.$emit("confirm", {
|
||||
indexs: this.innerIndex,
|
||||
value: this.innerColumns.map((item, index) => item[this.innerIndex[index]]),
|
||||
values: this.innerColumns
|
||||
});
|
||||
},
|
||||
// 选择器某一列的数据发生变化时触发
|
||||
changeHandler(e) {
|
||||
const {
|
||||
value
|
||||
} = e.detail;
|
||||
let index = 0, columnIndex = 0;
|
||||
for (let i = 0; i < value.length; i++) {
|
||||
let item = value[i];
|
||||
if (item !== (this.lastIndex[i] || 0)) {
|
||||
columnIndex = i;
|
||||
index = item;
|
||||
break;
|
||||
}
|
||||
}
|
||||
this.columnIndex = columnIndex;
|
||||
const values = this.innerColumns;
|
||||
this.setLastIndex(value);
|
||||
this.setIndexs(value);
|
||||
this.$emit("change", {
|
||||
// 微信小程序不能传递this,会因为循环引用而报错
|
||||
// picker: this,
|
||||
value: this.innerColumns.map((item, index2) => item[value[index2]]),
|
||||
index,
|
||||
indexs: value,
|
||||
// values为当前变化列的数组内容
|
||||
values,
|
||||
columnIndex
|
||||
});
|
||||
},
|
||||
// 设置index索引,此方法可被外部调用设置
|
||||
setIndexs(index, setLastIndex) {
|
||||
this.innerIndex = uni_modules_uviewPlus_libs_function_index.deepClone(index);
|
||||
if (setLastIndex) {
|
||||
this.setLastIndex(index);
|
||||
}
|
||||
},
|
||||
// 记录上一次的各列索引位置
|
||||
setLastIndex(index) {
|
||||
this.lastIndex = uni_modules_uviewPlus_libs_function_index.deepClone(index);
|
||||
},
|
||||
// 设置对应列选项的所有值
|
||||
setColumnValues(columnIndex, values) {
|
||||
this.innerColumns.splice(columnIndex, 1, values);
|
||||
this.setLastIndex(this.innerIndex.slice(0, columnIndex));
|
||||
let tmpIndex = uni_modules_uviewPlus_libs_function_index.deepClone(this.innerIndex);
|
||||
for (let i = 0; i < this.innerColumns.length; i++) {
|
||||
if (i > this.columnIndex) {
|
||||
tmpIndex[i] = 0;
|
||||
}
|
||||
}
|
||||
this.setIndexs(tmpIndex);
|
||||
},
|
||||
// 获取对应列的所有选项
|
||||
getColumnValues(columnIndex) {
|
||||
(async () => {
|
||||
await uni_modules_uviewPlus_libs_function_index.sleep();
|
||||
})();
|
||||
return this.innerColumns[columnIndex];
|
||||
},
|
||||
// 设置整体各列的columns的值
|
||||
setColumns(columns) {
|
||||
this.innerColumns = uni_modules_uviewPlus_libs_function_index.deepClone(columns);
|
||||
if (this.innerIndex.length === 0) {
|
||||
this.innerIndex = new Array(columns.length).fill(0);
|
||||
}
|
||||
},
|
||||
// 获取各列选中值对应的索引
|
||||
getIndexs() {
|
||||
return this.innerIndex;
|
||||
},
|
||||
// 获取各列选中的值
|
||||
getValues() {
|
||||
(async () => {
|
||||
await uni_modules_uviewPlus_libs_function_index.sleep();
|
||||
})();
|
||||
return this.innerColumns.map((item, index) => item[this.innerIndex[index]]);
|
||||
}
|
||||
}
|
||||
};
|
||||
if (!Array) {
|
||||
const _easycom_u_toolbar2 = common_vendor.resolveComponent("u-toolbar");
|
||||
const _easycom_u_loading_icon2 = common_vendor.resolveComponent("u-loading-icon");
|
||||
const _easycom_u_popup2 = common_vendor.resolveComponent("u-popup");
|
||||
(_easycom_u_toolbar2 + _easycom_u_loading_icon2 + _easycom_u_popup2)();
|
||||
}
|
||||
const _easycom_u_toolbar = () => "../u-toolbar/u-toolbar.js";
|
||||
const _easycom_u_loading_icon = () => "../u-loading-icon/u-loading-icon.js";
|
||||
const _easycom_u_popup = () => "../u-popup/u-popup.js";
|
||||
if (!Math) {
|
||||
(_easycom_u_toolbar + _easycom_u_loading_icon + _easycom_u_popup)();
|
||||
}
|
||||
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
return common_vendor.e({
|
||||
a: _ctx.showToolbar
|
||||
}, _ctx.showToolbar ? {
|
||||
b: common_vendor.o($options.cancel),
|
||||
c: common_vendor.o($options.confirm),
|
||||
d: common_vendor.p({
|
||||
cancelColor: _ctx.cancelColor,
|
||||
confirmColor: _ctx.confirmColor,
|
||||
cancelText: _ctx.cancelText,
|
||||
confirmText: _ctx.confirmText,
|
||||
title: _ctx.title
|
||||
})
|
||||
} : {}, {
|
||||
e: common_vendor.f($data.innerColumns, (item, index, i0) => {
|
||||
return common_vendor.e({
|
||||
a: $options.testArray(item)
|
||||
}, $options.testArray(item) ? {
|
||||
b: common_vendor.f(item, (item1, index1, i1) => {
|
||||
return {
|
||||
a: common_vendor.t($options.getItemText(item1)),
|
||||
b: index1,
|
||||
c: index1 === $data.innerIndex[index] ? "bold" : "normal"
|
||||
};
|
||||
}),
|
||||
c: $options.addUnit(_ctx.itemHeight),
|
||||
d: $options.addUnit(_ctx.itemHeight)
|
||||
} : {}, {
|
||||
e: index
|
||||
});
|
||||
}),
|
||||
f: `height: ${$options.addUnit(_ctx.itemHeight)}`,
|
||||
g: $data.innerIndex,
|
||||
h: _ctx.immediateChange,
|
||||
i: `${$options.addUnit(_ctx.visibleItemCount * _ctx.itemHeight)}`,
|
||||
j: common_vendor.o((...args) => $options.changeHandler && $options.changeHandler(...args)),
|
||||
k: _ctx.loading
|
||||
}, _ctx.loading ? {
|
||||
l: common_vendor.p({
|
||||
mode: "circle"
|
||||
})
|
||||
} : {}, {
|
||||
m: common_vendor.o($options.closeHandler),
|
||||
n: common_vendor.p({
|
||||
show: _ctx.show,
|
||||
mode: _ctx.popupMode
|
||||
})
|
||||
});
|
||||
}
|
||||
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-91b05052"]]);
|
||||
my.createComponent(Component);
|
||||
9
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-picker/u-picker.json
vendored
Normal file
9
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-picker/u-picker.json
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"component": true,
|
||||
"styleIsolation": "apply-shared",
|
||||
"usingComponents": {
|
||||
"u-toolbar": "../u-toolbar/u-toolbar",
|
||||
"u-loading-icon": "../u-loading-icon/u-loading-icon",
|
||||
"u-popup": "../u-popup/u-popup"
|
||||
}
|
||||
}
|
||||
82
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-popup/props.js
vendored
Normal file
82
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-popup/props.js
vendored
Normal file
@@ -0,0 +1,82 @@
|
||||
"use strict";
|
||||
const uni_modules_uviewPlus_libs_config_props = require("../../libs/config/props.js");
|
||||
const props = {
|
||||
props: {
|
||||
// 是否展示弹窗
|
||||
show: {
|
||||
type: Boolean,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.popup.show
|
||||
},
|
||||
// 是否显示遮罩
|
||||
overlay: {
|
||||
type: Boolean,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.popup.overlay
|
||||
},
|
||||
// 弹出的方向,可选值为 top bottom right left center
|
||||
mode: {
|
||||
type: String,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.popup.mode
|
||||
},
|
||||
// 动画时长,单位ms
|
||||
duration: {
|
||||
type: [String, Number],
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.popup.duration
|
||||
},
|
||||
// 是否显示关闭图标
|
||||
closeable: {
|
||||
type: Boolean,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.popup.closeable
|
||||
},
|
||||
// 自定义遮罩的样式
|
||||
overlayStyle: {
|
||||
type: [Object, String],
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.popup.overlayStyle
|
||||
},
|
||||
// 点击遮罩是否关闭弹窗
|
||||
closeOnClickOverlay: {
|
||||
type: Boolean,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.popup.closeOnClickOverlay
|
||||
},
|
||||
// 层级
|
||||
zIndex: {
|
||||
type: [String, Number],
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.popup.zIndex
|
||||
},
|
||||
// 是否为iPhoneX留出底部安全距离
|
||||
safeAreaInsetBottom: {
|
||||
type: Boolean,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.popup.safeAreaInsetBottom
|
||||
},
|
||||
// 是否留出顶部安全距离(状态栏高度)
|
||||
safeAreaInsetTop: {
|
||||
type: Boolean,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.popup.safeAreaInsetTop
|
||||
},
|
||||
// 自定义关闭图标位置,top-left为左上角,top-right为右上角,bottom-left为左下角,bottom-right为右下角
|
||||
closeIconPos: {
|
||||
type: String,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.popup.closeIconPos
|
||||
},
|
||||
// 是否显示圆角
|
||||
round: {
|
||||
type: [Boolean, String, Number],
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.popup.round
|
||||
},
|
||||
// mode=center,也即中部弹出时,是否使用缩放模式
|
||||
zoom: {
|
||||
type: Boolean,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.popup.zoom
|
||||
},
|
||||
// 弹窗背景色,设置为transparent可去除白色背景
|
||||
bgColor: {
|
||||
type: String,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.popup.bgColor
|
||||
},
|
||||
// 遮罩的透明度,0-1之间
|
||||
overlayOpacity: {
|
||||
type: [Number, String],
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.popup.overlayOpacity
|
||||
}
|
||||
}
|
||||
};
|
||||
exports.props = props;
|
||||
75
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-popup/u-popup.acss
vendored
Normal file
75
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-popup/u-popup.acss
vendored
Normal file
@@ -0,0 +1,75 @@
|
||||
.u-empty.data-v-05c24e9b,
|
||||
.u-empty__wrap.data-v-05c24e9b,
|
||||
.u-tabs.data-v-05c24e9b,
|
||||
.u-tabs__wrapper.data-v-05c24e9b,
|
||||
.u-tabs__wrapper__scroll-view-wrapper.data-v-05c24e9b,
|
||||
.u-tabs__wrapper__scroll-view.data-v-05c24e9b,
|
||||
.u-tabs__wrapper__nav.data-v-05c24e9b,
|
||||
.u-tabs__wrapper__nav__line.data-v-05c24e9b {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
flex-shrink: 0;
|
||||
flex-grow: 0;
|
||||
flex-basis: auto;
|
||||
align-items: stretch;
|
||||
align-content: flex-start;
|
||||
}
|
||||
.u-popup.data-v-05c24e9b {
|
||||
flex: 1;
|
||||
}
|
||||
.u-popup__content.data-v-05c24e9b {
|
||||
background-color: #fff;
|
||||
position: relative;
|
||||
}
|
||||
.u-popup__content--round-top.data-v-05c24e9b {
|
||||
border-top-left-radius: 0;
|
||||
border-top-right-radius: 0;
|
||||
border-bottom-left-radius: 10px;
|
||||
border-bottom-right-radius: 10px;
|
||||
}
|
||||
.u-popup__content--round-left.data-v-05c24e9b {
|
||||
border-top-left-radius: 0;
|
||||
border-top-right-radius: 10px;
|
||||
border-bottom-left-radius: 0;
|
||||
border-bottom-right-radius: 10px;
|
||||
}
|
||||
.u-popup__content--round-right.data-v-05c24e9b {
|
||||
border-top-left-radius: 10px;
|
||||
border-top-right-radius: 0;
|
||||
border-bottom-left-radius: 10px;
|
||||
border-bottom-right-radius: 0;
|
||||
}
|
||||
.u-popup__content--round-bottom.data-v-05c24e9b {
|
||||
border-top-left-radius: 10px;
|
||||
border-top-right-radius: 10px;
|
||||
border-bottom-left-radius: 0;
|
||||
border-bottom-right-radius: 0;
|
||||
}
|
||||
.u-popup__content--round-center.data-v-05c24e9b {
|
||||
border-top-left-radius: 10px;
|
||||
border-top-right-radius: 10px;
|
||||
border-bottom-left-radius: 10px;
|
||||
border-bottom-right-radius: 10px;
|
||||
}
|
||||
.u-popup__content__close.data-v-05c24e9b {
|
||||
position: absolute;
|
||||
}
|
||||
.u-popup__content__close--hover.data-v-05c24e9b {
|
||||
opacity: 0.4;
|
||||
}
|
||||
.u-popup__content__close--top-left.data-v-05c24e9b {
|
||||
top: 15px;
|
||||
left: 15px;
|
||||
}
|
||||
.u-popup__content__close--top-right.data-v-05c24e9b {
|
||||
top: 15px;
|
||||
right: 15px;
|
||||
}
|
||||
.u-popup__content__close--bottom-left.data-v-05c24e9b {
|
||||
bottom: 15px;
|
||||
left: 15px;
|
||||
}
|
||||
.u-popup__content__close--bottom-right.data-v-05c24e9b {
|
||||
right: 15px;
|
||||
bottom: 15px;
|
||||
}
|
||||
1
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-popup/u-popup.axml
vendored
Normal file
1
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-popup/u-popup.axml
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<view class="u-popup data-v-05c24e9b"><u-overlay a:if="{{a}}" class="data-v-05c24e9b" onClick="{{b}}" u-i="05c24e9b-0" onVI="__l" u-p="{{c}}"></u-overlay><u-transition class="data-v-05c24e9b" u-s="{{['d']}}" onAfterEnter="{{l}}" onClick="{{m}}" u-i="05c24e9b-1" onVI="__l" u-p="{{n}}"><view class="u-popup__content data-v-05c24e9b" style="{{j}}" catchTap="{{k}}"><u-status-bar a:if="{{d}}" class="data-v-05c24e9b" u-i="05c24e9b-2,05c24e9b-1" onVI="__l"></u-status-bar><slot></slot><view a:if="{{e}}" catchTap="{{g}}" class="{{('u-popup__content__close') + ' ' + 'data-v-05c24e9b' + ' ' + h}}" hover-class="u-popup__content__close--hover" hover-stay-time="150"><u-icon class="data-v-05c24e9b" u-i="05c24e9b-3,05c24e9b-1" onVI="__l" u-p="{{f}}"></u-icon></view><u-safe-bottom a:if="{{i}}" class="data-v-05c24e9b" u-i="05c24e9b-4,05c24e9b-1" onVI="__l"></u-safe-bottom></view></u-transition></view>
|
||||
178
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-popup/u-popup.js
vendored
Normal file
178
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-popup/u-popup.js
vendored
Normal file
@@ -0,0 +1,178 @@
|
||||
"use strict";
|
||||
const uni_modules_uviewPlus_components_uPopup_props = require("./props.js");
|
||||
const uni_modules_uviewPlus_libs_mixin_mpMixin = require("../../libs/mixin/mpMixin.js");
|
||||
const uni_modules_uviewPlus_libs_mixin_mixin = require("../../libs/mixin/mixin.js");
|
||||
const uni_modules_uviewPlus_libs_function_index = require("../../libs/function/index.js");
|
||||
const common_vendor = require("../../../../common/vendor.js");
|
||||
const _sfc_main = {
|
||||
name: "u-popup",
|
||||
mixins: [uni_modules_uviewPlus_libs_mixin_mpMixin.mpMixin, uni_modules_uviewPlus_libs_mixin_mixin.mixin, uni_modules_uviewPlus_components_uPopup_props.props],
|
||||
data() {
|
||||
return {
|
||||
overlayDuration: this.duration + 50
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
show(newValue, oldValue) {
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
transitionStyle() {
|
||||
const style = {
|
||||
zIndex: this.zIndex,
|
||||
position: "fixed",
|
||||
display: "flex"
|
||||
};
|
||||
style[this.mode] = 0;
|
||||
if (this.mode === "left") {
|
||||
return uni_modules_uviewPlus_libs_function_index.deepMerge(style, {
|
||||
bottom: 0,
|
||||
top: 0
|
||||
});
|
||||
} else if (this.mode === "right") {
|
||||
return uni_modules_uviewPlus_libs_function_index.deepMerge(style, {
|
||||
bottom: 0,
|
||||
top: 0
|
||||
});
|
||||
} else if (this.mode === "top") {
|
||||
return uni_modules_uviewPlus_libs_function_index.deepMerge(style, {
|
||||
left: 0,
|
||||
right: 0
|
||||
});
|
||||
} else if (this.mode === "bottom") {
|
||||
return uni_modules_uviewPlus_libs_function_index.deepMerge(style, {
|
||||
left: 0,
|
||||
right: 0
|
||||
});
|
||||
} else if (this.mode === "center") {
|
||||
return uni_modules_uviewPlus_libs_function_index.deepMerge(style, {
|
||||
alignItems: "center",
|
||||
"justify-content": "center",
|
||||
top: 0,
|
||||
left: 0,
|
||||
right: 0,
|
||||
bottom: 0
|
||||
});
|
||||
}
|
||||
},
|
||||
contentStyle() {
|
||||
const style = {};
|
||||
uni_modules_uviewPlus_libs_function_index.sys();
|
||||
if (this.mode !== "center") {
|
||||
style.flex = 1;
|
||||
}
|
||||
if (this.bgColor) {
|
||||
style.backgroundColor = this.bgColor;
|
||||
}
|
||||
if (this.round) {
|
||||
const value = uni_modules_uviewPlus_libs_function_index.addUnit(this.round);
|
||||
if (this.mode === "top") {
|
||||
style.borderBottomLeftRadius = value;
|
||||
style.borderBottomRightRadius = value;
|
||||
} else if (this.mode === "bottom") {
|
||||
style.borderTopLeftRadius = value;
|
||||
style.borderTopRightRadius = value;
|
||||
} else if (this.mode === "center") {
|
||||
style.borderRadius = value;
|
||||
}
|
||||
}
|
||||
return uni_modules_uviewPlus_libs_function_index.deepMerge(style, uni_modules_uviewPlus_libs_function_index.addStyle(this.customStyle));
|
||||
},
|
||||
position() {
|
||||
if (this.mode === "center") {
|
||||
return this.zoom ? "fade-zoom" : "fade";
|
||||
}
|
||||
if (this.mode === "left") {
|
||||
return "slide-left";
|
||||
}
|
||||
if (this.mode === "right") {
|
||||
return "slide-right";
|
||||
}
|
||||
if (this.mode === "bottom") {
|
||||
return "slide-up";
|
||||
}
|
||||
if (this.mode === "top") {
|
||||
return "slide-down";
|
||||
}
|
||||
}
|
||||
},
|
||||
emits: ["open", "close", "click"],
|
||||
methods: {
|
||||
// 点击遮罩
|
||||
overlayClick() {
|
||||
if (this.closeOnClickOverlay) {
|
||||
this.$emit("close");
|
||||
}
|
||||
},
|
||||
close(e) {
|
||||
this.$emit("close");
|
||||
},
|
||||
afterEnter() {
|
||||
this.$emit("open");
|
||||
},
|
||||
clickHandler() {
|
||||
if (this.mode === "center") {
|
||||
this.overlayClick();
|
||||
}
|
||||
this.$emit("click");
|
||||
}
|
||||
}
|
||||
};
|
||||
if (!Array) {
|
||||
const _easycom_u_overlay2 = common_vendor.resolveComponent("u-overlay");
|
||||
const _easycom_u_status_bar2 = common_vendor.resolveComponent("u-status-bar");
|
||||
const _easycom_u_icon2 = common_vendor.resolveComponent("u-icon");
|
||||
const _easycom_u_safe_bottom2 = common_vendor.resolveComponent("u-safe-bottom");
|
||||
const _easycom_u_transition2 = common_vendor.resolveComponent("u-transition");
|
||||
(_easycom_u_overlay2 + _easycom_u_status_bar2 + _easycom_u_icon2 + _easycom_u_safe_bottom2 + _easycom_u_transition2)();
|
||||
}
|
||||
const _easycom_u_overlay = () => "../u-overlay/u-overlay.js";
|
||||
const _easycom_u_status_bar = () => "../u-status-bar/u-status-bar.js";
|
||||
const _easycom_u_icon = () => "../u-icon/u-icon.js";
|
||||
const _easycom_u_safe_bottom = () => "../u-safe-bottom/u-safe-bottom.js";
|
||||
const _easycom_u_transition = () => "../u-transition/u-transition.js";
|
||||
if (!Math) {
|
||||
(_easycom_u_overlay + _easycom_u_status_bar + _easycom_u_icon + _easycom_u_safe_bottom + _easycom_u_transition)();
|
||||
}
|
||||
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
return common_vendor.e({
|
||||
a: _ctx.overlay
|
||||
}, _ctx.overlay ? {
|
||||
b: common_vendor.o($options.overlayClick),
|
||||
c: common_vendor.p({
|
||||
show: _ctx.show,
|
||||
zIndex: _ctx.zIndex,
|
||||
duration: $data.overlayDuration,
|
||||
customStyle: _ctx.overlayStyle,
|
||||
opacity: _ctx.overlayOpacity
|
||||
})
|
||||
} : {}, {
|
||||
d: _ctx.safeAreaInsetTop
|
||||
}, _ctx.safeAreaInsetTop ? {} : {}, {
|
||||
e: _ctx.closeable
|
||||
}, _ctx.closeable ? {
|
||||
f: common_vendor.p({
|
||||
name: "close",
|
||||
color: "#909399",
|
||||
size: "18",
|
||||
bold: true
|
||||
}),
|
||||
g: common_vendor.o((...args) => $options.close && $options.close(...args)),
|
||||
h: common_vendor.n("u-popup__content__close--" + _ctx.closeIconPos)
|
||||
} : {}, {
|
||||
i: _ctx.safeAreaInsetBottom
|
||||
}, _ctx.safeAreaInsetBottom ? {} : {}, {
|
||||
j: common_vendor.s($options.contentStyle),
|
||||
k: common_vendor.o((...args) => _ctx.noop && _ctx.noop(...args)),
|
||||
l: common_vendor.o($options.afterEnter),
|
||||
m: common_vendor.o($options.clickHandler),
|
||||
n: common_vendor.p({
|
||||
show: _ctx.show,
|
||||
customStyle: $options.transitionStyle,
|
||||
mode: $options.position,
|
||||
duration: _ctx.duration
|
||||
})
|
||||
});
|
||||
}
|
||||
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-05c24e9b"]]);
|
||||
my.createComponent(Component);
|
||||
11
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-popup/u-popup.json
vendored
Normal file
11
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-popup/u-popup.json
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"component": true,
|
||||
"styleIsolation": "apply-shared",
|
||||
"usingComponents": {
|
||||
"u-overlay": "../u-overlay/u-overlay",
|
||||
"u-status-bar": "../u-status-bar/u-status-bar",
|
||||
"u-icon": "../u-icon/u-icon",
|
||||
"u-safe-bottom": "../u-safe-bottom/u-safe-bottom",
|
||||
"u-transition": "../u-transition/u-transition"
|
||||
}
|
||||
}
|
||||
5
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-safe-bottom/props.js
vendored
Normal file
5
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-safe-bottom/props.js
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
"use strict";
|
||||
const props = {
|
||||
props: {}
|
||||
};
|
||||
exports.props = props;
|
||||
@@ -0,0 +1,3 @@
|
||||
.u-safe-bottom.data-v-f3d22cfe {
|
||||
width: 100%;
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
<view style="{{a}}" class="{{('u-safe-bottom') + ' ' + 'data-v-f3d22cfe' + ' ' + b}}"></view>
|
||||
32
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-safe-bottom/u-safe-bottom.js
vendored
Normal file
32
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-safe-bottom/u-safe-bottom.js
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
"use strict";
|
||||
const uni_modules_uviewPlus_components_uSafeBottom_props = require("./props.js");
|
||||
const uni_modules_uviewPlus_libs_mixin_mpMixin = require("../../libs/mixin/mpMixin.js");
|
||||
const uni_modules_uviewPlus_libs_mixin_mixin = require("../../libs/mixin/mixin.js");
|
||||
const uni_modules_uviewPlus_libs_function_index = require("../../libs/function/index.js");
|
||||
const common_vendor = require("../../../../common/vendor.js");
|
||||
const _sfc_main = {
|
||||
name: "u-safe-bottom",
|
||||
mixins: [uni_modules_uviewPlus_libs_mixin_mpMixin.mpMixin, uni_modules_uviewPlus_libs_mixin_mixin.mixin, uni_modules_uviewPlus_components_uSafeBottom_props.props],
|
||||
data() {
|
||||
return {
|
||||
safeAreaBottomHeight: 0,
|
||||
isNvue: false
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
style() {
|
||||
const style = {};
|
||||
return uni_modules_uviewPlus_libs_function_index.deepMerge(style, uni_modules_uviewPlus_libs_function_index.addStyle(this.customStyle));
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
}
|
||||
};
|
||||
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
return {
|
||||
a: common_vendor.s($options.style),
|
||||
b: common_vendor.n(!$data.isNvue && "u-safe-area-inset-bottom")
|
||||
};
|
||||
}
|
||||
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-f3d22cfe"]]);
|
||||
my.createComponent(Component);
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"component": true,
|
||||
"styleIsolation": "apply-shared",
|
||||
"usingComponents": {}
|
||||
}
|
||||
11
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-status-bar/props.js
vendored
Normal file
11
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-status-bar/props.js
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
"use strict";
|
||||
const uni_modules_uviewPlus_libs_config_props = require("../../libs/config/props.js");
|
||||
const props = {
|
||||
props: {
|
||||
bgColor: {
|
||||
type: String,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.statusBar.bgColor
|
||||
}
|
||||
}
|
||||
};
|
||||
exports.props = props;
|
||||
@@ -0,0 +1,3 @@
|
||||
.u-status-bar.data-v-eb8e0cdd {
|
||||
width: 100%;
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
<view style="{{a}}" class="u-status-bar data-v-eb8e0cdd"><slot/></view>
|
||||
28
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-status-bar/u-status-bar.js
vendored
Normal file
28
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-status-bar/u-status-bar.js
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
"use strict";
|
||||
const uni_modules_uviewPlus_components_uStatusBar_props = require("./props.js");
|
||||
const uni_modules_uviewPlus_libs_mixin_mpMixin = require("../../libs/mixin/mpMixin.js");
|
||||
const uni_modules_uviewPlus_libs_mixin_mixin = require("../../libs/mixin/mixin.js");
|
||||
const uni_modules_uviewPlus_libs_function_index = require("../../libs/function/index.js");
|
||||
const common_vendor = require("../../../../common/vendor.js");
|
||||
const _sfc_main = {
|
||||
name: "u-status-bar",
|
||||
mixins: [uni_modules_uviewPlus_libs_mixin_mpMixin.mpMixin, uni_modules_uviewPlus_libs_mixin_mixin.mixin, uni_modules_uviewPlus_components_uStatusBar_props.props],
|
||||
data() {
|
||||
return {};
|
||||
},
|
||||
computed: {
|
||||
style() {
|
||||
const style = {};
|
||||
style.height = uni_modules_uviewPlus_libs_function_index.addUnit(uni_modules_uviewPlus_libs_function_index.sys().statusBarHeight, "px");
|
||||
style.backgroundColor = this.bgColor;
|
||||
return uni_modules_uviewPlus_libs_function_index.deepMerge(style, uni_modules_uviewPlus_libs_function_index.addStyle(this.customStyle));
|
||||
}
|
||||
}
|
||||
};
|
||||
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
return {
|
||||
a: common_vendor.s($options.style)
|
||||
};
|
||||
}
|
||||
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-eb8e0cdd"]]);
|
||||
my.createComponent(Component);
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"component": true,
|
||||
"styleIsolation": "apply-shared",
|
||||
"usingComponents": {}
|
||||
}
|
||||
32
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-swiper-indicator/props.js
vendored
Normal file
32
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-swiper-indicator/props.js
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
"use strict";
|
||||
const uni_modules_uviewPlus_libs_config_props = require("../../libs/config/props.js");
|
||||
const props = {
|
||||
props: {
|
||||
// 轮播的长度
|
||||
length: {
|
||||
type: [String, Number],
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.swiperIndicator.length
|
||||
},
|
||||
// 当前处于活动状态的轮播的索引
|
||||
current: {
|
||||
type: [String, Number],
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.swiperIndicator.current
|
||||
},
|
||||
// 指示器非激活颜色
|
||||
indicatorActiveColor: {
|
||||
type: String,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.swiperIndicator.indicatorActiveColor
|
||||
},
|
||||
// 指示器的激活颜色
|
||||
indicatorInactiveColor: {
|
||||
type: String,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.swiperIndicator.indicatorInactiveColor
|
||||
},
|
||||
// 指示器模式,line-线型,dot-点型
|
||||
indicatorMode: {
|
||||
type: String,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.swiperIndicator.indicatorMode
|
||||
}
|
||||
}
|
||||
};
|
||||
exports.props = props;
|
||||
@@ -0,0 +1,40 @@
|
||||
.u-empty.data-v-7b7c7ea6,
|
||||
.u-empty__wrap.data-v-7b7c7ea6,
|
||||
.u-tabs.data-v-7b7c7ea6,
|
||||
.u-tabs__wrapper.data-v-7b7c7ea6,
|
||||
.u-tabs__wrapper__scroll-view-wrapper.data-v-7b7c7ea6,
|
||||
.u-tabs__wrapper__scroll-view.data-v-7b7c7ea6,
|
||||
.u-tabs__wrapper__nav.data-v-7b7c7ea6,
|
||||
.u-tabs__wrapper__nav__line.data-v-7b7c7ea6 {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
flex-shrink: 0;
|
||||
flex-grow: 0;
|
||||
flex-basis: auto;
|
||||
align-items: stretch;
|
||||
align-content: flex-start;
|
||||
}
|
||||
.u-swiper-indicator__wrapper.data-v-7b7c7ea6 {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
}
|
||||
.u-swiper-indicator__wrapper--line.data-v-7b7c7ea6 {
|
||||
border-radius: 100px;
|
||||
height: 4px;
|
||||
}
|
||||
.u-swiper-indicator__wrapper--line__bar.data-v-7b7c7ea6 {
|
||||
width: 22px;
|
||||
height: 4px;
|
||||
border-radius: 100px;
|
||||
background-color: #FFFFFF;
|
||||
transition: transform 0.3s;
|
||||
}
|
||||
.u-swiper-indicator__wrapper__dot.data-v-7b7c7ea6 {
|
||||
width: 5px;
|
||||
height: 5px;
|
||||
border-radius: 100px;
|
||||
margin: 0 4px;
|
||||
}
|
||||
.u-swiper-indicator__wrapper__dot--active.data-v-7b7c7ea6 {
|
||||
width: 12px;
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
<view class="u-swiper-indicator data-v-7b7c7ea6"><view a:if="{{a}}" class="{{('u-swiper-indicator__wrapper') + ' ' + 'data-v-7b7c7ea6' + ' ' + c}}" style="{{'width:' + d + ';' + ('background-color:' + e)}}"><view class="u-swiper-indicator__wrapper--line__bar data-v-7b7c7ea6" style="{{b}}"></view></view><view a:if="{{f}}" class="u-swiper-indicator__wrapper data-v-7b7c7ea6"><view a:for="{{g}}" a:for-item="item" a:key="a" class="{{('u-swiper-indicator__wrapper__dot') + ' ' + 'data-v-7b7c7ea6' + ' ' + item.b}}" style="{{item.c}}"></view></view></view>
|
||||
@@ -0,0 +1,58 @@
|
||||
"use strict";
|
||||
const uni_modules_uviewPlus_components_uSwiperIndicator_props = require("./props.js");
|
||||
const uni_modules_uviewPlus_libs_mixin_mpMixin = require("../../libs/mixin/mpMixin.js");
|
||||
const uni_modules_uviewPlus_libs_mixin_mixin = require("../../libs/mixin/mixin.js");
|
||||
const uni_modules_uviewPlus_libs_function_index = require("../../libs/function/index.js");
|
||||
const common_vendor = require("../../../../common/vendor.js");
|
||||
const _sfc_main = {
|
||||
name: "u-swiper-indicator",
|
||||
mixins: [uni_modules_uviewPlus_libs_mixin_mpMixin.mpMixin, uni_modules_uviewPlus_libs_mixin_mixin.mixin, uni_modules_uviewPlus_components_uSwiperIndicator_props.props],
|
||||
data() {
|
||||
return {
|
||||
lineWidth: 22
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
// 指示器为线型的样式
|
||||
lineStyle() {
|
||||
let style = {};
|
||||
style.width = uni_modules_uviewPlus_libs_function_index.addUnit(this.lineWidth);
|
||||
style.transform = `translateX(${uni_modules_uviewPlus_libs_function_index.addUnit(this.current * this.lineWidth)})`;
|
||||
style.backgroundColor = this.indicatorActiveColor;
|
||||
return style;
|
||||
},
|
||||
// 指示器为点型的样式
|
||||
dotStyle() {
|
||||
return (index) => {
|
||||
let style = {};
|
||||
style.backgroundColor = index === this.current ? this.indicatorActiveColor : this.indicatorInactiveColor;
|
||||
return style;
|
||||
};
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
addUnit: uni_modules_uviewPlus_libs_function_index.addUnit
|
||||
}
|
||||
};
|
||||
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
return common_vendor.e({
|
||||
a: _ctx.indicatorMode === "line"
|
||||
}, _ctx.indicatorMode === "line" ? {
|
||||
b: common_vendor.s($options.lineStyle),
|
||||
c: common_vendor.n(`u-swiper-indicator__wrapper--${_ctx.indicatorMode}`),
|
||||
d: $options.addUnit($data.lineWidth * _ctx.length),
|
||||
e: _ctx.indicatorInactiveColor
|
||||
} : {}, {
|
||||
f: _ctx.indicatorMode === "dot"
|
||||
}, _ctx.indicatorMode === "dot" ? {
|
||||
g: common_vendor.f(_ctx.length, (item, index, i0) => {
|
||||
return {
|
||||
a: index,
|
||||
b: common_vendor.n(index === _ctx.current && "u-swiper-indicator__wrapper__dot--active"),
|
||||
c: common_vendor.s($options.dotStyle(index))
|
||||
};
|
||||
})
|
||||
} : {});
|
||||
}
|
||||
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-7b7c7ea6"]]);
|
||||
my.createComponent(Component);
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"component": true,
|
||||
"styleIsolation": "apply-shared",
|
||||
"usingComponents": {}
|
||||
}
|
||||
128
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-swiper/props.js
vendored
Normal file
128
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-swiper/props.js
vendored
Normal file
@@ -0,0 +1,128 @@
|
||||
"use strict";
|
||||
const uni_modules_uviewPlus_libs_config_props = require("../../libs/config/props.js");
|
||||
const props = {
|
||||
props: {
|
||||
// 列表数组,元素可为字符串,如为对象可通过keyName指定目标属性名
|
||||
list: {
|
||||
type: Array,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.swiper.list
|
||||
},
|
||||
// 是否显示面板指示器
|
||||
indicator: {
|
||||
type: Boolean,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.swiper.indicator
|
||||
},
|
||||
// 指示器非激活颜色
|
||||
indicatorActiveColor: {
|
||||
type: String,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.swiper.indicatorActiveColor
|
||||
},
|
||||
// 指示器的激活颜色
|
||||
indicatorInactiveColor: {
|
||||
type: String,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.swiper.indicatorInactiveColor
|
||||
},
|
||||
// 指示器样式,可通过bottom,left,right进行定位
|
||||
indicatorStyle: {
|
||||
type: [String, Object],
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.swiper.indicatorStyle
|
||||
},
|
||||
// 指示器模式,line-线型,dot-点型
|
||||
indicatorMode: {
|
||||
type: String,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.swiper.indicatorMode
|
||||
},
|
||||
// 是否自动切换
|
||||
autoplay: {
|
||||
type: Boolean,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.swiper.autoplay
|
||||
},
|
||||
// 当前所在滑块的 index
|
||||
current: {
|
||||
type: [String, Number],
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.swiper.current
|
||||
},
|
||||
// 当前所在滑块的 item-id ,不能与 current 被同时指定
|
||||
currentItemId: {
|
||||
type: String,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.swiper.currentItemId
|
||||
},
|
||||
// 滑块自动切换时间间隔
|
||||
interval: {
|
||||
type: [String, Number],
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.swiper.interval
|
||||
},
|
||||
// 滑块切换过程所需时间
|
||||
duration: {
|
||||
type: [String, Number],
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.swiper.duration
|
||||
},
|
||||
// 播放到末尾后是否重新回到开头
|
||||
circular: {
|
||||
type: Boolean,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.swiper.circular
|
||||
},
|
||||
// 前边距,可用于露出前一项的一小部分,nvue和支付宝不支持
|
||||
previousMargin: {
|
||||
type: [String, Number],
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.swiper.previousMargin
|
||||
},
|
||||
// 后边距,可用于露出后一项的一小部分,nvue和支付宝不支持
|
||||
nextMargin: {
|
||||
type: [String, Number],
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.swiper.nextMargin
|
||||
},
|
||||
// 当开启时,会根据滑动速度,连续滑动多屏,支付宝不支持
|
||||
acceleration: {
|
||||
type: Boolean,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.swiper.acceleration
|
||||
},
|
||||
// 同时显示的滑块数量,nvue、支付宝小程序不支持
|
||||
displayMultipleItems: {
|
||||
type: Number,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.swiper.displayMultipleItems
|
||||
},
|
||||
// 指定swiper切换缓动动画类型,有效值:default、linear、easeInCubic、easeOutCubic、easeInOutCubic
|
||||
// 只对微信小程序有效
|
||||
easingFunction: {
|
||||
type: String,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.swiper.easingFunction
|
||||
},
|
||||
// list数组中指定对象的目标属性名
|
||||
keyName: {
|
||||
type: String,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.swiper.keyName
|
||||
},
|
||||
// 图片的裁剪模式
|
||||
imgMode: {
|
||||
type: String,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.swiper.imgMode
|
||||
},
|
||||
// 组件高度
|
||||
height: {
|
||||
type: [String, Number],
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.swiper.height
|
||||
},
|
||||
// 背景颜色
|
||||
bgColor: {
|
||||
type: String,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.swiper.bgColor
|
||||
},
|
||||
// 组件圆角,数值或带单位的字符串
|
||||
radius: {
|
||||
type: [String, Number],
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.swiper.radius
|
||||
},
|
||||
// 是否加载中
|
||||
loading: {
|
||||
type: Boolean,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.swiper.loading
|
||||
},
|
||||
// 是否显示标题,要求数组对象中有title属性
|
||||
showTitle: {
|
||||
type: Boolean,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.swiper.showTitle
|
||||
}
|
||||
}
|
||||
};
|
||||
exports.props = props;
|
||||
62
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-swiper/u-swiper.acss
vendored
Normal file
62
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-swiper/u-swiper.acss
vendored
Normal file
@@ -0,0 +1,62 @@
|
||||
.u-empty.data-v-4e7d0c90,
|
||||
.u-empty__wrap.data-v-4e7d0c90,
|
||||
.u-tabs.data-v-4e7d0c90,
|
||||
.u-tabs__wrapper.data-v-4e7d0c90,
|
||||
.u-tabs__wrapper__scroll-view-wrapper.data-v-4e7d0c90,
|
||||
.u-tabs__wrapper__scroll-view.data-v-4e7d0c90,
|
||||
.u-tabs__wrapper__nav.data-v-4e7d0c90,
|
||||
.u-tabs__wrapper__nav__line.data-v-4e7d0c90 {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
flex-shrink: 0;
|
||||
flex-grow: 0;
|
||||
flex-basis: auto;
|
||||
align-items: stretch;
|
||||
align-content: flex-start;
|
||||
}
|
||||
.u-swiper__wrapper.data-v-4e7d0c90 {
|
||||
flex: 1;
|
||||
}
|
||||
.u-swiper.data-v-4e7d0c90 {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
}
|
||||
.u-swiper__wrapper.data-v-4e7d0c90 {
|
||||
flex: 1;
|
||||
}
|
||||
.u-swiper__wrapper__item.data-v-4e7d0c90 {
|
||||
flex: 1;
|
||||
}
|
||||
.u-swiper__wrapper__item__wrapper.data-v-4e7d0c90 {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
transition: transform 0.3s;
|
||||
flex: 1;
|
||||
}
|
||||
.u-swiper__wrapper__item__wrapper__image.data-v-4e7d0c90 {
|
||||
flex: 1;
|
||||
}
|
||||
.u-swiper__wrapper__item__wrapper__video.data-v-4e7d0c90 {
|
||||
flex: 1;
|
||||
}
|
||||
.u-swiper__wrapper__item__wrapper__title.data-v-4e7d0c90 {
|
||||
position: absolute;
|
||||
background-color: rgba(0, 0, 0, 0.3);
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
font-size: 28rpx;
|
||||
padding: 12rpx 24rpx;
|
||||
color: #FFFFFF;
|
||||
flex: 1;
|
||||
}
|
||||
.u-swiper__indicator.data-v-4e7d0c90 {
|
||||
position: absolute;
|
||||
bottom: 10px;
|
||||
}
|
||||
1
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-swiper/u-swiper.axml
vendored
Normal file
1
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-swiper/u-swiper.axml
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<view class="u-swiper data-v-4e7d0c90" style="{{'background-color:' + t + ';' + ('height:' + v) + ';' + ('border-radius:' + w)}}"><view a:if="{{a}}" class="u-swiper__loading data-v-4e7d0c90"><u-loading-icon class="data-v-4e7d0c90" u-i="4e7d0c90-0" onVI="__l" u-p="{{b}}"></u-loading-icon></view><swiper a:else class="u-swiper__wrapper data-v-4e7d0c90" style="{{'flex:' + '1' + ';' + ('height:' + d)}}" onChange="{{e}}" circular="{{f}}" interval="{{g}}" duration="{{h}}" autoplay="{{i}}" current="{{j}}" currentItemId="{{k}}" previousMargin="{{l}}" nextMargin="{{m}}" acceleration="{{n}}" displayMultipleItems="{{o}}" easingFunction="{{p}}"><swiper-item a:for="{{c}}" a:for-item="item" a:key="q" class="u-swiper__wrapper__item data-v-4e7d0c90"><view class="u-swiper__wrapper__item__wrapper data-v-4e7d0c90" style="{{item.p}}"><image a:if="{{item.a}}" class="u-swiper__wrapper__item__wrapper__image data-v-4e7d0c90" src="{{item.b}}" mode="{{item.c}}" onTap="{{item.d}}" style="{{'height:' + item.e + ';' + ('border-radius:' + item.f)}}"></image><video a:if="{{item.g}}" class="u-swiper__wrapper__item__wrapper__video data-v-4e7d0c90" id="{{item.h}}" enable-progress-gesture="{{false}}" src="{{item.i}}" poster="{{item.j}}" title="{{item.k}}" style="{{'height:' + item.l}}" controls onTap="{{item.m}}"></video><text a:if="{{item.n}}" class="u-swiper__wrapper__item__wrapper__title u-line-1 data-v-4e7d0c90">{{item.o}}</text></view></swiper-item></swiper><view class="u-swiper__indicator data-v-4e7d0c90" style="{{s}}"><slot name="indicator"><u-swiper-indicator a:if="{{q}}" class="data-v-4e7d0c90" u-i="4e7d0c90-1" onVI="__l" u-p="{{r}}"></u-swiper-indicator></slot></view></view>
|
||||
168
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-swiper/u-swiper.js
vendored
Normal file
168
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-swiper/u-swiper.js
vendored
Normal file
@@ -0,0 +1,168 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../../../common/vendor.js");
|
||||
const uni_modules_uviewPlus_components_uSwiper_props = require("./props.js");
|
||||
const uni_modules_uviewPlus_libs_mixin_mpMixin = require("../../libs/mixin/mpMixin.js");
|
||||
const uni_modules_uviewPlus_libs_mixin_mixin = require("../../libs/mixin/mixin.js");
|
||||
const uni_modules_uviewPlus_libs_function_index = require("../../libs/function/index.js");
|
||||
const uni_modules_uviewPlus_libs_function_test = require("../../libs/function/test.js");
|
||||
const _sfc_main = {
|
||||
name: "u-swiper",
|
||||
mixins: [uni_modules_uviewPlus_libs_mixin_mpMixin.mpMixin, uni_modules_uviewPlus_libs_mixin_mixin.mixin, uni_modules_uviewPlus_components_uSwiper_props.props],
|
||||
data() {
|
||||
return {
|
||||
currentIndex: 0
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
current(val, preVal) {
|
||||
if (val === preVal)
|
||||
return;
|
||||
this.currentIndex = val;
|
||||
}
|
||||
},
|
||||
emits: ["click", "change"],
|
||||
computed: {
|
||||
itemStyle() {
|
||||
return (index) => {
|
||||
const style = {};
|
||||
if (this.nextMargin && this.previousMargin) {
|
||||
style.borderRadius = uni_modules_uviewPlus_libs_function_index.addUnit(this.radius);
|
||||
if (index !== this.currentIndex)
|
||||
style.transform = "scale(0.92)";
|
||||
}
|
||||
return style;
|
||||
};
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
addStyle: uni_modules_uviewPlus_libs_function_index.addStyle,
|
||||
addUnit: uni_modules_uviewPlus_libs_function_index.addUnit,
|
||||
testObject: uni_modules_uviewPlus_libs_function_test.test.object,
|
||||
testImage: uni_modules_uviewPlus_libs_function_test.test.image,
|
||||
getItemType(item) {
|
||||
if (typeof item === "string")
|
||||
return uni_modules_uviewPlus_libs_function_test.test.video(this.getSource(item)) ? "video" : "image";
|
||||
if (typeof item === "object" && this.keyName) {
|
||||
if (!item.type)
|
||||
return uni_modules_uviewPlus_libs_function_test.test.video(this.getSource(item)) ? "video" : "image";
|
||||
if (item.type === "image")
|
||||
return "image";
|
||||
if (item.type === "video")
|
||||
return "video";
|
||||
return "image";
|
||||
}
|
||||
},
|
||||
// 获取目标路径,可能数组中为字符串,对象的形式,额外可指定对象的目标属性名keyName
|
||||
getSource(item) {
|
||||
if (typeof item === "string")
|
||||
return item;
|
||||
if (typeof item === "object" && this.keyName)
|
||||
return item[this.keyName];
|
||||
else
|
||||
uni_modules_uviewPlus_libs_function_index.error("请按格式传递列表参数");
|
||||
return "";
|
||||
},
|
||||
// 轮播切换事件
|
||||
change(e) {
|
||||
const {
|
||||
current
|
||||
} = e.detail;
|
||||
this.pauseVideo(this.currentIndex);
|
||||
this.currentIndex = current;
|
||||
this.$emit("change", e.detail);
|
||||
},
|
||||
// 切换轮播时,暂停视频播放
|
||||
pauseVideo(index) {
|
||||
const lastItem = this.getSource(this.list[index]);
|
||||
if (uni_modules_uviewPlus_libs_function_test.test.video(lastItem)) {
|
||||
const video = common_vendor.index.createVideoContext(`video-${index}`, this);
|
||||
video.pause();
|
||||
}
|
||||
},
|
||||
// 当一个轮播item为视频时,获取它的视频海报
|
||||
getPoster(item) {
|
||||
return typeof item === "object" && item.poster ? item.poster : "";
|
||||
},
|
||||
// 点击某个item
|
||||
clickHandler(index) {
|
||||
this.$emit("click", index);
|
||||
}
|
||||
}
|
||||
};
|
||||
if (!Array) {
|
||||
const _easycom_u_loading_icon2 = common_vendor.resolveComponent("u-loading-icon");
|
||||
const _easycom_u_swiper_indicator2 = common_vendor.resolveComponent("u-swiper-indicator");
|
||||
(_easycom_u_loading_icon2 + _easycom_u_swiper_indicator2)();
|
||||
}
|
||||
const _easycom_u_loading_icon = () => "../u-loading-icon/u-loading-icon.js";
|
||||
const _easycom_u_swiper_indicator = () => "../u-swiper-indicator/u-swiper-indicator.js";
|
||||
if (!Math) {
|
||||
(_easycom_u_loading_icon + _easycom_u_swiper_indicator)();
|
||||
}
|
||||
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
return common_vendor.e({
|
||||
a: _ctx.loading
|
||||
}, _ctx.loading ? {
|
||||
b: common_vendor.p({
|
||||
mode: "circle"
|
||||
})
|
||||
} : {
|
||||
c: common_vendor.f(_ctx.list, (item, index, i0) => {
|
||||
return common_vendor.e({
|
||||
a: $options.getItemType(item) === "image"
|
||||
}, $options.getItemType(item) === "image" ? {
|
||||
b: $options.getSource(item),
|
||||
c: _ctx.imgMode,
|
||||
d: common_vendor.o(($event) => $options.clickHandler(index)),
|
||||
e: $options.addUnit(_ctx.height),
|
||||
f: $options.addUnit(_ctx.radius)
|
||||
} : {}, {
|
||||
g: $options.getItemType(item) === "video"
|
||||
}, $options.getItemType(item) === "video" ? {
|
||||
h: `video-${index}`,
|
||||
i: $options.getSource(item),
|
||||
j: $options.getPoster(item),
|
||||
k: _ctx.showTitle && $options.testObject(item) && item.title ? item.title : "",
|
||||
l: $options.addUnit(_ctx.height),
|
||||
m: common_vendor.o(($event) => $options.clickHandler(index))
|
||||
} : {}, {
|
||||
n: _ctx.showTitle && $options.testObject(item) && item.title && $options.testImage($options.getSource(item))
|
||||
}, _ctx.showTitle && $options.testObject(item) && item.title && $options.testImage($options.getSource(item)) ? {
|
||||
o: common_vendor.t(item.title)
|
||||
} : {}, {
|
||||
p: common_vendor.s($options.itemStyle(index)),
|
||||
q: index
|
||||
});
|
||||
}),
|
||||
d: $options.addUnit(_ctx.height),
|
||||
e: common_vendor.o((...args) => $options.change && $options.change(...args)),
|
||||
f: _ctx.circular,
|
||||
g: _ctx.interval,
|
||||
h: _ctx.duration,
|
||||
i: _ctx.autoplay,
|
||||
j: _ctx.current,
|
||||
k: _ctx.currentItemId,
|
||||
l: $options.addUnit(_ctx.previousMargin),
|
||||
m: $options.addUnit(_ctx.nextMargin),
|
||||
n: _ctx.acceleration,
|
||||
o: _ctx.displayMultipleItems,
|
||||
p: _ctx.easingFunction
|
||||
}, {
|
||||
q: !_ctx.loading && _ctx.indicator && !_ctx.showTitle
|
||||
}, !_ctx.loading && _ctx.indicator && !_ctx.showTitle ? {
|
||||
r: common_vendor.p({
|
||||
indicatorActiveColor: _ctx.indicatorActiveColor,
|
||||
indicatorInactiveColor: _ctx.indicatorInactiveColor,
|
||||
length: _ctx.list.length,
|
||||
current: $data.currentIndex,
|
||||
indicatorMode: _ctx.indicatorMode
|
||||
})
|
||||
} : {}, {
|
||||
s: common_vendor.s($options.addStyle(_ctx.indicatorStyle)),
|
||||
t: _ctx.bgColor,
|
||||
v: $options.addUnit(_ctx.height),
|
||||
w: $options.addUnit(_ctx.radius)
|
||||
});
|
||||
}
|
||||
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-4e7d0c90"]]);
|
||||
my.createComponent(Component);
|
||||
8
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-swiper/u-swiper.json
vendored
Normal file
8
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-swiper/u-swiper.json
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"component": true,
|
||||
"styleIsolation": "apply-shared",
|
||||
"usingComponents": {
|
||||
"u-loading-icon": "../u-loading-icon/u-loading-icon",
|
||||
"u-swiper-indicator": "../u-swiper-indicator/u-swiper-indicator"
|
||||
}
|
||||
}
|
||||
91
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-tag/props.js
vendored
Normal file
91
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-tag/props.js
vendored
Normal file
@@ -0,0 +1,91 @@
|
||||
"use strict";
|
||||
const uni_modules_uviewPlus_libs_config_props = require("../../libs/config/props.js");
|
||||
const props = {
|
||||
props: {
|
||||
// 标签类型info、primary、success、warning、error
|
||||
type: {
|
||||
type: String,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.tag.type
|
||||
},
|
||||
// 不可用
|
||||
disabled: {
|
||||
type: [Boolean, String],
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.tag.disabled
|
||||
},
|
||||
// 标签的大小,large,medium,mini
|
||||
size: {
|
||||
type: String,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.tag.size
|
||||
},
|
||||
// tag的形状,circle(两边半圆形), square(方形,带圆角)
|
||||
shape: {
|
||||
type: String,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.tag.shape
|
||||
},
|
||||
// 标签文字
|
||||
text: {
|
||||
type: [String, Number],
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.tag.text
|
||||
},
|
||||
// 背景颜色,默认为空字符串,即不处理
|
||||
bgColor: {
|
||||
type: String,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.tag.bgColor
|
||||
},
|
||||
// 标签字体颜色,默认为空字符串,即不处理
|
||||
color: {
|
||||
type: String,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.tag.color
|
||||
},
|
||||
// 标签的边框颜色
|
||||
borderColor: {
|
||||
type: String,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.tag.borderColor
|
||||
},
|
||||
// 关闭按钮图标的颜色
|
||||
closeColor: {
|
||||
type: String,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.tag.closeColor
|
||||
},
|
||||
// 点击时返回的索引值,用于区分例遍的数组哪个元素被点击了
|
||||
name: {
|
||||
type: [String, Number],
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.tag.name
|
||||
},
|
||||
// // 模式选择,dark|light|plain
|
||||
// mode: {
|
||||
// type: String,
|
||||
// default: 'light'
|
||||
// },
|
||||
// 镂空时是否填充背景色
|
||||
plainFill: {
|
||||
type: Boolean,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.tag.plainFill
|
||||
},
|
||||
// 是否镂空
|
||||
plain: {
|
||||
type: Boolean,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.tag.plain
|
||||
},
|
||||
// 是否可关闭
|
||||
closable: {
|
||||
type: Boolean,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.tag.closable
|
||||
},
|
||||
// 是否显示
|
||||
show: {
|
||||
type: Boolean,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.tag.show
|
||||
},
|
||||
// 内置图标,或绝对路径的图片
|
||||
icon: {
|
||||
type: String,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.tag.icon
|
||||
},
|
||||
iconColor: {
|
||||
type: String,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.tag.iconColor
|
||||
}
|
||||
}
|
||||
};
|
||||
exports.props = props;
|
||||
176
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-tag/u-tag.acss
vendored
Normal file
176
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-tag/u-tag.acss
vendored
Normal file
@@ -0,0 +1,176 @@
|
||||
.u-empty.data-v-2fd891bb,
|
||||
.u-empty__wrap.data-v-2fd891bb,
|
||||
.u-tabs.data-v-2fd891bb,
|
||||
.u-tabs__wrapper.data-v-2fd891bb,
|
||||
.u-tabs__wrapper__scroll-view-wrapper.data-v-2fd891bb,
|
||||
.u-tabs__wrapper__scroll-view.data-v-2fd891bb,
|
||||
.u-tabs__wrapper__nav.data-v-2fd891bb,
|
||||
.u-tabs__wrapper__nav__line.data-v-2fd891bb {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
flex-shrink: 0;
|
||||
flex-grow: 0;
|
||||
flex-basis: auto;
|
||||
align-items: stretch;
|
||||
align-content: flex-start;
|
||||
}
|
||||
.u-tag-wrapper.data-v-2fd891bb {
|
||||
position: relative;
|
||||
}
|
||||
.u-tag.data-v-2fd891bb {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
border-style: solid;
|
||||
}
|
||||
.u-tag--circle.data-v-2fd891bb {
|
||||
border-radius: 100px;
|
||||
}
|
||||
.u-tag--square.data-v-2fd891bb {
|
||||
border-radius: 3px;
|
||||
}
|
||||
.u-tag__icon.data-v-2fd891bb {
|
||||
margin-right: 4px;
|
||||
}
|
||||
.u-tag__text--mini.data-v-2fd891bb {
|
||||
font-size: 12px;
|
||||
line-height: 12px;
|
||||
}
|
||||
.u-tag__text--medium.data-v-2fd891bb {
|
||||
font-size: 13px;
|
||||
line-height: 13px;
|
||||
}
|
||||
.u-tag__text--large.data-v-2fd891bb {
|
||||
font-size: 15px;
|
||||
line-height: 15px;
|
||||
}
|
||||
.u-tag--mini.data-v-2fd891bb {
|
||||
height: 22px;
|
||||
line-height: 22px;
|
||||
padding: 0 5px;
|
||||
}
|
||||
.u-tag--medium.data-v-2fd891bb {
|
||||
height: 26px;
|
||||
line-height: 22px;
|
||||
padding: 0 10px;
|
||||
}
|
||||
.u-tag--large.data-v-2fd891bb {
|
||||
height: 32px;
|
||||
line-height: 32px;
|
||||
padding: 0 15px;
|
||||
}
|
||||
.u-tag--primary.data-v-2fd891bb {
|
||||
background-color: #3c9cff;
|
||||
border-width: 1px;
|
||||
border-color: #3c9cff;
|
||||
}
|
||||
.u-tag--primary--plain.data-v-2fd891bb {
|
||||
border-width: 1px;
|
||||
border-color: #3c9cff;
|
||||
}
|
||||
.u-tag--primary--plain--fill.data-v-2fd891bb {
|
||||
background-color: #ecf5ff;
|
||||
}
|
||||
.u-tag__text--primary.data-v-2fd891bb {
|
||||
color: #FFFFFF;
|
||||
}
|
||||
.u-tag__text--primary--plain.data-v-2fd891bb {
|
||||
color: #3c9cff;
|
||||
}
|
||||
.u-tag--error.data-v-2fd891bb {
|
||||
background-color: #f56c6c;
|
||||
border-width: 1px;
|
||||
border-color: #f56c6c;
|
||||
}
|
||||
.u-tag--error--plain.data-v-2fd891bb {
|
||||
border-width: 1px;
|
||||
border-color: #f56c6c;
|
||||
}
|
||||
.u-tag--error--plain--fill.data-v-2fd891bb {
|
||||
background-color: #fef0f0;
|
||||
}
|
||||
.u-tag__text--error.data-v-2fd891bb {
|
||||
color: #FFFFFF;
|
||||
}
|
||||
.u-tag__text--error--plain.data-v-2fd891bb {
|
||||
color: #f56c6c;
|
||||
}
|
||||
.u-tag--warning.data-v-2fd891bb {
|
||||
background-color: #f9ae3d;
|
||||
border-width: 1px;
|
||||
border-color: #f9ae3d;
|
||||
}
|
||||
.u-tag--warning--plain.data-v-2fd891bb {
|
||||
border-width: 1px;
|
||||
border-color: #f9ae3d;
|
||||
}
|
||||
.u-tag--warning--plain--fill.data-v-2fd891bb {
|
||||
background-color: #fdf6ec;
|
||||
}
|
||||
.u-tag__text--warning.data-v-2fd891bb {
|
||||
color: #FFFFFF;
|
||||
}
|
||||
.u-tag__text--warning--plain.data-v-2fd891bb {
|
||||
color: #f9ae3d;
|
||||
}
|
||||
.u-tag--success.data-v-2fd891bb {
|
||||
background-color: #5ac725;
|
||||
border-width: 1px;
|
||||
border-color: #5ac725;
|
||||
}
|
||||
.u-tag--success--plain.data-v-2fd891bb {
|
||||
border-width: 1px;
|
||||
border-color: #5ac725;
|
||||
}
|
||||
.u-tag--success--plain--fill.data-v-2fd891bb {
|
||||
background-color: #f5fff0;
|
||||
}
|
||||
.u-tag__text--success.data-v-2fd891bb {
|
||||
color: #FFFFFF;
|
||||
}
|
||||
.u-tag__text--success--plain.data-v-2fd891bb {
|
||||
color: #5ac725;
|
||||
}
|
||||
.u-tag--info.data-v-2fd891bb {
|
||||
background-color: #909399;
|
||||
border-width: 1px;
|
||||
border-color: #909399;
|
||||
}
|
||||
.u-tag--info--plain.data-v-2fd891bb {
|
||||
border-width: 1px;
|
||||
border-color: #909399;
|
||||
}
|
||||
.u-tag--info--plain--fill.data-v-2fd891bb {
|
||||
background-color: #f4f4f5;
|
||||
}
|
||||
.u-tag__text--info.data-v-2fd891bb {
|
||||
color: #FFFFFF;
|
||||
}
|
||||
.u-tag__text--info--plain.data-v-2fd891bb {
|
||||
color: #909399;
|
||||
}
|
||||
.u-tag__close.data-v-2fd891bb {
|
||||
position: absolute;
|
||||
z-index: 999;
|
||||
top: 10px;
|
||||
right: 10px;
|
||||
border-radius: 100px;
|
||||
background-color: #C6C7CB;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
transform: scale(0.6) translate(80%, -80%);
|
||||
}
|
||||
.u-tag__close--mini.data-v-2fd891bb {
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
}
|
||||
.u-tag__close--medium.data-v-2fd891bb {
|
||||
width: 22px;
|
||||
height: 22px;
|
||||
}
|
||||
.u-tag__close--large.data-v-2fd891bb {
|
||||
width: 25px;
|
||||
height: 25px;
|
||||
}
|
||||
1
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-tag/u-tag.axml
vendored
Normal file
1
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-tag/u-tag.axml
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<u-transition class="data-v-2fd891bb" u-s="{{['d']}}" style="display:inline-flex" u-i="2fd891bb-0" onVI="__l" u-p="{{y}}"><view class="u-tag-wrapper cursor-pointer data-v-2fd891bb"><view class="{{('u-tag') + ' ' + 'data-v-2fd891bb' + ' ' + k + ' ' + l + ' ' + m + ' ' + n + ' ' + o}}" catchTap="{{p}}" style="{{q + ';' + r}}"><slot name="icon"><view a:if="{{a}}" class="u-tag__icon data-v-2fd891bb"><image a:if="{{b}}" class="data-v-2fd891bb" src="{{c}}" style="{{d}}"></image><u-icon a:else class="data-v-2fd891bb" u-i="2fd891bb-1,2fd891bb-0" onVI="__l" u-p="{{e||''}}"></u-icon></view></slot><text style="{{g}}" class="{{('u-tag__text') + ' ' + 'data-v-2fd891bb' + ' ' + h + ' ' + i + ' ' + j}}">{{f}}</text></view><view a:if="{{s}}" class="{{('u-tag__close') + ' ' + 'data-v-2fd891bb' + ' ' + v}}" catchTap="{{w}}" style="{{'background-color:' + x}}"><u-icon class="data-v-2fd891bb" u-i="2fd891bb-2,2fd891bb-0" onVI="__l" u-p="{{t}}"></u-icon></view></view></u-transition>
|
||||
129
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-tag/u-tag.js
vendored
Normal file
129
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-tag/u-tag.js
vendored
Normal file
@@ -0,0 +1,129 @@
|
||||
"use strict";
|
||||
const uni_modules_uviewPlus_components_uTag_props = require("./props.js");
|
||||
const uni_modules_uviewPlus_libs_mixin_mpMixin = require("../../libs/mixin/mpMixin.js");
|
||||
const uni_modules_uviewPlus_libs_mixin_mixin = require("../../libs/mixin/mixin.js");
|
||||
const uni_modules_uviewPlus_libs_function_test = require("../../libs/function/test.js");
|
||||
const common_vendor = require("../../../../common/vendor.js");
|
||||
const _sfc_main = {
|
||||
name: "u-tag",
|
||||
mixins: [uni_modules_uviewPlus_libs_mixin_mpMixin.mpMixin, uni_modules_uviewPlus_libs_mixin_mixin.mixin, uni_modules_uviewPlus_components_uTag_props.props],
|
||||
data() {
|
||||
return {};
|
||||
},
|
||||
computed: {
|
||||
style() {
|
||||
const style = {};
|
||||
if (this.bgColor) {
|
||||
style.backgroundColor = this.bgColor;
|
||||
}
|
||||
if (this.color) {
|
||||
style.color = this.color;
|
||||
}
|
||||
if (this.borderColor) {
|
||||
style.borderColor = this.borderColor;
|
||||
}
|
||||
return style;
|
||||
},
|
||||
// nvue下,文本颜色无法继承父元素
|
||||
textColor() {
|
||||
const style = {};
|
||||
if (this.color) {
|
||||
style.color = this.color;
|
||||
}
|
||||
return style;
|
||||
},
|
||||
imgStyle() {
|
||||
const width = this.size === "large" ? "17px" : this.size === "medium" ? "15px" : "13px";
|
||||
return {
|
||||
width,
|
||||
height: width
|
||||
};
|
||||
},
|
||||
// 文本的样式
|
||||
closeSize() {
|
||||
const size = this.size === "large" ? 15 : this.size === "medium" ? 13 : 12;
|
||||
return size;
|
||||
},
|
||||
// 图标大小
|
||||
iconSize() {
|
||||
const size = this.size === "large" ? 21 : this.size === "medium" ? 19 : 16;
|
||||
return size;
|
||||
},
|
||||
// 图标颜色
|
||||
elIconColor() {
|
||||
return this.iconColor ? this.iconColor : this.plain ? this.type : "#ffffff";
|
||||
}
|
||||
},
|
||||
emits: ["click", "close"],
|
||||
methods: {
|
||||
testImage: uni_modules_uviewPlus_libs_function_test.test.image,
|
||||
// 点击关闭按钮
|
||||
closeHandler() {
|
||||
this.$emit("close", this.name);
|
||||
},
|
||||
// 点击标签
|
||||
clickHandler() {
|
||||
this.$emit("click", this.name);
|
||||
}
|
||||
}
|
||||
};
|
||||
if (!Array) {
|
||||
const _easycom_u_icon2 = common_vendor.resolveComponent("u-icon");
|
||||
const _easycom_u_transition2 = common_vendor.resolveComponent("u-transition");
|
||||
(_easycom_u_icon2 + _easycom_u_transition2)();
|
||||
}
|
||||
const _easycom_u_icon = () => "../u-icon/u-icon.js";
|
||||
const _easycom_u_transition = () => "../u-transition/u-transition.js";
|
||||
if (!Math) {
|
||||
(_easycom_u_icon + _easycom_u_transition)();
|
||||
}
|
||||
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
return common_vendor.e({
|
||||
a: _ctx.icon
|
||||
}, _ctx.icon ? common_vendor.e({
|
||||
b: $options.testImage(_ctx.icon)
|
||||
}, $options.testImage(_ctx.icon) ? {
|
||||
c: _ctx.icon,
|
||||
d: common_vendor.s($options.imgStyle)
|
||||
} : {
|
||||
e: common_vendor.p({
|
||||
color: $options.elIconColor,
|
||||
name: _ctx.icon,
|
||||
size: $options.iconSize
|
||||
})
|
||||
}) : {}, {
|
||||
f: common_vendor.t(_ctx.text),
|
||||
g: common_vendor.s($options.textColor),
|
||||
h: common_vendor.n(`u-tag__text--${_ctx.type}`),
|
||||
i: common_vendor.n(_ctx.plain && `u-tag__text--${_ctx.type}--plain`),
|
||||
j: common_vendor.n(`u-tag__text--${_ctx.size}`),
|
||||
k: common_vendor.n(`u-tag--${_ctx.shape}`),
|
||||
l: common_vendor.n(!_ctx.plain && `u-tag--${_ctx.type}`),
|
||||
m: common_vendor.n(_ctx.plain && `u-tag--${_ctx.type}--plain`),
|
||||
n: common_vendor.n(`u-tag--${_ctx.size}`),
|
||||
o: common_vendor.n(_ctx.plain && _ctx.plainFill && `u-tag--${_ctx.type}--plain--fill`),
|
||||
p: common_vendor.o((...args) => $options.clickHandler && $options.clickHandler(...args)),
|
||||
q: common_vendor.s({
|
||||
marginRight: _ctx.closable ? "10px" : 0,
|
||||
marginTop: _ctx.closable ? "10px" : 0
|
||||
}),
|
||||
r: common_vendor.s($options.style),
|
||||
s: _ctx.closable
|
||||
}, _ctx.closable ? {
|
||||
t: common_vendor.p({
|
||||
name: "close",
|
||||
size: $options.closeSize,
|
||||
color: "#ffffff"
|
||||
}),
|
||||
v: common_vendor.n(`u-tag__close--${_ctx.size}`),
|
||||
w: common_vendor.o((...args) => $options.closeHandler && $options.closeHandler(...args)),
|
||||
x: _ctx.closeColor
|
||||
} : {}, {
|
||||
y: common_vendor.p({
|
||||
mode: "fade",
|
||||
show: _ctx.show
|
||||
})
|
||||
});
|
||||
}
|
||||
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-2fd891bb"]]);
|
||||
my.createComponent(Component);
|
||||
8
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-tag/u-tag.json
vendored
Normal file
8
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-tag/u-tag.json
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"component": true,
|
||||
"styleIsolation": "apply-shared",
|
||||
"usingComponents": {
|
||||
"u-icon": "../u-icon/u-icon",
|
||||
"u-transition": "../u-transition/u-transition"
|
||||
}
|
||||
}
|
||||
113
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-text/props.js
vendored
Normal file
113
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-text/props.js
vendored
Normal file
@@ -0,0 +1,113 @@
|
||||
"use strict";
|
||||
const uni_modules_uviewPlus_libs_config_props = require("../../libs/config/props.js");
|
||||
const props = {
|
||||
props: {
|
||||
// 主题颜色
|
||||
type: {
|
||||
type: String,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.text.type
|
||||
},
|
||||
// 是否显示
|
||||
show: {
|
||||
type: Boolean,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.text.show
|
||||
},
|
||||
// 显示的值
|
||||
text: {
|
||||
type: [String, Number],
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.text.text
|
||||
},
|
||||
// 前置图标
|
||||
prefixIcon: {
|
||||
type: String,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.text.prefixIcon
|
||||
},
|
||||
// 后置图标
|
||||
suffixIcon: {
|
||||
type: String,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.text.suffixIcon
|
||||
},
|
||||
// 文本处理的匹配模式
|
||||
// text-普通文本,price-价格,phone-手机号,name-姓名,date-日期,link-超链接
|
||||
mode: {
|
||||
type: String,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.text.mode
|
||||
},
|
||||
// mode=link下,配置的链接
|
||||
href: {
|
||||
type: String,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.text.href
|
||||
},
|
||||
// 格式化规则
|
||||
format: {
|
||||
type: [String, Function],
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.text.format
|
||||
},
|
||||
// mode=phone时,点击文本是否拨打电话
|
||||
call: {
|
||||
type: Boolean,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.text.call
|
||||
},
|
||||
// 小程序的打开方式
|
||||
openType: {
|
||||
type: String,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.text.openType
|
||||
},
|
||||
// 是否粗体,默认normal
|
||||
bold: {
|
||||
type: Boolean,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.text.bold
|
||||
},
|
||||
// 是否块状
|
||||
block: {
|
||||
type: Boolean,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.text.block
|
||||
},
|
||||
// 文本显示的行数,如果设置,超出此行数,将会显示省略号
|
||||
lines: {
|
||||
type: [String, Number],
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.text.lines
|
||||
},
|
||||
// 文本颜色
|
||||
color: {
|
||||
type: String,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.text.color
|
||||
},
|
||||
// 字体大小
|
||||
size: {
|
||||
type: [String, Number],
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.text.size
|
||||
},
|
||||
// 图标的样式
|
||||
iconStyle: {
|
||||
type: [Object, String],
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.text.iconStyle
|
||||
},
|
||||
// 文字装饰,下划线,中划线等,可选值 none|underline|line-through
|
||||
decoration: {
|
||||
tepe: String,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.text.decoration
|
||||
},
|
||||
// 外边距,对象、字符串,数值形式均可
|
||||
margin: {
|
||||
type: [Object, String, Number],
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.text.margin
|
||||
},
|
||||
// 文本行高
|
||||
lineHeight: {
|
||||
type: [String, Number],
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.text.lineHeight
|
||||
},
|
||||
// 文本对齐方式,可选值left|center|right
|
||||
align: {
|
||||
type: String,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.text.align
|
||||
},
|
||||
// 文字换行,可选值break-word|normal|anywhere
|
||||
wordWrap: {
|
||||
type: String,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.text.wordWrap
|
||||
}
|
||||
}
|
||||
};
|
||||
exports.props = props;
|
||||
64
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-text/u-text.acss
vendored
Normal file
64
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-text/u-text.acss
vendored
Normal file
@@ -0,0 +1,64 @@
|
||||
.u-empty.data-v-0a574502,
|
||||
.u-empty__wrap.data-v-0a574502,
|
||||
.u-tabs.data-v-0a574502,
|
||||
.u-tabs__wrapper.data-v-0a574502,
|
||||
.u-tabs__wrapper__scroll-view-wrapper.data-v-0a574502,
|
||||
.u-tabs__wrapper__scroll-view.data-v-0a574502,
|
||||
.u-tabs__wrapper__nav.data-v-0a574502,
|
||||
.u-tabs__wrapper__nav__line.data-v-0a574502 {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
flex-shrink: 0;
|
||||
flex-grow: 0;
|
||||
flex-basis: auto;
|
||||
align-items: stretch;
|
||||
align-content: flex-start;
|
||||
}
|
||||
.u-text.data-v-0a574502 {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
flex-wrap: nowrap;
|
||||
flex: 1;
|
||||
width: 100%;
|
||||
}
|
||||
.u-text__price.data-v-0a574502 {
|
||||
font-size: 14px;
|
||||
color: #606266;
|
||||
}
|
||||
.u-text__value.data-v-0a574502 {
|
||||
font-size: 14px;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
color: #606266;
|
||||
flex-wrap: wrap;
|
||||
text-overflow: ellipsis;
|
||||
align-items: center;
|
||||
}
|
||||
.u-text__value--primary.data-v-0a574502 {
|
||||
color: #3c9cff;
|
||||
}
|
||||
.u-text__value--warning.data-v-0a574502 {
|
||||
color: #f9ae3d;
|
||||
}
|
||||
.u-text__value--success.data-v-0a574502 {
|
||||
color: #5ac725;
|
||||
}
|
||||
.u-text__value--info.data-v-0a574502 {
|
||||
color: #909399;
|
||||
}
|
||||
.u-text__value--error.data-v-0a574502 {
|
||||
color: #f56c6c;
|
||||
}
|
||||
.u-text__value--main.data-v-0a574502 {
|
||||
color: #303133;
|
||||
}
|
||||
.u-text__value--content.data-v-0a574502 {
|
||||
color: #606266;
|
||||
}
|
||||
.u-text__value--tips.data-v-0a574502 {
|
||||
color: #909193;
|
||||
}
|
||||
.u-text__value--light.data-v-0a574502 {
|
||||
color: #c0c4cc;
|
||||
}
|
||||
1
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-text/u-text.axml
vendored
Normal file
1
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-text/u-text.axml
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<view a:if="{{a}}" class="{{('u-text') + ' ' + 'data-v-0a574502'}}" style="{{'margin:' + M + ';' + ('justify-content:' + N)}}" onTap="{{O}}"><text a:if="{{b}}" class="{{('data-v-0a574502') + ' ' + 'u-text__price' + ' ' + c}}" style="{{d}}">¥</text><view a:if="{{e}}" class="u-text__prefix-icon data-v-0a574502"><u-icon class="data-v-0a574502" u-i="0a574502-0" onVI="__l" u-p="{{f}}"></u-icon></view><u-link a:if="{{g}}" style="{{'font-weight:' + h + ';' + ('word-wrap:' + i) + ';' + ('font-size:' + j)}}" class="{{('u-text__value') + ' ' + 'data-v-0a574502' + ' ' + k + ' ' + l}}" u-i="0a574502-1" onVI="__l" u-p="{{m}}"></u-link><block a:elif="{{n}}"><button class="u-reset-button u-text__value data-v-0a574502" style="{{p}}" data-index="{{q}}" openType="{{r}}" onGetuserinfo="{{s}}" onContact="{{t}}" onGetphonenumber="{{v}}" onError="{{w}}" onLaunchapp="{{x}}" onOpensetting="{{y}}" lang="{{z}}" session-from="{{A}}" send-message-title="{{B}}" send-message-path="{{C}}" send-message-img="{{D}}" show-message-card="{{E}}" app-parameter="{{F}}">{{o}}</button></block><text a:else style="{{H}}" class="{{('u-text__value') + ' ' + 'data-v-0a574502' + ' ' + I + ' ' + J}}">{{G}}</text><view a:if="{{K}}" class="u-text__suffix-icon data-v-0a574502"><u-icon class="data-v-0a574502" u-i="0a574502-2" onVI="__l" u-p="{{L}}"></u-icon></view></view>
|
||||
129
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-text/u-text.js
vendored
Normal file
129
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-text/u-text.js
vendored
Normal file
@@ -0,0 +1,129 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../../../common/vendor.js");
|
||||
const uni_modules_uviewPlus_components_uText_props = require("./props.js");
|
||||
const uni_modules_uviewPlus_components_uText_value = require("./value.js");
|
||||
const uni_modules_uviewPlus_libs_mixin_mpMixin = require("../../libs/mixin/mpMixin.js");
|
||||
const uni_modules_uviewPlus_libs_mixin_mixin = require("../../libs/mixin/mixin.js");
|
||||
const uni_modules_uviewPlus_libs_mixin_button = require("../../libs/mixin/button.js");
|
||||
const uni_modules_uviewPlus_libs_mixin_openType = require("../../libs/mixin/openType.js");
|
||||
const uni_modules_uviewPlus_libs_function_index = require("../../libs/function/index.js");
|
||||
const _sfc_main = {
|
||||
name: "u--text",
|
||||
mixins: [uni_modules_uviewPlus_libs_mixin_mpMixin.mpMixin, uni_modules_uviewPlus_libs_mixin_mixin.mixin, uni_modules_uviewPlus_components_uText_value.value, uni_modules_uviewPlus_libs_mixin_button.button, uni_modules_uviewPlus_libs_mixin_openType.openType, uni_modules_uviewPlus_components_uText_props.props],
|
||||
emits: ["click"],
|
||||
computed: {
|
||||
valueStyle() {
|
||||
const style = {
|
||||
textDecoration: this.decoration,
|
||||
fontWeight: this.bold ? "bold" : "normal",
|
||||
wordWrap: this.wordWrap,
|
||||
fontSize: uni_modules_uviewPlus_libs_function_index.addUnit(this.size)
|
||||
};
|
||||
!this.type && (style.color = this.color);
|
||||
this.isNvue && this.lines && (style.lines = this.lines);
|
||||
this.lineHeight && (style.lineHeight = uni_modules_uviewPlus_libs_function_index.addUnit(this.lineHeight));
|
||||
!this.isNvue && this.block && (style.display = "block");
|
||||
return uni_modules_uviewPlus_libs_function_index.deepMerge(style, uni_modules_uviewPlus_libs_function_index.addStyle(this.customStyle));
|
||||
},
|
||||
isNvue() {
|
||||
let nvue = false;
|
||||
return nvue;
|
||||
},
|
||||
isMp() {
|
||||
let mp = false;
|
||||
mp = true;
|
||||
return mp;
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {};
|
||||
},
|
||||
methods: {
|
||||
addStyle: uni_modules_uviewPlus_libs_function_index.addStyle,
|
||||
clickHandler() {
|
||||
if (this.call && this.mode === "phone") {
|
||||
common_vendor.index.makePhoneCall({
|
||||
phoneNumber: this.text
|
||||
});
|
||||
}
|
||||
this.$emit("click");
|
||||
}
|
||||
}
|
||||
};
|
||||
if (!Array) {
|
||||
const _easycom_u_icon2 = common_vendor.resolveComponent("u-icon");
|
||||
const _easycom_u_link2 = common_vendor.resolveComponent("u-link");
|
||||
(_easycom_u_icon2 + _easycom_u_link2)();
|
||||
}
|
||||
const _easycom_u_icon = () => "../u-icon/u-icon.js";
|
||||
const _easycom_u_link = () => "../u-link/u-link.js";
|
||||
if (!Math) {
|
||||
(_easycom_u_icon + _easycom_u_link)();
|
||||
}
|
||||
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
return common_vendor.e({
|
||||
a: _ctx.show
|
||||
}, _ctx.show ? common_vendor.e({
|
||||
b: _ctx.mode === "price"
|
||||
}, _ctx.mode === "price" ? {
|
||||
c: common_vendor.n(_ctx.type && `u-text__value--${_ctx.type}`),
|
||||
d: common_vendor.s($options.valueStyle)
|
||||
} : {}, {
|
||||
e: _ctx.prefixIcon
|
||||
}, _ctx.prefixIcon ? {
|
||||
f: common_vendor.p({
|
||||
name: _ctx.prefixIcon,
|
||||
customStyle: $options.addStyle(_ctx.iconStyle)
|
||||
})
|
||||
} : {}, {
|
||||
g: _ctx.mode === "link"
|
||||
}, _ctx.mode === "link" ? {
|
||||
h: $options.valueStyle.fontWeight,
|
||||
i: $options.valueStyle.wordWrap,
|
||||
j: $options.valueStyle.fontSize,
|
||||
k: common_vendor.n(_ctx.type && `u-text__value--${_ctx.type}`),
|
||||
l: common_vendor.n(_ctx.lines && `u-line-${_ctx.lines}`),
|
||||
m: common_vendor.p({
|
||||
text: _ctx.value,
|
||||
href: _ctx.href,
|
||||
underLine: true
|
||||
})
|
||||
} : _ctx.openType && $options.isMp ? {
|
||||
o: common_vendor.t(_ctx.value),
|
||||
p: common_vendor.s($options.valueStyle),
|
||||
q: _ctx.index,
|
||||
r: _ctx.openType,
|
||||
s: common_vendor.o((...args) => _ctx.onGetUserInfo && _ctx.onGetUserInfo(...args)),
|
||||
t: common_vendor.o((...args) => _ctx.onContact && _ctx.onContact(...args)),
|
||||
v: common_vendor.o((...args) => _ctx.onGetPhoneNumber && _ctx.onGetPhoneNumber(...args)),
|
||||
w: common_vendor.o((...args) => _ctx.onError && _ctx.onError(...args)),
|
||||
x: common_vendor.o((...args) => _ctx.onLaunchApp && _ctx.onLaunchApp(...args)),
|
||||
y: common_vendor.o((...args) => _ctx.onOpenSetting && _ctx.onOpenSetting(...args)),
|
||||
z: _ctx.lang,
|
||||
A: _ctx.sessionFrom,
|
||||
B: _ctx.sendMessageTitle,
|
||||
C: _ctx.sendMessagePath,
|
||||
D: _ctx.sendMessageImg,
|
||||
E: _ctx.showMessageCard,
|
||||
F: _ctx.appParameter
|
||||
} : {
|
||||
G: common_vendor.t(_ctx.value),
|
||||
H: common_vendor.s($options.valueStyle),
|
||||
I: common_vendor.n(_ctx.type && `u-text__value--${_ctx.type}`),
|
||||
J: common_vendor.n(_ctx.lines && `u-line-${_ctx.lines}`)
|
||||
}, {
|
||||
n: _ctx.openType && $options.isMp,
|
||||
K: _ctx.suffixIcon
|
||||
}, _ctx.suffixIcon ? {
|
||||
L: common_vendor.p({
|
||||
name: _ctx.suffixIcon,
|
||||
customStyle: $options.addStyle(_ctx.iconStyle)
|
||||
})
|
||||
} : {}, {
|
||||
M: _ctx.margin,
|
||||
N: _ctx.align === "left" ? "flex-start" : _ctx.align === "center" ? "center" : "flex-end",
|
||||
O: common_vendor.o((...args) => $options.clickHandler && $options.clickHandler(...args))
|
||||
}) : {});
|
||||
}
|
||||
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-0a574502"]]);
|
||||
my.createComponent(Component);
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user