first commit
This commit is contained in:
0
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u--image/u--image.acss
vendored
Normal file
0
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u--image/u--image.acss
vendored
Normal file
1
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u--image/u--image.axml
vendored
Normal file
1
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u--image/u--image.axml
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<uv-image u-s="{{['loading','error']}}" onClick="{{a}}" onError="{{b}}" onLoad="{{c}}" u-i="3a6b4072-0" onVI="__l" u-p="{{d}}"><view slot="loading"><slot name="loading"></slot></view><view slot="error"><slot name="error"></slot></view></uv-image>
|
||||
46
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u--image/u--image.js
vendored
Normal file
46
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u--image/u--image.js
vendored
Normal file
@@ -0,0 +1,46 @@
|
||||
"use strict";
|
||||
const uni_modules_uviewPlus_components_uImage_props = require("../u-image/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 uvImage = () => "../u-image/u-image.js";
|
||||
const _sfc_main = {
|
||||
name: "u--image",
|
||||
mixins: [uni_modules_uviewPlus_libs_mixin_mpMixin.mpMixin, uni_modules_uviewPlus_components_uImage_props.props, uni_modules_uviewPlus_libs_mixin_mixin.mixin],
|
||||
components: {
|
||||
uvImage
|
||||
},
|
||||
emits: ["click", "error", "load"]
|
||||
};
|
||||
if (!Array) {
|
||||
const _component_uvImage = common_vendor.resolveComponent("uvImage");
|
||||
_component_uvImage();
|
||||
}
|
||||
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
return {
|
||||
a: common_vendor.o(($event) => _ctx.$emit("click")),
|
||||
b: common_vendor.o(($event) => _ctx.$emit("error")),
|
||||
c: common_vendor.o(($event) => _ctx.$emit("load")),
|
||||
d: common_vendor.p({
|
||||
src: _ctx.src,
|
||||
mode: _ctx.mode,
|
||||
width: _ctx.width,
|
||||
height: _ctx.height,
|
||||
shape: _ctx.shape,
|
||||
radius: _ctx.radius,
|
||||
lazyLoad: _ctx.lazyLoad,
|
||||
showMenuByLongpress: _ctx.showMenuByLongpress,
|
||||
loadingIcon: _ctx.loadingIcon,
|
||||
errorIcon: _ctx.errorIcon,
|
||||
showLoading: _ctx.showLoading,
|
||||
showError: _ctx.showError,
|
||||
fade: _ctx.fade,
|
||||
webp: _ctx.webp,
|
||||
duration: _ctx.duration,
|
||||
bgColor: _ctx.bgColor,
|
||||
customStyle: _ctx.customStyle
|
||||
})
|
||||
};
|
||||
}
|
||||
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render]]);
|
||||
my.createComponent(Component);
|
||||
7
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u--image/u--image.json
vendored
Normal file
7
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u--image/u--image.json
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"component": true,
|
||||
"styleIsolation": "apply-shared",
|
||||
"usingComponents": {
|
||||
"uv-image": "../u-image/u-image"
|
||||
}
|
||||
}
|
||||
80
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-badge/props.js
vendored
Normal file
80
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-badge/props.js
vendored
Normal file
@@ -0,0 +1,80 @@
|
||||
"use strict";
|
||||
const uni_modules_uviewPlus_libs_config_props = require("../../libs/config/props.js");
|
||||
const props = {
|
||||
props: {
|
||||
// 是否显示圆点
|
||||
isDot: {
|
||||
type: Boolean,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.badge.isDot
|
||||
},
|
||||
// 显示的内容
|
||||
value: {
|
||||
type: [Number, String],
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.badge.value
|
||||
},
|
||||
// 显示的内容
|
||||
modelValue: {
|
||||
type: [Number, String],
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.badge.modelValue
|
||||
},
|
||||
// 是否显示
|
||||
show: {
|
||||
type: Boolean,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.badge.show
|
||||
},
|
||||
// 最大值,超过最大值会显示 '{max}+'
|
||||
max: {
|
||||
type: [Number, String],
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.badge.max
|
||||
},
|
||||
// 主题类型,error|warning|success|primary
|
||||
type: {
|
||||
type: String,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.badge.type
|
||||
},
|
||||
// 当数值为 0 时,是否展示 Badge
|
||||
showZero: {
|
||||
type: Boolean,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.badge.showZero
|
||||
},
|
||||
// 背景颜色,优先级比type高,如设置,type参数会失效
|
||||
bgColor: {
|
||||
type: [String, null],
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.badge.bgColor
|
||||
},
|
||||
// 字体颜色
|
||||
color: {
|
||||
type: [String, null],
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.badge.color
|
||||
},
|
||||
// 徽标形状,circle-四角均为圆角,horn-左下角为直角
|
||||
shape: {
|
||||
type: String,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.badge.shape
|
||||
},
|
||||
// 设置数字的显示方式,overflow|ellipsis|limit
|
||||
// overflow会根据max字段判断,超出显示`${max}+`
|
||||
// ellipsis会根据max判断,超出显示`${max}...`
|
||||
// limit会依据1000作为判断条件,超出1000,显示`${value/1000}K`,比如2.2k、3.34w,最多保留2位小数
|
||||
numberType: {
|
||||
type: String,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.badge.numberType
|
||||
},
|
||||
// 设置badge的位置偏移,格式为 [x, y],也即设置的为top和right的值,absolute为true时有效
|
||||
offset: {
|
||||
type: Array,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.badge.offset
|
||||
},
|
||||
// 是否反转背景和字体颜色
|
||||
inverted: {
|
||||
type: Boolean,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.badge.inverted
|
||||
},
|
||||
// 是否绝对定位
|
||||
absolute: {
|
||||
type: Boolean,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.badge.absolute
|
||||
}
|
||||
}
|
||||
};
|
||||
exports.props = props;
|
||||
71
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-badge/u-badge.acss
vendored
Normal file
71
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-badge/u-badge.acss
vendored
Normal file
@@ -0,0 +1,71 @@
|
||||
.u-empty.data-v-06cca9b7,
|
||||
.u-empty__wrap.data-v-06cca9b7,
|
||||
.u-tabs.data-v-06cca9b7,
|
||||
.u-tabs__wrapper.data-v-06cca9b7,
|
||||
.u-tabs__wrapper__scroll-view-wrapper.data-v-06cca9b7,
|
||||
.u-tabs__wrapper__scroll-view.data-v-06cca9b7,
|
||||
.u-tabs__wrapper__nav.data-v-06cca9b7,
|
||||
.u-tabs__wrapper__nav__line.data-v-06cca9b7 {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
flex-shrink: 0;
|
||||
flex-grow: 0;
|
||||
flex-basis: auto;
|
||||
align-items: stretch;
|
||||
align-content: flex-start;
|
||||
}
|
||||
.u-badge.data-v-06cca9b7 {
|
||||
border-top-right-radius: 100px;
|
||||
border-top-left-radius: 100px;
|
||||
border-bottom-left-radius: 100px;
|
||||
border-bottom-right-radius: 100px;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
line-height: 11px;
|
||||
text-align: center;
|
||||
font-size: 11px;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
.u-badge--dot.data-v-06cca9b7 {
|
||||
height: 8px;
|
||||
width: 8px;
|
||||
}
|
||||
.u-badge--inverted.data-v-06cca9b7 {
|
||||
font-size: 13px;
|
||||
}
|
||||
.u-badge--not-dot.data-v-06cca9b7 {
|
||||
padding: 2px 5px;
|
||||
}
|
||||
.u-badge--horn.data-v-06cca9b7 {
|
||||
border-bottom-left-radius: 0;
|
||||
}
|
||||
.u-badge--primary.data-v-06cca9b7 {
|
||||
background-color: #3c9cff;
|
||||
}
|
||||
.u-badge--primary--inverted.data-v-06cca9b7 {
|
||||
color: #3c9cff;
|
||||
}
|
||||
.u-badge--error.data-v-06cca9b7 {
|
||||
background-color: #f56c6c;
|
||||
}
|
||||
.u-badge--error--inverted.data-v-06cca9b7 {
|
||||
color: #f56c6c;
|
||||
}
|
||||
.u-badge--success.data-v-06cca9b7 {
|
||||
background-color: #5ac725;
|
||||
}
|
||||
.u-badge--success--inverted.data-v-06cca9b7 {
|
||||
color: #5ac725;
|
||||
}
|
||||
.u-badge--info.data-v-06cca9b7 {
|
||||
background-color: #909399;
|
||||
}
|
||||
.u-badge--info--inverted.data-v-06cca9b7 {
|
||||
color: #909399;
|
||||
}
|
||||
.u-badge--warning.data-v-06cca9b7 {
|
||||
background-color: #f9ae3d;
|
||||
}
|
||||
.u-badge--warning--inverted.data-v-06cca9b7 {
|
||||
color: #f9ae3d;
|
||||
}
|
||||
1
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-badge/u-badge.axml
vendored
Normal file
1
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-badge/u-badge.axml
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<text a:if="{{a}}" class="{{(c) + ' ' + d + ' ' + e + ' ' + f + ' ' + 'u-badge' + ' ' + 'data-v-06cca9b7'}}" style="{{g + ';' + h}}">{{b}}</text>
|
||||
67
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-badge/u-badge.js
vendored
Normal file
67
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-badge/u-badge.js
vendored
Normal file
@@ -0,0 +1,67 @@
|
||||
"use strict";
|
||||
const uni_modules_uviewPlus_components_uBadge_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-badge",
|
||||
mixins: [uni_modules_uviewPlus_libs_mixin_mpMixin.mpMixin, uni_modules_uviewPlus_components_uBadge_props.props, uni_modules_uviewPlus_libs_mixin_mixin.mixin],
|
||||
computed: {
|
||||
// 是否将badge中心与父组件右上角重合
|
||||
boxStyle() {
|
||||
let style = {};
|
||||
return style;
|
||||
},
|
||||
// 整个组件的样式
|
||||
badgeStyle() {
|
||||
const style = {};
|
||||
if (this.color) {
|
||||
style.color = this.color;
|
||||
}
|
||||
if (this.bgColor && !this.inverted) {
|
||||
style.backgroundColor = this.bgColor;
|
||||
}
|
||||
if (this.absolute) {
|
||||
style.position = "absolute";
|
||||
if (this.offset.length) {
|
||||
const top = this.offset[0];
|
||||
const right = this.offset[1] || top;
|
||||
style.top = uni_modules_uviewPlus_libs_function_index.addUnit(top);
|
||||
style.right = uni_modules_uviewPlus_libs_function_index.addUnit(right);
|
||||
}
|
||||
}
|
||||
return style;
|
||||
},
|
||||
showValue() {
|
||||
switch (this.numberType) {
|
||||
case "overflow":
|
||||
return Number(this.value) > Number(this.max) ? this.max + "+" : this.value;
|
||||
case "ellipsis":
|
||||
return Number(this.value) > Number(this.max) ? "..." : this.value;
|
||||
case "limit":
|
||||
return Number(this.value) > 999 ? Number(this.value) >= 9999 ? Math.floor(this.value / 1e4 * 100) / 100 + "w" : Math.floor(this.value / 1e3 * 100) / 100 + "k" : this.value;
|
||||
default:
|
||||
return Number(this.value);
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
addStyle: uni_modules_uviewPlus_libs_function_index.addStyle
|
||||
}
|
||||
};
|
||||
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
return common_vendor.e({
|
||||
a: _ctx.show && ((Number(_ctx.value) === 0 ? _ctx.showZero : true) || _ctx.isDot)
|
||||
}, _ctx.show && ((Number(_ctx.value) === 0 ? _ctx.showZero : true) || _ctx.isDot) ? {
|
||||
b: common_vendor.t(_ctx.isDot ? "" : $options.showValue),
|
||||
c: common_vendor.n(_ctx.isDot ? "u-badge--dot" : "u-badge--not-dot"),
|
||||
d: common_vendor.n(_ctx.inverted && "u-badge--inverted"),
|
||||
e: common_vendor.n(_ctx.shape === "horn" && "u-badge--horn"),
|
||||
f: common_vendor.n(`u-badge--${_ctx.type}${_ctx.inverted ? "--inverted" : ""}`),
|
||||
g: common_vendor.s($options.addStyle(_ctx.customStyle)),
|
||||
h: common_vendor.s($options.badgeStyle)
|
||||
} : {});
|
||||
}
|
||||
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-06cca9b7"]]);
|
||||
my.createComponent(Component);
|
||||
5
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-badge/u-badge.json
vendored
Normal file
5
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-badge/u-badge.json
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"component": true,
|
||||
"styleIsolation": "apply-shared",
|
||||
"usingComponents": {}
|
||||
}
|
||||
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"
|
||||
}
|
||||
}
|
||||
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;
|
||||
74
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-checkbox/u-checkbox.acss
vendored
Normal file
74
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-checkbox/u-checkbox.acss
vendored
Normal file
@@ -0,0 +1,74 @@
|
||||
.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;
|
||||
}
|
||||
.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"
|
||||
}
|
||||
}
|
||||
37
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-code/props.js
vendored
Normal file
37
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-code/props.js
vendored
Normal file
@@ -0,0 +1,37 @@
|
||||
"use strict";
|
||||
const uni_modules_uviewPlus_libs_config_props = require("../../libs/config/props.js");
|
||||
const props = {
|
||||
props: {
|
||||
// 倒计时总秒数
|
||||
seconds: {
|
||||
type: [String, Number],
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.code.seconds
|
||||
},
|
||||
// 尚未开始时提示
|
||||
startText: {
|
||||
type: String,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.code.startText
|
||||
},
|
||||
// 正在倒计时中的提示
|
||||
changeText: {
|
||||
type: String,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.code.changeText
|
||||
},
|
||||
// 倒计时结束时的提示
|
||||
endText: {
|
||||
type: String,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.code.endText
|
||||
},
|
||||
// 是否在H5刷新或各端返回再进入时继续倒计时
|
||||
keepRunning: {
|
||||
type: Boolean,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.code.keepRunning
|
||||
},
|
||||
// 为了区分多个页面,或者一个页面多个倒计时组件本地存储的继续倒计时变了
|
||||
uniqueKey: {
|
||||
type: String,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.code.uniqueKey
|
||||
}
|
||||
}
|
||||
};
|
||||
exports.props = props;
|
||||
16
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-code/u-code.acss
vendored
Normal file
16
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-code/u-code.acss
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
.u-empty.data-v-8783e3d0,
|
||||
.u-empty__wrap.data-v-8783e3d0,
|
||||
.u-tabs.data-v-8783e3d0,
|
||||
.u-tabs__wrapper.data-v-8783e3d0,
|
||||
.u-tabs__wrapper__scroll-view-wrapper.data-v-8783e3d0,
|
||||
.u-tabs__wrapper__scroll-view.data-v-8783e3d0,
|
||||
.u-tabs__wrapper__nav.data-v-8783e3d0,
|
||||
.u-tabs__wrapper__nav__line.data-v-8783e3d0 {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
flex-shrink: 0;
|
||||
flex-grow: 0;
|
||||
flex-basis: auto;
|
||||
align-items: stretch;
|
||||
align-content: flex-start;
|
||||
}
|
||||
1
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-code/u-code.axml
vendored
Normal file
1
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-code/u-code.axml
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<view class="u-code data-v-8783e3d0"></view>
|
||||
100
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-code/u-code.js
vendored
Normal file
100
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-code/u-code.js
vendored
Normal file
@@ -0,0 +1,100 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../../../common/vendor.js");
|
||||
const uni_modules_uviewPlus_components_uCode_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 _sfc_main = {
|
||||
name: "u-code",
|
||||
mixins: [uni_modules_uviewPlus_libs_mixin_mpMixin.mpMixin, uni_modules_uviewPlus_libs_mixin_mixin.mixin, uni_modules_uviewPlus_components_uCode_props.props],
|
||||
data() {
|
||||
return {
|
||||
secNum: this.seconds,
|
||||
timer: null,
|
||||
canGetCode: true
|
||||
// 是否可以执行验证码操作
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.checkKeepRunning();
|
||||
},
|
||||
watch: {
|
||||
seconds: {
|
||||
immediate: true,
|
||||
handler(n) {
|
||||
this.secNum = n;
|
||||
}
|
||||
}
|
||||
},
|
||||
emits: ["start", "end", "change"],
|
||||
methods: {
|
||||
checkKeepRunning() {
|
||||
let lastTimestamp = Number(common_vendor.index.getStorageSync(this.uniqueKey + "_$uCountDownTimestamp"));
|
||||
if (!lastTimestamp)
|
||||
return this.changeEvent(this.startText);
|
||||
let nowTimestamp = Math.floor(+/* @__PURE__ */ new Date() / 1e3);
|
||||
if (this.keepRunning && lastTimestamp && lastTimestamp > nowTimestamp) {
|
||||
this.secNum = lastTimestamp - nowTimestamp;
|
||||
common_vendor.index.removeStorageSync(this.uniqueKey + "_$uCountDownTimestamp");
|
||||
this.start();
|
||||
} else {
|
||||
this.changeEvent(this.startText);
|
||||
}
|
||||
},
|
||||
// 开始倒计时
|
||||
start() {
|
||||
if (this.timer) {
|
||||
clearInterval(this.timer);
|
||||
this.timer = null;
|
||||
}
|
||||
this.$emit("start");
|
||||
this.canGetCode = false;
|
||||
this.changeEvent(this.changeText.replace(/x|X/, this.secNum));
|
||||
this.timer = setInterval(() => {
|
||||
if (--this.secNum) {
|
||||
this.changeEvent(this.changeText.replace(/x|X/, this.secNum));
|
||||
} else {
|
||||
clearInterval(this.timer);
|
||||
this.timer = null;
|
||||
this.changeEvent(this.endText);
|
||||
this.secNum = this.seconds;
|
||||
this.$emit("end");
|
||||
this.canGetCode = true;
|
||||
}
|
||||
}, 1e3);
|
||||
this.setTimeToStorage();
|
||||
},
|
||||
// 重置,可以让用户再次获取验证码
|
||||
reset() {
|
||||
this.canGetCode = true;
|
||||
clearInterval(this.timer);
|
||||
this.secNum = this.seconds;
|
||||
this.changeEvent(this.endText);
|
||||
},
|
||||
changeEvent(text) {
|
||||
this.$emit("change", text);
|
||||
},
|
||||
// 保存时间戳,为了防止倒计时尚未结束,H5刷新或者各端的右上角返回上一页再进来
|
||||
setTimeToStorage() {
|
||||
if (!this.keepRunning || !this.timer)
|
||||
return;
|
||||
if (this.secNum > 0 && this.secNum < this.seconds) {
|
||||
let nowTimestamp = Math.floor(+/* @__PURE__ */ new Date() / 1e3);
|
||||
common_vendor.index.setStorage({
|
||||
key: this.uniqueKey + "_$uCountDownTimestamp",
|
||||
data: nowTimestamp + Number(this.secNum)
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
// 组件销毁的时候,清除定时器,否则定时器会继续存在,系统不会自动清除
|
||||
beforeUnmount() {
|
||||
this.setTimeToStorage();
|
||||
clearTimeout(this.timer);
|
||||
this.timer = null;
|
||||
}
|
||||
};
|
||||
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
return {};
|
||||
}
|
||||
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-8783e3d0"]]);
|
||||
my.createComponent(Component);
|
||||
5
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-code/u-code.json
vendored
Normal file
5
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-code/u-code.json
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"component": true,
|
||||
"styleIsolation": "apply-shared",
|
||||
"usingComponents": {}
|
||||
}
|
||||
47
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-divider/props.js
vendored
Normal file
47
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-divider/props.js
vendored
Normal file
@@ -0,0 +1,47 @@
|
||||
"use strict";
|
||||
const uni_modules_uviewPlus_libs_config_props = require("../../libs/config/props.js");
|
||||
const props = {
|
||||
props: {
|
||||
// 是否虚线
|
||||
dashed: {
|
||||
type: Boolean,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.divider.dashed
|
||||
},
|
||||
// 是否细线
|
||||
hairline: {
|
||||
type: Boolean,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.divider.hairline
|
||||
},
|
||||
// 是否以点替代文字,优先于text字段起作用
|
||||
dot: {
|
||||
type: Boolean,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.divider.dot
|
||||
},
|
||||
// 内容文本的位置,left-左边,center-中间,right-右边
|
||||
textPosition: {
|
||||
type: String,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.divider.textPosition
|
||||
},
|
||||
// 文本内容
|
||||
text: {
|
||||
type: [String, Number],
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.divider.text
|
||||
},
|
||||
// 文本大小
|
||||
textSize: {
|
||||
type: [String, Number],
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.divider.textSize
|
||||
},
|
||||
// 文本颜色
|
||||
textColor: {
|
||||
type: String,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.divider.textColor
|
||||
},
|
||||
// 线条颜色
|
||||
lineColor: {
|
||||
type: String,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.divider.lineColor
|
||||
}
|
||||
}
|
||||
};
|
||||
exports.props = props;
|
||||
31
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-divider/u-divider.acss
vendored
Normal file
31
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-divider/u-divider.acss
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
.u-empty.data-v-ea022cee,
|
||||
.u-empty__wrap.data-v-ea022cee,
|
||||
.u-tabs.data-v-ea022cee,
|
||||
.u-tabs__wrapper.data-v-ea022cee,
|
||||
.u-tabs__wrapper__scroll-view-wrapper.data-v-ea022cee,
|
||||
.u-tabs__wrapper__scroll-view.data-v-ea022cee,
|
||||
.u-tabs__wrapper__nav.data-v-ea022cee,
|
||||
.u-tabs__wrapper__nav__line.data-v-ea022cee {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
flex-shrink: 0;
|
||||
flex-grow: 0;
|
||||
flex-basis: auto;
|
||||
align-items: stretch;
|
||||
align-content: flex-start;
|
||||
}
|
||||
.u-divider.data-v-ea022cee {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
margin: 15px 0;
|
||||
}
|
||||
.u-divider__text.data-v-ea022cee {
|
||||
margin: 0 15px;
|
||||
}
|
||||
.u-divider__dot.data-v-ea022cee {
|
||||
font-size: 12px;
|
||||
margin: 0 12px;
|
||||
color: #c0c4cc;
|
||||
}
|
||||
1
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-divider/u-divider.axml
vendored
Normal file
1
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-divider/u-divider.axml
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<view class="u-divider data-v-ea022cee" style="{{g}}" onTap="{{h}}"><u-line class="data-v-ea022cee" u-i="ea022cee-0" onVI="__l" u-p="{{a}}"></u-line><text a:if="{{b}}" class="u-divider__dot data-v-ea022cee">●</text><text a:elif="{{c}}" class="u-divider__text data-v-ea022cee" style="{{e}}">{{d}}</text><u-line class="data-v-ea022cee" u-i="ea022cee-1" onVI="__l" u-p="{{f}}"></u-line></view>
|
||||
80
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-divider/u-divider.js
vendored
Normal file
80
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-divider/u-divider.js
vendored
Normal file
@@ -0,0 +1,80 @@
|
||||
"use strict";
|
||||
const uni_modules_uviewPlus_components_uDivider_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-divider",
|
||||
mixins: [uni_modules_uviewPlus_libs_mixin_mpMixin.mpMixin, uni_modules_uviewPlus_libs_mixin_mixin.mixin, uni_modules_uviewPlus_components_uDivider_props.props],
|
||||
computed: {
|
||||
textStyle() {
|
||||
const style = {};
|
||||
style.fontSize = uni_modules_uviewPlus_libs_function_index.addUnit(this.textSize);
|
||||
style.color = this.textColor;
|
||||
return style;
|
||||
},
|
||||
// 左边线条的的样式
|
||||
leftLineStyle() {
|
||||
const style = {};
|
||||
if (this.textPosition === "left") {
|
||||
style.width = "80rpx";
|
||||
} else {
|
||||
style.flex = 1;
|
||||
}
|
||||
return style;
|
||||
},
|
||||
// 右边线条的的样式
|
||||
rightLineStyle() {
|
||||
const style = {};
|
||||
if (this.textPosition === "right") {
|
||||
style.width = "80rpx";
|
||||
} else {
|
||||
style.flex = 1;
|
||||
}
|
||||
return style;
|
||||
}
|
||||
},
|
||||
emits: ["click"],
|
||||
methods: {
|
||||
addStyle: uni_modules_uviewPlus_libs_function_index.addStyle,
|
||||
// divider组件被点击时触发
|
||||
click() {
|
||||
this.$emit("click");
|
||||
}
|
||||
}
|
||||
};
|
||||
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: common_vendor.p({
|
||||
color: _ctx.lineColor,
|
||||
customStyle: $options.leftLineStyle,
|
||||
hairline: _ctx.hairline,
|
||||
dashed: _ctx.dashed
|
||||
}),
|
||||
b: _ctx.dot
|
||||
}, _ctx.dot ? {} : _ctx.text ? {
|
||||
d: common_vendor.t(_ctx.text),
|
||||
e: common_vendor.s($options.textStyle)
|
||||
} : {}, {
|
||||
c: _ctx.text,
|
||||
f: common_vendor.p({
|
||||
color: _ctx.lineColor,
|
||||
customStyle: $options.rightLineStyle,
|
||||
hairline: _ctx.hairline,
|
||||
dashed: _ctx.dashed
|
||||
}),
|
||||
g: common_vendor.s($options.addStyle(_ctx.customStyle)),
|
||||
h: common_vendor.o((...args) => $options.click && $options.click(...args))
|
||||
});
|
||||
}
|
||||
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-ea022cee"]]);
|
||||
my.createComponent(Component);
|
||||
7
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-divider/u-divider.json
vendored
Normal file
7
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-divider/u-divider.json
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"component": true,
|
||||
"styleIsolation": "apply-shared",
|
||||
"usingComponents": {
|
||||
"u-line": "../u-line/u-line"
|
||||
}
|
||||
}
|
||||
44
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-dropdown-item/props.js
vendored
Normal file
44
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-dropdown-item/props.js
vendored
Normal file
@@ -0,0 +1,44 @@
|
||||
"use strict";
|
||||
require("../../libs/config/config.js");
|
||||
require("../../libs/config/props/datetimePicker.js");
|
||||
require("../../libs/config/props/icon.js");
|
||||
require("../../libs/config/props/link.js");
|
||||
require("../../libs/config/props/loadingIcon.js");
|
||||
require("../../libs/config/props/navbar.js");
|
||||
const props = {
|
||||
props: {
|
||||
// 当前选中项的value值
|
||||
modelValue: {
|
||||
type: [Number, String, Array],
|
||||
default: ""
|
||||
},
|
||||
// 菜单项标题
|
||||
title: {
|
||||
type: [String, Number],
|
||||
default: ""
|
||||
},
|
||||
// 选项数据,如果传入了默认slot,此参数无效
|
||||
options: {
|
||||
type: Array,
|
||||
default() {
|
||||
return [];
|
||||
}
|
||||
},
|
||||
// 是否禁用此菜单项
|
||||
disabled: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
// 下拉弹窗的高度
|
||||
height: {
|
||||
type: [Number, String],
|
||||
default: "auto"
|
||||
},
|
||||
// 点击遮罩是否可以收起弹窗
|
||||
closeOnClickOverlay: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
}
|
||||
}
|
||||
};
|
||||
exports.props = props;
|
||||
@@ -0,0 +1,19 @@
|
||||
.u-empty.data-v-2ab01489,
|
||||
.u-empty__wrap.data-v-2ab01489,
|
||||
.u-tabs.data-v-2ab01489,
|
||||
.u-tabs__wrapper.data-v-2ab01489,
|
||||
.u-tabs__wrapper__scroll-view-wrapper.data-v-2ab01489,
|
||||
.u-tabs__wrapper__scroll-view.data-v-2ab01489,
|
||||
.u-tabs__wrapper__nav.data-v-2ab01489,
|
||||
.u-tabs__wrapper__nav__line.data-v-2ab01489 {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
flex-shrink: 0;
|
||||
flex-grow: 0;
|
||||
flex-basis: auto;
|
||||
align-items: stretch;
|
||||
align-content: flex-start;
|
||||
}
|
||||
.u-dropdown-item__scroll.data-v-2ab01489 {
|
||||
background: #ffffff;
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
<view a:if="{{a}}" class="u-dropdown-item data-v-2ab01489" catchTouchMove="{{e}}" catchTap="{{f}}"><block a:if="{{b}}"><scroll-view class="u-dropdown-item__scroll data-v-2ab01489" scroll-y="true" style="{{'height:' + d}}"><view class="u-dropdown-item__options data-v-2ab01489"><up-cell-group class="data-v-2ab01489" u-s="{{['d']}}" u-i="2ab01489-0" onVI="__l"><up-cell a:for="{{c}}" a:for-item="item" a:key="e" class="data-v-2ab01489" u-s="{{['d']}}" onClick="{{item.d}}" u-i="{{item.f}}" onVI="__l" u-p="{{item.g}}"><up-icon a:if="{{item.a}}" class="data-v-2ab01489" u-i="{{item.b}}" onVI="__l" u-p="{{item.c}}"></up-icon></up-cell></up-cell-group></view></scroll-view></block><slot a:else/></view>
|
||||
121
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-dropdown-item/u-dropdown-item.js
vendored
Normal file
121
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-dropdown-item/u-dropdown-item.js
vendored
Normal file
@@ -0,0 +1,121 @@
|
||||
"use strict";
|
||||
const uni_modules_uviewPlus_components_uDropdownItem_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-dropdown-item",
|
||||
mixins: [uni_modules_uviewPlus_libs_mixin_mpMixin.mpMixin, uni_modules_uviewPlus_libs_mixin_mixin.mixin, uni_modules_uviewPlus_components_uDropdownItem_props.props],
|
||||
options: {
|
||||
styleIsolation: "shared"
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
active: false,
|
||||
// 当前项是否处于展开状态
|
||||
activeColor: "#2979ff",
|
||||
// 激活时左边文字和右边对勾图标的颜色
|
||||
inactiveColor: "#606266"
|
||||
// 未激活时左边文字和右边对勾图标的颜色
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
// 监听props是否发生了变化,有些值需要传递给父组件u-dropdown,无法双向绑定
|
||||
propsChange() {
|
||||
return `${this.title}-${this.disabled}`;
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
propsChange(n) {
|
||||
if (this.parent)
|
||||
this.parent.init();
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.parent = false;
|
||||
},
|
||||
emits: ["update:modelValue", "change"],
|
||||
methods: {
|
||||
addUnit: uni_modules_uviewPlus_libs_function_index.addUnit,
|
||||
init() {
|
||||
let parent = uni_modules_uviewPlus_libs_function_index.$parent.call(this, "u-dropdown");
|
||||
if (parent) {
|
||||
this.parent = parent;
|
||||
this.activeColor = parent.activeColor;
|
||||
this.inactiveColor = parent.inactiveColor;
|
||||
let exist = parent.children.find((val) => {
|
||||
return this === val;
|
||||
});
|
||||
if (!exist)
|
||||
parent.children.push(this);
|
||||
if (parent.children.length == 1)
|
||||
this.active = true;
|
||||
parent.menuList.push({
|
||||
title: this.title,
|
||||
disabled: this.disabled
|
||||
});
|
||||
}
|
||||
},
|
||||
// cell被点击
|
||||
cellClick(value) {
|
||||
this.$emit("update:modelValue", value);
|
||||
this.parent.close();
|
||||
this.$emit("change", value);
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.init();
|
||||
}
|
||||
};
|
||||
if (!Array) {
|
||||
const _easycom_up_icon2 = common_vendor.resolveComponent("up-icon");
|
||||
const _easycom_up_cell2 = common_vendor.resolveComponent("up-cell");
|
||||
const _easycom_up_cell_group2 = common_vendor.resolveComponent("up-cell-group");
|
||||
(_easycom_up_icon2 + _easycom_up_cell2 + _easycom_up_cell_group2)();
|
||||
}
|
||||
const _easycom_up_icon = () => "../u-icon/u-icon.js";
|
||||
const _easycom_up_cell = () => "../u-cell/u-cell.js";
|
||||
const _easycom_up_cell_group = () => "../u-cell-group/u-cell-group.js";
|
||||
if (!Math) {
|
||||
(_easycom_up_icon + _easycom_up_cell + _easycom_up_cell_group)();
|
||||
}
|
||||
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
return common_vendor.e({
|
||||
a: $data.active
|
||||
}, $data.active ? common_vendor.e({
|
||||
b: !_ctx.$slots.default && !_ctx.$slots.$default
|
||||
}, !_ctx.$slots.default && !_ctx.$slots.$default ? {
|
||||
c: common_vendor.f(_ctx.options, (item, index, i0) => {
|
||||
return common_vendor.e({
|
||||
a: _ctx.modelValue == item.value
|
||||
}, _ctx.modelValue == item.value ? {
|
||||
b: "2ab01489-2-" + i0 + "," + ("2ab01489-1-" + i0),
|
||||
c: common_vendor.p({
|
||||
name: "checkbox-mark",
|
||||
color: $data.activeColor,
|
||||
size: "32"
|
||||
})
|
||||
} : {}, {
|
||||
d: common_vendor.o(($event) => $options.cellClick(item.value)),
|
||||
e: index,
|
||||
f: "2ab01489-1-" + i0 + ",2ab01489-0",
|
||||
g: common_vendor.p({
|
||||
arrow: false,
|
||||
title: item.label,
|
||||
["title-style"]: {
|
||||
color: _ctx.modelValue == item.value ? $data.activeColor : $data.inactiveColor
|
||||
}
|
||||
})
|
||||
});
|
||||
}),
|
||||
d: $options.addUnit(_ctx.height)
|
||||
} : {}, {
|
||||
e: common_vendor.o(() => {
|
||||
}),
|
||||
f: common_vendor.o(() => {
|
||||
})
|
||||
}) : {});
|
||||
}
|
||||
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-2ab01489"]]);
|
||||
my.createComponent(Component);
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"component": true,
|
||||
"styleIsolation": "shared",
|
||||
"usingComponents": {
|
||||
"up-icon": "../u-icon/u-icon",
|
||||
"up-cell": "../u-cell/u-cell",
|
||||
"up-cell-group": "../u-cell-group/u-cell-group"
|
||||
}
|
||||
}
|
||||
67
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-dropdown/props.js
vendored
Normal file
67
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-dropdown/props.js
vendored
Normal file
@@ -0,0 +1,67 @@
|
||||
"use strict";
|
||||
require("../../libs/config/config.js");
|
||||
require("../../libs/config/props/datetimePicker.js");
|
||||
require("../../libs/config/props/icon.js");
|
||||
require("../../libs/config/props/link.js");
|
||||
require("../../libs/config/props/loadingIcon.js");
|
||||
require("../../libs/config/props/navbar.js");
|
||||
const props = {
|
||||
props: {
|
||||
// 菜单标题和选项的激活态颜色
|
||||
activeColor: {
|
||||
type: String,
|
||||
default: "#2979ff"
|
||||
},
|
||||
// 菜单标题和选项的未激活态颜色
|
||||
inactiveColor: {
|
||||
type: String,
|
||||
default: "#606266"
|
||||
},
|
||||
// 点击遮罩是否关闭菜单
|
||||
closeOnClickMask: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
// 点击当前激活项标题是否关闭菜单
|
||||
closeOnClickSelf: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
// 过渡时间
|
||||
duration: {
|
||||
type: [Number, String],
|
||||
default: 300
|
||||
},
|
||||
// 标题菜单的高度
|
||||
height: {
|
||||
type: [Number, String],
|
||||
default: 40
|
||||
},
|
||||
// 是否显示下边框
|
||||
borderBottom: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
// 标题的字体大小
|
||||
titleSize: {
|
||||
type: [Number, String],
|
||||
default: 14
|
||||
},
|
||||
// 下拉出来的内容部分的圆角值
|
||||
borderRadius: {
|
||||
type: [Number, String],
|
||||
default: 0
|
||||
},
|
||||
// 菜单右侧的icon图标
|
||||
menuIcon: {
|
||||
type: String,
|
||||
default: "arrow-down"
|
||||
},
|
||||
// 菜单右侧图标的大小
|
||||
menuIconSize: {
|
||||
type: [Number, String],
|
||||
default: 14
|
||||
}
|
||||
}
|
||||
};
|
||||
exports.props = props;
|
||||
76
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-dropdown/u-dropdown.acss
vendored
Normal file
76
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-dropdown/u-dropdown.acss
vendored
Normal file
@@ -0,0 +1,76 @@
|
||||
.u-empty.data-v-029e9a16,
|
||||
.u-empty__wrap.data-v-029e9a16,
|
||||
.u-tabs.data-v-029e9a16,
|
||||
.u-tabs__wrapper.data-v-029e9a16,
|
||||
.u-tabs__wrapper__scroll-view-wrapper.data-v-029e9a16,
|
||||
.u-tabs__wrapper__scroll-view.data-v-029e9a16,
|
||||
.u-tabs__wrapper__nav.data-v-029e9a16,
|
||||
.u-tabs__wrapper__nav__line.data-v-029e9a16 {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
flex-shrink: 0;
|
||||
flex-grow: 0;
|
||||
flex-basis: auto;
|
||||
align-items: stretch;
|
||||
align-content: flex-start;
|
||||
}
|
||||
.u-dropdown.data-v-029e9a16 {
|
||||
flex: 1;
|
||||
width: 100%;
|
||||
position: relative;
|
||||
}
|
||||
.u-dropdown__menu.data-v-029e9a16 {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
position: relative;
|
||||
z-index: 11;
|
||||
height: 80rpx;
|
||||
}
|
||||
.u-dropdown__menu__item.data-v-029e9a16 {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.u-dropdown__menu__item .u-flex-row.data-v-029e9a16 {
|
||||
flex-direction: row;
|
||||
}
|
||||
.u-dropdown__menu__item__text.data-v-029e9a16 {
|
||||
font-size: 28rpx;
|
||||
color: #606266;
|
||||
}
|
||||
.u-dropdown__menu__item__arrow.data-v-029e9a16 {
|
||||
margin-left: 6rpx;
|
||||
transition: transform 0.3s;
|
||||
align-items: center;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
}
|
||||
.u-dropdown__menu__item__arrow--rotate.data-v-029e9a16 {
|
||||
transform: rotate(180deg);
|
||||
}
|
||||
.u-dropdown__content.data-v-029e9a16 {
|
||||
position: absolute;
|
||||
z-index: 8;
|
||||
width: 100%;
|
||||
left: 0px;
|
||||
bottom: 0;
|
||||
overflow: hidden;
|
||||
}
|
||||
.u-dropdown__content__mask.data-v-029e9a16 {
|
||||
position: absolute;
|
||||
z-index: 9;
|
||||
background: rgba(0, 0, 0, 0.3);
|
||||
width: 100%;
|
||||
left: 0;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
}
|
||||
.u-dropdown__content__popup.data-v-029e9a16 {
|
||||
position: relative;
|
||||
z-index: 10;
|
||||
transition: all 0.3s;
|
||||
transform: translate3D(0, -100%, 0);
|
||||
overflow: hidden;
|
||||
}
|
||||
1
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-dropdown/u-dropdown.axml
vendored
Normal file
1
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-dropdown/u-dropdown.axml
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<view class="u-dropdown data-v-029e9a16"><view style="{{'height:' + c}}" class="{{('u-dropdown__menu') + ' ' + 'data-v-029e9a16' + ' ' + (d && 'u-border-bottom')}}"><view a:for="{{a}}" a:for-item="item" a:key="f" class="u-dropdown__menu__item data-v-029e9a16" catchTap="{{item.g}}"><view class="u-flex u-flex-row data-v-029e9a16"><text class="u-dropdown__menu__item__text data-v-029e9a16" style="{{'color:' + item.b + ';' + ('font-size:' + b)}}">{{item.a}}</text><view class="{{('u-dropdown__menu__item__arrow') + ' ' + 'data-v-029e9a16' + ' ' + (item.e && 'u-dropdown__menu__item__arrow--rotate')}}"><u-icon class="data-v-029e9a16" u-i="{{item.c}}" onVI="__l" u-p="{{item.d}}"></u-icon></view></view></view></view><view class="u-dropdown__content data-v-029e9a16" style="{{g + ';' + h}}" onTap="{{i}}" catchTouchMove="{{j}}"><view catchTap="{{e}}" class="u-dropdown__content__popup data-v-029e9a16" style="{{f}}"><slot></slot></view><view class="u-dropdown__content__mask data-v-029e9a16"></view></view></view>
|
||||
158
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-dropdown/u-dropdown.js
vendored
Normal file
158
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-dropdown/u-dropdown.js
vendored
Normal file
@@ -0,0 +1,158 @@
|
||||
"use strict";
|
||||
const uni_modules_uviewPlus_components_uDropdown_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-dropdown",
|
||||
mixins: [uni_modules_uviewPlus_libs_mixin_mpMixin.mpMixin, uni_modules_uviewPlus_libs_mixin_mixin.mixin, uni_modules_uviewPlus_components_uDropdown_props.props],
|
||||
data() {
|
||||
return {
|
||||
showDropdown: true,
|
||||
// 是否打开下来菜单,
|
||||
menuList: [],
|
||||
// 显示的菜单
|
||||
active: false,
|
||||
// 下拉菜单的状态
|
||||
// 当前是第几个菜单处于激活状态,小程序中此处不能写成false或者"",否则后续将current赋值为0,
|
||||
// 无能的TX没有使用===而是使用==判断,导致程序认为前后二者没有变化,从而不会触发视图更新
|
||||
current: 99999,
|
||||
// 外层内容的样式,初始时处于底层,且透明
|
||||
contentStyle: {
|
||||
zIndex: -1,
|
||||
opacity: 0
|
||||
},
|
||||
// 让某个菜单保持高亮的状态
|
||||
highlightIndex: 99999,
|
||||
contentHeight: 0
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
// 下拉出来部分的样式
|
||||
popupStyle() {
|
||||
let style = {};
|
||||
style.transform = `translateY(${this.active ? 0 : "-100%"})`;
|
||||
style["transition-duration"] = this.duration / 1e3 + "s";
|
||||
style.borderRadius = `0 0 ${uni_modules_uviewPlus_libs_function_index.addUnit(this.borderRadius)} ${uni_modules_uviewPlus_libs_function_index.addUnit(this.borderRadius)}`;
|
||||
return style;
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.children = [];
|
||||
},
|
||||
mounted() {
|
||||
this.getContentHeight();
|
||||
},
|
||||
emits: ["open", "close"],
|
||||
methods: {
|
||||
addUnit: uni_modules_uviewPlus_libs_function_index.addUnit,
|
||||
init() {
|
||||
this.menuList = [];
|
||||
this.children.map((child) => {
|
||||
child.init();
|
||||
});
|
||||
},
|
||||
// 点击菜单
|
||||
menuClick(index) {
|
||||
if (this.menuList[index].disabled)
|
||||
return;
|
||||
if (index === this.current && this.closeOnClickSelf) {
|
||||
this.close();
|
||||
setTimeout(() => {
|
||||
this.children[index].active = false;
|
||||
}, this.duration);
|
||||
return;
|
||||
}
|
||||
this.open(index);
|
||||
},
|
||||
// 打开下拉菜单
|
||||
open(index) {
|
||||
if (this.contentHeight < 1)
|
||||
this.getContentHeight();
|
||||
this.contentStyle = {
|
||||
zIndex: 11
|
||||
};
|
||||
this.active = true;
|
||||
this.current = index;
|
||||
this.children.map((val, idx) => {
|
||||
val.active = index == idx ? true : false;
|
||||
});
|
||||
this.$emit("open", this.current);
|
||||
},
|
||||
// 设置下拉菜单处于收起状态
|
||||
close() {
|
||||
this.$emit("close", this.current);
|
||||
this.active = false;
|
||||
this.current = 99999;
|
||||
this.contentStyle = {
|
||||
zIndex: -1,
|
||||
opacity: 0
|
||||
};
|
||||
},
|
||||
// 点击遮罩
|
||||
maskClick() {
|
||||
if (!this.closeOnClickMask)
|
||||
return;
|
||||
this.close();
|
||||
},
|
||||
// 外部手动设置某个菜单高亮
|
||||
highlight(index = void 0) {
|
||||
this.highlightIndex = index !== void 0 ? index : 99999;
|
||||
},
|
||||
// 获取下拉菜单内容的高度
|
||||
getContentHeight() {
|
||||
let windowHeight = uni_modules_uviewPlus_libs_function_index.sys().windowHeight;
|
||||
this.$uGetRect(".u-dropdown__menu").then((res) => {
|
||||
this.contentHeight = windowHeight - res.bottom;
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
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.f($data.menuList, (item, index, i0) => {
|
||||
return {
|
||||
a: common_vendor.t(item.title),
|
||||
b: item.disabled ? "#c0c4cc" : index === $data.current || $data.highlightIndex == index ? _ctx.activeColor : _ctx.inactiveColor,
|
||||
c: "029e9a16-0-" + i0,
|
||||
d: common_vendor.p({
|
||||
["custom-style"]: {
|
||||
display: "flex"
|
||||
},
|
||||
name: _ctx.menuIcon,
|
||||
size: $options.addUnit(_ctx.menuIconSize),
|
||||
color: index === $data.current || $data.highlightIndex == index ? _ctx.activeColor : "#c0c4cc"
|
||||
}),
|
||||
e: index === $data.current ? 1 : "",
|
||||
f: index,
|
||||
g: common_vendor.o(($event) => $options.menuClick(index))
|
||||
};
|
||||
}),
|
||||
b: $options.addUnit(_ctx.titleSize),
|
||||
c: $options.addUnit(_ctx.height),
|
||||
d: _ctx.borderBottom ? 1 : "",
|
||||
e: common_vendor.o(() => {
|
||||
}),
|
||||
f: common_vendor.s($options.popupStyle),
|
||||
g: common_vendor.s($data.contentStyle),
|
||||
h: common_vendor.s({
|
||||
transition: `opacity ${_ctx.duration / 1e3}s linear`,
|
||||
top: $options.addUnit(_ctx.height),
|
||||
height: $data.contentHeight + "px"
|
||||
}),
|
||||
i: common_vendor.o((...args) => $options.maskClick && $options.maskClick(...args)),
|
||||
j: common_vendor.o(() => {
|
||||
})
|
||||
};
|
||||
}
|
||||
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-029e9a16"]]);
|
||||
my.createComponent(Component);
|
||||
7
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-dropdown/u-dropdown.json
vendored
Normal file
7
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-dropdown/u-dropdown.json
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"component": true,
|
||||
"styleIsolation": "apply-shared",
|
||||
"usingComponents": {
|
||||
"u-icon": "../u-icon/u-icon"
|
||||
}
|
||||
}
|
||||
17
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-grid-item/props.js
vendored
Normal file
17
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-grid-item/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: {
|
||||
// 宫格的name
|
||||
name: {
|
||||
type: [String, Number, null],
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.gridItem.name
|
||||
},
|
||||
// 背景颜色
|
||||
bgColor: {
|
||||
type: String,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.gridItem.bgColor
|
||||
}
|
||||
}
|
||||
};
|
||||
exports.props = props;
|
||||
29
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-grid-item/u-grid-item.acss
vendored
Normal file
29
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-grid-item/u-grid-item.acss
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
.u-empty.data-v-0a78094b,
|
||||
.u-empty__wrap.data-v-0a78094b,
|
||||
.u-tabs.data-v-0a78094b,
|
||||
.u-tabs__wrapper.data-v-0a78094b,
|
||||
.u-tabs__wrapper__scroll-view-wrapper.data-v-0a78094b,
|
||||
.u-tabs__wrapper__scroll-view.data-v-0a78094b,
|
||||
.u-tabs__wrapper__nav.data-v-0a78094b,
|
||||
.u-tabs__wrapper__nav__line.data-v-0a78094b {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
flex-shrink: 0;
|
||||
flex-grow: 0;
|
||||
flex-basis: auto;
|
||||
align-items: stretch;
|
||||
align-content: flex-start;
|
||||
}
|
||||
.u-grid-item.data-v-0a78094b {
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
position: relative;
|
||||
flex-direction: column;
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
position: relative;
|
||||
float: left;
|
||||
}
|
||||
.u-grid-item--hover-class.data-v-0a78094b {
|
||||
opacity: 0.5;
|
||||
}
|
||||
1
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-grid-item/u-grid-item.axml
vendored
Normal file
1
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-grid-item/u-grid-item.axml
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<view a:if="{{a}}" hover-class="u-grid-item--hover-class" hover-stay-time="{{200}}" onTap="{{b}}" class="{{('u-grid-item') + ' ' + 'data-v-0a78094b' + ' ' + c}}" style="{{d}}"><slot/></view>
|
||||
112
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-grid-item/u-grid-item.js
vendored
Normal file
112
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-grid-item/u-grid-item.js
vendored
Normal file
@@ -0,0 +1,112 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../../../common/vendor.js");
|
||||
const uni_modules_uviewPlus_components_uGridItem_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-grid-item",
|
||||
mixins: [uni_modules_uviewPlus_libs_mixin_mpMixin.mpMixin, uni_modules_uviewPlus_libs_mixin_mixin.mixin, uni_modules_uviewPlus_components_uGridItem_props.props],
|
||||
data() {
|
||||
return {
|
||||
parentData: {
|
||||
col: 0,
|
||||
// 父组件划分的宫格数
|
||||
border: true
|
||||
// 是否显示边框,根据父组件决定
|
||||
},
|
||||
classes: []
|
||||
// 类名集合,用于判断是否显示右边和下边框
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.init();
|
||||
},
|
||||
emits: ["click"],
|
||||
// 微信小程序中 options 选项
|
||||
computed: {
|
||||
// vue下放到computed中,否则会因为延时造成闪烁
|
||||
width() {
|
||||
if (this.parentData.col > 0) {
|
||||
return 100 / Number(this.parentData.col) + "%";
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
},
|
||||
itemStyle() {
|
||||
const style = {
|
||||
background: this.bgColor,
|
||||
width: this.width
|
||||
};
|
||||
return uni_modules_uviewPlus_libs_function_index.deepMerge(style, uni_modules_uviewPlus_libs_function_index.addStyle(this.customStyle));
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
init() {
|
||||
common_vendor.index.$on("$uGridItem", () => {
|
||||
this.gridItemClasses();
|
||||
});
|
||||
this.updateParentData();
|
||||
common_vendor.index.$emit("$uGridItem");
|
||||
this.gridItemClasses();
|
||||
},
|
||||
// 获取父组件的参数
|
||||
updateParentData() {
|
||||
this.getParentData("u-grid");
|
||||
},
|
||||
clickHandler() {
|
||||
var _a;
|
||||
let name = this.name;
|
||||
const children = (_a = this.parent) == null ? void 0 : _a.children;
|
||||
if (children && this.name === null) {
|
||||
name = children.findIndex((child) => child === this);
|
||||
}
|
||||
this.parent && this.parent.childClick(name);
|
||||
this.$emit("click", name);
|
||||
},
|
||||
async getItemWidth() {
|
||||
let width = 0;
|
||||
if (this.parent) {
|
||||
const parentWidth = await this.getParentWidth();
|
||||
width = parentWidth / Number(this.parentData.col) + "px";
|
||||
}
|
||||
this.width = width;
|
||||
},
|
||||
// 获取父元素的尺寸
|
||||
getParentWidth() {
|
||||
},
|
||||
gridItemClasses() {
|
||||
if (this.parentData.border) {
|
||||
let classes = [];
|
||||
this.parent.children.map((child, index) => {
|
||||
if (this === child) {
|
||||
const len = this.parent.children.length;
|
||||
if ((index + 1) % this.parentData.col !== 0 && index + 1 !== len) {
|
||||
classes.push("u-border-right");
|
||||
}
|
||||
const lessNum = len % this.parentData.col === 0 ? this.parentData.col : len % this.parentData.col;
|
||||
if (index < len - lessNum) {
|
||||
classes.push("u-border-bottom");
|
||||
}
|
||||
}
|
||||
});
|
||||
classes = classes.join(" ");
|
||||
this.classes = classes;
|
||||
}
|
||||
}
|
||||
},
|
||||
beforeUnmount() {
|
||||
common_vendor.index.$off("$uGridItem");
|
||||
}
|
||||
};
|
||||
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
return common_vendor.e({
|
||||
a: $data.parentData.col > 0
|
||||
}, $data.parentData.col > 0 ? {
|
||||
b: common_vendor.o((...args) => $options.clickHandler && $options.clickHandler(...args)),
|
||||
c: common_vendor.n($data.classes),
|
||||
d: common_vendor.s($options.itemStyle)
|
||||
} : {});
|
||||
}
|
||||
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-0a78094b"]]);
|
||||
my.createComponent(Component);
|
||||
5
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-grid-item/u-grid-item.json
vendored
Normal file
5
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-grid-item/u-grid-item.json
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"component": true,
|
||||
"styleIsolation": "apply-shared",
|
||||
"usingComponents": {}
|
||||
}
|
||||
22
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-grid/props.js
vendored
Normal file
22
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-grid/props.js
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
"use strict";
|
||||
const uni_modules_uviewPlus_libs_config_props = require("../../libs/config/props.js");
|
||||
const props = {
|
||||
props: {
|
||||
// 分成几列
|
||||
col: {
|
||||
type: [String, Number],
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.grid.col
|
||||
},
|
||||
// 是否显示边框
|
||||
border: {
|
||||
type: Boolean,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.grid.border
|
||||
},
|
||||
// 宫格对齐方式,表现为数量少的时候,靠左,居中,还是靠右
|
||||
align: {
|
||||
type: String,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.grid.align
|
||||
}
|
||||
}
|
||||
};
|
||||
exports.props = props;
|
||||
28
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-grid/u-grid.acss
vendored
Normal file
28
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-grid/u-grid.acss
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
.u-empty.data-v-10b668c8,
|
||||
.u-empty__wrap.data-v-10b668c8,
|
||||
.u-tabs.data-v-10b668c8,
|
||||
.u-tabs__wrapper.data-v-10b668c8,
|
||||
.u-tabs__wrapper__scroll-view-wrapper.data-v-10b668c8,
|
||||
.u-tabs__wrapper__scroll-view.data-v-10b668c8,
|
||||
.u-tabs__wrapper__nav.data-v-10b668c8,
|
||||
.u-tabs__wrapper__nav__line.data-v-10b668c8 {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
flex-shrink: 0;
|
||||
flex-grow: 0;
|
||||
flex-basis: auto;
|
||||
align-items: stretch;
|
||||
align-content: flex-start;
|
||||
}
|
||||
.u-grid.data-v-10b668c8 {
|
||||
width: 100%;
|
||||
position: relative;
|
||||
box-sizing: border-box;
|
||||
overflow: hidden;
|
||||
display: block;
|
||||
justify-content: center;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
}
|
||||
1
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-grid/u-grid.axml
vendored
Normal file
1
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-grid/u-grid.axml
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<view class="u-grid data-v-10b668c8" ref="u-grid" style="{{a}}"><slot/></view>
|
||||
69
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-grid/u-grid.js
vendored
Normal file
69
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-grid/u-grid.js
vendored
Normal file
@@ -0,0 +1,69 @@
|
||||
"use strict";
|
||||
const uni_modules_uviewPlus_components_uGrid_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-grid",
|
||||
mixins: [uni_modules_uviewPlus_libs_mixin_mpMixin.mpMixin, uni_modules_uviewPlus_libs_mixin_mixin.mixin, uni_modules_uviewPlus_components_uGrid_props.props],
|
||||
data() {
|
||||
return {
|
||||
index: 0,
|
||||
width: 0
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
// 当父组件需要子组件需要共享的参数发生了变化,手动通知子组件
|
||||
parentData() {
|
||||
if (this.children.length) {
|
||||
this.children.map((child) => {
|
||||
typeof child.updateParentData == "function" && child.updateParentData();
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.children = [];
|
||||
},
|
||||
computed: {
|
||||
// 计算父组件的值是否发生变化
|
||||
parentData() {
|
||||
return [this.hoverClass, this.col, this.size, this.border];
|
||||
},
|
||||
// 宫格对齐方式
|
||||
gridStyle() {
|
||||
let style = {};
|
||||
switch (this.align) {
|
||||
case "left":
|
||||
style.justifyContent = "flex-start";
|
||||
break;
|
||||
case "center":
|
||||
style.justifyContent = "center";
|
||||
break;
|
||||
case "right":
|
||||
style.justifyContent = "flex-end";
|
||||
break;
|
||||
default:
|
||||
style.justifyContent = "flex-start";
|
||||
}
|
||||
return uni_modules_uviewPlus_libs_function_index.deepMerge(style, uni_modules_uviewPlus_libs_function_index.addStyle(this.customStyle));
|
||||
}
|
||||
},
|
||||
emits: ["click"],
|
||||
// 防止事件执行两次
|
||||
// 20240409发现抖音小程序如果开启virtualHost会出现严重问题,几乎所有事件包括created等生命周期事件全部失效。
|
||||
methods: {
|
||||
// 此方法由u-grid-item触发,用于在u-grid发出事件
|
||||
childClick(name) {
|
||||
this.$emit("click", name);
|
||||
}
|
||||
}
|
||||
};
|
||||
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
return {
|
||||
a: common_vendor.s($options.gridStyle)
|
||||
};
|
||||
}
|
||||
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-10b668c8"]]);
|
||||
my.createComponent(Component);
|
||||
5
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-grid/u-grid.json
vendored
Normal file
5
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-grid/u-grid.json
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"component": true,
|
||||
"styleIsolation": "apply-shared",
|
||||
"usingComponents": {}
|
||||
}
|
||||
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="{{r}}" class="{{('u-icon') + ' ' + 'data-v-ac70166d' + ' ' + s}}"><image a:if="{{a}}" class="u-icon__img data-v-ac70166d" src="{{b}}" mode="{{'widthFix'}}" style="{{c + ';' + d}}"></image><text a:else class="{{('u-icon__icon') + ' ' + 'data-v-ac70166d' + ' ' + f}}" style="{{g + ';' + h}}" hover-class="{{i}}">{{e}}</text><text a:if="{{j}}" class="u-icon__label data-v-ac70166d" style="{{'color:' + l + ';' + ('font-size:' + m) + ';' + ('margin-left:' + n) + ';' + ('margin-top:' + o) + ';' + ('margin-right:' + p) + ';' + ('margin-bottom:' + q)}}">{{k}}</text></view>
|
||||
98
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-icon/u-icon.js
vendored
Normal file
98
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-icon/u-icon.js
vendored
Normal file
@@ -0,0 +1,98 @@
|
||||
"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: common_vendor.s($options.imgStyle),
|
||||
d: common_vendor.s($options.addStyle(_ctx.customStyle))
|
||||
} : {
|
||||
e: common_vendor.t($options.icon),
|
||||
f: common_vendor.n($options.uClasses),
|
||||
g: common_vendor.s($options.iconStyle),
|
||||
h: common_vendor.s($options.addStyle(_ctx.customStyle)),
|
||||
i: _ctx.hoverClass
|
||||
}, {
|
||||
j: _ctx.label !== ""
|
||||
}, _ctx.label !== "" ? {
|
||||
k: common_vendor.t(_ctx.label),
|
||||
l: _ctx.labelColor,
|
||||
m: $options.addUnit(_ctx.labelSize),
|
||||
n: _ctx.labelPos == "right" ? $options.addUnit(_ctx.space) : 0,
|
||||
o: _ctx.labelPos == "bottom" ? $options.addUnit(_ctx.space) : 0,
|
||||
p: _ctx.labelPos == "left" ? $options.addUnit(_ctx.space) : 0,
|
||||
q: _ctx.labelPos == "top" ? $options.addUnit(_ctx.space) : 0
|
||||
} : {}, {
|
||||
r: common_vendor.o((...args) => $options.clickHandler && $options.clickHandler(...args)),
|
||||
s: 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": {}
|
||||
}
|
||||
87
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-image/props.js
vendored
Normal file
87
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-image/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: {
|
||||
// 图片地址
|
||||
src: {
|
||||
type: String,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.image.src
|
||||
},
|
||||
// 裁剪模式
|
||||
mode: {
|
||||
type: String,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.image.mode
|
||||
},
|
||||
// 宽度,单位任意
|
||||
width: {
|
||||
type: [String, Number],
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.image.width
|
||||
},
|
||||
// 高度,单位任意
|
||||
height: {
|
||||
type: [String, Number],
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.image.height
|
||||
},
|
||||
// 图片形状,circle-圆形,square-方形
|
||||
shape: {
|
||||
type: String,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.image.shape
|
||||
},
|
||||
// 圆角,单位任意
|
||||
radius: {
|
||||
type: [String, Number],
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.image.radius
|
||||
},
|
||||
// 是否懒加载,微信小程序、App、百度小程序、字节跳动小程序
|
||||
lazyLoad: {
|
||||
type: Boolean,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.image.lazyLoad
|
||||
},
|
||||
// 开启长按图片显示识别微信小程序码菜单
|
||||
showMenuByLongpress: {
|
||||
type: Boolean,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.image.showMenuByLongpress
|
||||
},
|
||||
// 加载中的图标,或者小图片
|
||||
loadingIcon: {
|
||||
type: String,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.image.loadingIcon
|
||||
},
|
||||
// 加载失败的图标,或者小图片
|
||||
errorIcon: {
|
||||
type: String,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.image.errorIcon
|
||||
},
|
||||
// 是否显示加载中的图标或者自定义的slot
|
||||
showLoading: {
|
||||
type: Boolean,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.image.showLoading
|
||||
},
|
||||
// 是否显示加载错误的图标或者自定义的slot
|
||||
showError: {
|
||||
type: Boolean,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.image.showError
|
||||
},
|
||||
// 是否需要淡入效果
|
||||
fade: {
|
||||
type: Boolean,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.image.fade
|
||||
},
|
||||
// 只支持网络资源,只对微信小程序有效
|
||||
webp: {
|
||||
type: Boolean,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.image.webp
|
||||
},
|
||||
// 过渡时间,单位ms
|
||||
duration: {
|
||||
type: [String, Number],
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.image.duration
|
||||
},
|
||||
// 背景颜色,用于深色页面加载图片时,为了和背景色融合
|
||||
bgColor: {
|
||||
type: String,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.image.bgColor
|
||||
}
|
||||
}
|
||||
};
|
||||
exports.props = props;
|
||||
38
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-image/u-image.acss
vendored
Normal file
38
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-image/u-image.acss
vendored
Normal file
@@ -0,0 +1,38 @@
|
||||
.u-empty.data-v-abebd402,
|
||||
.u-empty__wrap.data-v-abebd402,
|
||||
.u-tabs.data-v-abebd402,
|
||||
.u-tabs__wrapper.data-v-abebd402,
|
||||
.u-tabs__wrapper__scroll-view-wrapper.data-v-abebd402,
|
||||
.u-tabs__wrapper__scroll-view.data-v-abebd402,
|
||||
.u-tabs__wrapper__nav.data-v-abebd402,
|
||||
.u-tabs__wrapper__nav__line.data-v-abebd402 {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
flex-shrink: 0;
|
||||
flex-grow: 0;
|
||||
flex-basis: auto;
|
||||
align-items: stretch;
|
||||
align-content: flex-start;
|
||||
}
|
||||
.u-image.data-v-abebd402 {
|
||||
position: relative;
|
||||
transition: opacity 0.5s ease-in-out;
|
||||
}
|
||||
.u-image__image.data-v-abebd402 {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
.u-image__loading.data-v-abebd402, .u-image__error.data-v-abebd402 {
|
||||
position: absolute;
|
||||
top: 0px;
|
||||
left: 0px;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background-color: #f3f4f6;
|
||||
color: #909193;
|
||||
font-size: 46rpx;
|
||||
}
|
||||
1
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-image/u-image.axml
vendored
Normal file
1
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-image/u-image.axml
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<u-transition class="data-v-abebd402" u-s="{{['d']}}" u-i="abebd402-0" onVI="__l" u-p="{{z}}"><view class="u-image data-v-abebd402" onTap="{{w}}" style="{{x + ';' + y}}"><image a:if="{{a}}" src="{{b}}" mode="{{c}}" onError="{{d}}" onLoad="{{e}}" show-menu-by-longpress="{{f}}" lazy-load="{{g}}" class="u-image__image data-v-abebd402" style="{{'border-radius:' + h + ';' + ('width:' + i) + ';' + ('height:' + j)}}"></image><view a:if="{{k}}" class="u-image__loading data-v-abebd402" style="{{'border-radius:' + m + ';' + ('background-color:' + n) + ';' + ('width:' + o) + ';' + ('height:' + p)}}"><slot name="loading"><u-icon class="data-v-abebd402" u-i="abebd402-1,abebd402-0" onVI="__l" u-p="{{l}}"></u-icon></slot></view><view a:if="{{q}}" class="u-image__error data-v-abebd402" style="{{'border-radius:' + s + ';' + ('width:' + t) + ';' + ('height:' + v)}}"><slot name="error"><u-icon class="data-v-abebd402" u-i="abebd402-2,abebd402-0" onVI="__l" u-p="{{r}}"></u-icon></slot></view></view></u-transition>
|
||||
138
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-image/u-image.js
vendored
Normal file
138
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-image/u-image.js
vendored
Normal file
@@ -0,0 +1,138 @@
|
||||
"use strict";
|
||||
const uni_modules_uviewPlus_components_uImage_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-image",
|
||||
mixins: [uni_modules_uviewPlus_libs_mixin_mpMixin.mpMixin, uni_modules_uviewPlus_libs_mixin_mixin.mixin, uni_modules_uviewPlus_components_uImage_props.props],
|
||||
data() {
|
||||
return {
|
||||
// 图片是否加载错误,如果是,则显示错误占位图
|
||||
isError: false,
|
||||
// 初始化组件时,默认为加载中状态
|
||||
loading: true,
|
||||
// 不透明度,为了实现淡入淡出的效果
|
||||
opacity: 1,
|
||||
// 过渡时间,因为props的值无法修改,故需要一个中间值
|
||||
durationTime: this.duration,
|
||||
// 图片加载完成时,去掉背景颜色,因为如果是png图片,就会显示灰色的背景
|
||||
backgroundStyle: {},
|
||||
// 用于fade模式的控制组件显示与否
|
||||
show: false
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
src: {
|
||||
immediate: true,
|
||||
handler(n) {
|
||||
if (!n) {
|
||||
this.isError = true;
|
||||
} else {
|
||||
this.isError = false;
|
||||
this.loading = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
wrapStyle() {
|
||||
let style = {};
|
||||
style.width = uni_modules_uviewPlus_libs_function_index.addUnit(this.width);
|
||||
style.height = uni_modules_uviewPlus_libs_function_index.addUnit(this.height);
|
||||
style.borderRadius = this.shape == "circle" ? "10000px" : uni_modules_uviewPlus_libs_function_index.addUnit(this.radius);
|
||||
style.overflow = this.radius > 0 ? "hidden" : "visible";
|
||||
return uni_modules_uviewPlus_libs_function_index.deepMerge(style, uni_modules_uviewPlus_libs_function_index.addStyle(this.customStyle));
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.show = true;
|
||||
},
|
||||
emits: ["click", "error", "load"],
|
||||
methods: {
|
||||
addUnit: uni_modules_uviewPlus_libs_function_index.addUnit,
|
||||
// 点击图片
|
||||
onClick() {
|
||||
this.$emit("click");
|
||||
},
|
||||
// 图片加载失败
|
||||
onErrorHandler(err) {
|
||||
this.loading = false;
|
||||
this.isError = true;
|
||||
this.$emit("error", err);
|
||||
},
|
||||
// 图片加载完成,标记loading结束
|
||||
onLoadHandler(event) {
|
||||
this.loading = false;
|
||||
this.isError = false;
|
||||
this.$emit("load", event);
|
||||
this.removeBgColor();
|
||||
},
|
||||
// 移除图片的背景色
|
||||
removeBgColor() {
|
||||
this.backgroundStyle = {
|
||||
backgroundColor: "transparent"
|
||||
};
|
||||
}
|
||||
}
|
||||
};
|
||||
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: !$data.isError
|
||||
}, !$data.isError ? {
|
||||
b: _ctx.src,
|
||||
c: _ctx.mode,
|
||||
d: common_vendor.o((...args) => $options.onErrorHandler && $options.onErrorHandler(...args)),
|
||||
e: common_vendor.o((...args) => $options.onLoadHandler && $options.onLoadHandler(...args)),
|
||||
f: _ctx.showMenuByLongpress,
|
||||
g: _ctx.lazyLoad,
|
||||
h: _ctx.shape == "circle" ? "10000px" : $options.addUnit(_ctx.radius),
|
||||
i: $options.addUnit(_ctx.width),
|
||||
j: $options.addUnit(_ctx.height)
|
||||
} : {}, {
|
||||
k: _ctx.showLoading && $data.loading
|
||||
}, _ctx.showLoading && $data.loading ? {
|
||||
l: common_vendor.p({
|
||||
name: _ctx.loadingIcon,
|
||||
width: _ctx.width,
|
||||
height: _ctx.height
|
||||
}),
|
||||
m: _ctx.shape == "circle" ? "50%" : $options.addUnit(_ctx.radius),
|
||||
n: this.bgColor,
|
||||
o: $options.addUnit(_ctx.width),
|
||||
p: $options.addUnit(_ctx.height)
|
||||
} : {}, {
|
||||
q: _ctx.showError && $data.isError && !$data.loading
|
||||
}, _ctx.showError && $data.isError && !$data.loading ? {
|
||||
r: common_vendor.p({
|
||||
name: _ctx.errorIcon,
|
||||
width: _ctx.width,
|
||||
height: _ctx.height
|
||||
}),
|
||||
s: _ctx.shape == "circle" ? "50%" : $options.addUnit(_ctx.radius),
|
||||
t: $options.addUnit(_ctx.width),
|
||||
v: $options.addUnit(_ctx.height)
|
||||
} : {}, {
|
||||
w: common_vendor.o((...args) => $options.onClick && $options.onClick(...args)),
|
||||
x: common_vendor.s($options.wrapStyle),
|
||||
y: common_vendor.s($data.backgroundStyle),
|
||||
z: common_vendor.p({
|
||||
mode: "fade",
|
||||
show: $data.show,
|
||||
duration: _ctx.fade ? 1e3 : 0
|
||||
})
|
||||
});
|
||||
}
|
||||
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-abebd402"]]);
|
||||
my.createComponent(Component);
|
||||
8
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-image/u-image.json
vendored
Normal file
8
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-image/u-image.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"
|
||||
}
|
||||
}
|
||||
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": {}
|
||||
}
|
||||
87
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-modal/props.js
vendored
Normal file
87
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-modal/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: {
|
||||
// 是否展示modal
|
||||
show: {
|
||||
type: Boolean,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.modal.show
|
||||
},
|
||||
// 标题
|
||||
title: {
|
||||
type: [String],
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.modal.title
|
||||
},
|
||||
// 弹窗内容
|
||||
content: {
|
||||
type: String,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.modal.content
|
||||
},
|
||||
// 确认文案
|
||||
confirmText: {
|
||||
type: String,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.modal.confirmText
|
||||
},
|
||||
// 取消文案
|
||||
cancelText: {
|
||||
type: String,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.modal.cancelText
|
||||
},
|
||||
// 是否显示确认按钮
|
||||
showConfirmButton: {
|
||||
type: Boolean,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.modal.showConfirmButton
|
||||
},
|
||||
// 是否显示取消按钮
|
||||
showCancelButton: {
|
||||
type: Boolean,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.modal.showCancelButton
|
||||
},
|
||||
// 确认按钮颜色
|
||||
confirmColor: {
|
||||
type: String,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.modal.confirmColor
|
||||
},
|
||||
// 取消文字颜色
|
||||
cancelColor: {
|
||||
type: String,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.modal.cancelColor
|
||||
},
|
||||
// 对调确认和取消的位置
|
||||
buttonReverse: {
|
||||
type: Boolean,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.modal.buttonReverse
|
||||
},
|
||||
// 是否开启缩放效果
|
||||
zoom: {
|
||||
type: Boolean,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.modal.zoom
|
||||
},
|
||||
// 是否异步关闭,只对确定按钮有效
|
||||
asyncClose: {
|
||||
type: Boolean,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.modal.asyncClose
|
||||
},
|
||||
// 是否允许点击遮罩关闭modal
|
||||
closeOnClickOverlay: {
|
||||
type: Boolean,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.modal.closeOnClickOverlay
|
||||
},
|
||||
// 给一个负的margin-top,往上偏移,避免和键盘重合的情况
|
||||
negativeTop: {
|
||||
type: [String, Number],
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.modal.negativeTop
|
||||
},
|
||||
// modal宽度,不支持百分比,可以数值,px,rpx单位
|
||||
width: {
|
||||
type: [String, Number],
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.modal.width
|
||||
},
|
||||
// 确认按钮的样式,circle-圆形,square-方形,如设置,将不会显示取消按钮
|
||||
confirmButtonShape: {
|
||||
type: String,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.modal.confirmButtonShape
|
||||
}
|
||||
}
|
||||
};
|
||||
exports.props = props;
|
||||
70
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-modal/u-modal.acss
vendored
Normal file
70
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-modal/u-modal.acss
vendored
Normal file
@@ -0,0 +1,70 @@
|
||||
.u-empty.data-v-f667648f,
|
||||
.u-empty__wrap.data-v-f667648f,
|
||||
.u-tabs.data-v-f667648f,
|
||||
.u-tabs__wrapper.data-v-f667648f,
|
||||
.u-tabs__wrapper__scroll-view-wrapper.data-v-f667648f,
|
||||
.u-tabs__wrapper__scroll-view.data-v-f667648f,
|
||||
.u-tabs__wrapper__nav.data-v-f667648f,
|
||||
.u-tabs__wrapper__nav__line.data-v-f667648f {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
flex-shrink: 0;
|
||||
flex-grow: 0;
|
||||
flex-basis: auto;
|
||||
align-items: stretch;
|
||||
align-content: flex-start;
|
||||
}
|
||||
.u-modal.data-v-f667648f {
|
||||
width: 650rpx;
|
||||
border-radius: 6px;
|
||||
overflow: hidden;
|
||||
}
|
||||
.u-modal__title.data-v-f667648f {
|
||||
display: block;
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
color: #606266;
|
||||
text-align: center;
|
||||
padding-top: 25px;
|
||||
}
|
||||
.u-modal__content.data-v-f667648f {
|
||||
padding: 12px 25px 25px 25px;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
}
|
||||
.u-modal__content__text.data-v-f667648f {
|
||||
font-size: 15px;
|
||||
color: #606266;
|
||||
flex: 1;
|
||||
}
|
||||
.u-modal__button-group.data-v-f667648f {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
}
|
||||
.u-modal__button-group--confirm-button.data-v-f667648f {
|
||||
flex-direction: column;
|
||||
padding: 0px 25px 15px 25px;
|
||||
}
|
||||
.u-modal__button-group__wrapper.data-v-f667648f {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
height: 48px;
|
||||
}
|
||||
.u-modal__button-group__wrapper--confirm.data-v-f667648f, .u-modal__button-group__wrapper--only-cancel.data-v-f667648f {
|
||||
border-bottom-right-radius: 6px;
|
||||
}
|
||||
.u-modal__button-group__wrapper--cancel.data-v-f667648f, .u-modal__button-group__wrapper--only-confirm.data-v-f667648f {
|
||||
border-bottom-left-radius: 6px;
|
||||
}
|
||||
.u-modal__button-group__wrapper--hover.data-v-f667648f {
|
||||
background-color: #f3f4f6;
|
||||
}
|
||||
.u-modal__button-group__wrapper__text.data-v-f667648f {
|
||||
color: #606266;
|
||||
font-size: 16px;
|
||||
text-align: center;
|
||||
}
|
||||
1
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-modal/u-modal.axml
vendored
Normal file
1
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-modal/u-modal.axml
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<u-popup class="data-v-f667648f" u-s="{{['d']}}" onClick="{{v}}" u-i="f667648f-0" onVI="__l" u-p="{{w}}"><view class="u-modal data-v-f667648f" style="{{'width:' + t}}"><text a:if="{{a}}" class="u-modal__title data-v-f667648f">{{b}}</text><view class="u-modal__content data-v-f667648f" style="{{'padding-top:' + d}}"><slot><text class="u-modal__content__text data-v-f667648f">{{c}}</text></slot></view><view a:if="{{e}}" class="u-modal__button-group--confirm-button data-v-f667648f"><slot name="confirmButton"></slot></view><block a:else><u-line class="data-v-f667648f" u-i="f667648f-1,f667648f-0" onVI="__l"></u-line><view class="u-modal__button-group data-v-f667648f" style="{{'flex-direction:' + s}}"><view a:if="{{f}}" hover-stay-time="{{150}}" hover-class="u-modal__button-group__wrapper--hover" class="{{('u-modal__button-group__wrapper') + ' ' + 'u-modal__button-group__wrapper--cancel' + ' ' + 'data-v-f667648f' + ' ' + i}}" onTap="{{j}}"><text class="u-modal__button-group__wrapper__text data-v-f667648f" style="{{'color:' + h}}">{{g}}</text></view><u-line a:if="{{k}}" class="data-v-f667648f" u-i="f667648f-2,f667648f-0" onVI="__l" u-p="{{l}}"></u-line><view a:if="{{m}}" hover-stay-time="{{150}}" hover-class="u-modal__button-group__wrapper--hover" class="{{('u-modal__button-group__wrapper') + ' ' + 'u-modal__button-group__wrapper--confirm' + ' ' + 'data-v-f667648f' + ' ' + q}}" onTap="{{r}}"><u-loading-icon a:if="{{n}}" class="data-v-f667648f" u-i="f667648f-3,f667648f-0" onVI="__l"></u-loading-icon><text a:else class="u-modal__button-group__wrapper__text data-v-f667648f" style="{{'color:' + p}}">{{o}}</text></view></view></block></view></u-popup>
|
||||
112
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-modal/u-modal.js
vendored
Normal file
112
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-modal/u-modal.js
vendored
Normal file
@@ -0,0 +1,112 @@
|
||||
"use strict";
|
||||
const uni_modules_uviewPlus_components_uModal_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-modal",
|
||||
mixins: [uni_modules_uviewPlus_libs_mixin_mpMixin.mpMixin, uni_modules_uviewPlus_libs_mixin_mixin.mixin, uni_modules_uviewPlus_components_uModal_props.props],
|
||||
data() {
|
||||
return {
|
||||
loading: false
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
show(n) {
|
||||
if (n && this.loading)
|
||||
this.loading = false;
|
||||
}
|
||||
},
|
||||
emits: ["confirm", "cancel", "close"],
|
||||
methods: {
|
||||
addUnit: uni_modules_uviewPlus_libs_function_index.addUnit,
|
||||
// 点击确定按钮
|
||||
confirmHandler() {
|
||||
if (this.asyncClose) {
|
||||
this.loading = true;
|
||||
}
|
||||
this.$emit("confirm");
|
||||
},
|
||||
// 点击取消按钮
|
||||
cancelHandler() {
|
||||
this.$emit("cancel");
|
||||
},
|
||||
// 点击遮罩
|
||||
// 从原理上来说,modal的遮罩点击,并不是真的点击到了遮罩
|
||||
// 因为modal依赖于popup的中部弹窗类型,中部弹窗比较特殊,虽有然遮罩,但是为了让弹窗内容能flex居中
|
||||
// 多了一个透明的遮罩,此透明的遮罩会覆盖在灰色的遮罩上,所以实际上是点击不到灰色遮罩的,popup内部在
|
||||
// 透明遮罩的子元素做了.stop处理,所以点击内容区,也不会导致误触发
|
||||
clickHandler() {
|
||||
if (this.closeOnClickOverlay) {
|
||||
this.$emit("close");
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
if (!Array) {
|
||||
const _easycom_u_line2 = common_vendor.resolveComponent("u-line");
|
||||
const _easycom_u_loading_icon2 = common_vendor.resolveComponent("u-loading-icon");
|
||||
const _easycom_u_popup2 = common_vendor.resolveComponent("u-popup");
|
||||
(_easycom_u_line2 + _easycom_u_loading_icon2 + _easycom_u_popup2)();
|
||||
}
|
||||
const _easycom_u_line = () => "../u-line/u-line.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_line + _easycom_u_loading_icon + _easycom_u_popup)();
|
||||
}
|
||||
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: common_vendor.t(_ctx.content),
|
||||
d: `${_ctx.title ? 12 : 25}px`,
|
||||
e: _ctx.$slots.confirmButton
|
||||
}, _ctx.$slots.confirmButton ? {} : common_vendor.e({
|
||||
f: _ctx.showCancelButton
|
||||
}, _ctx.showCancelButton ? {
|
||||
g: common_vendor.t(_ctx.cancelText),
|
||||
h: _ctx.cancelColor,
|
||||
i: common_vendor.n(_ctx.showCancelButton && !_ctx.showConfirmButton && "u-modal__button-group__wrapper--only-cancel"),
|
||||
j: common_vendor.o((...args) => $options.cancelHandler && $options.cancelHandler(...args))
|
||||
} : {}, {
|
||||
k: _ctx.showConfirmButton && _ctx.showCancelButton
|
||||
}, _ctx.showConfirmButton && _ctx.showCancelButton ? {
|
||||
l: common_vendor.p({
|
||||
direction: "column"
|
||||
})
|
||||
} : {}, {
|
||||
m: _ctx.showConfirmButton
|
||||
}, _ctx.showConfirmButton ? common_vendor.e({
|
||||
n: $data.loading
|
||||
}, $data.loading ? {} : {
|
||||
o: common_vendor.t(_ctx.confirmText),
|
||||
p: _ctx.confirmColor
|
||||
}, {
|
||||
q: common_vendor.n(!_ctx.showCancelButton && _ctx.showConfirmButton && "u-modal__button-group__wrapper--only-confirm"),
|
||||
r: common_vendor.o((...args) => $options.confirmHandler && $options.confirmHandler(...args))
|
||||
}) : {}, {
|
||||
s: _ctx.buttonReverse ? "row-reverse" : "row"
|
||||
}), {
|
||||
t: $options.addUnit(_ctx.width),
|
||||
v: common_vendor.o($options.clickHandler),
|
||||
w: common_vendor.p({
|
||||
mode: "center",
|
||||
zoom: _ctx.zoom,
|
||||
show: _ctx.show,
|
||||
customStyle: {
|
||||
borderRadius: "6px",
|
||||
overflow: "hidden",
|
||||
marginTop: `-${$options.addUnit(_ctx.negativeTop)}`
|
||||
},
|
||||
closeOnClickOverlay: _ctx.closeOnClickOverlay,
|
||||
safeAreaInsetBottom: false,
|
||||
duration: 400
|
||||
})
|
||||
});
|
||||
}
|
||||
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-f667648f"]]);
|
||||
my.createComponent(Component);
|
||||
9
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-modal/u-modal.json
vendored
Normal file
9
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-modal/u-modal.json
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"component": true,
|
||||
"styleIsolation": "apply-shared",
|
||||
"usingComponents": {
|
||||
"u-line": "../u-line/u-line",
|
||||
"u-loading-icon": "../u-loading-icon/u-loading-icon",
|
||||
"u-popup": "../u-popup/u-popup"
|
||||
}
|
||||
}
|
||||
112
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-number-box/props.js
vendored
Normal file
112
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-number-box/props.js
vendored
Normal file
@@ -0,0 +1,112 @@
|
||||
"use strict";
|
||||
const uni_modules_uviewPlus_libs_config_props = require("../../libs/config/props.js");
|
||||
const props = {
|
||||
props: {
|
||||
// 步进器标识符,在change回调返回
|
||||
name: {
|
||||
type: [String, Number],
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.numberBox.name
|
||||
},
|
||||
// 用于双向绑定的值,初始化时设置设为默认min值(最小值)
|
||||
modelValue: {
|
||||
type: [String, Number],
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.numberBox.value
|
||||
},
|
||||
// 最小值
|
||||
min: {
|
||||
type: [String, Number],
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.numberBox.min
|
||||
},
|
||||
// 最大值
|
||||
max: {
|
||||
type: [String, Number],
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.numberBox.max
|
||||
},
|
||||
// 加减的步长,可为小数
|
||||
step: {
|
||||
type: [String, Number],
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.numberBox.step
|
||||
},
|
||||
// 是否只允许输入整数
|
||||
integer: {
|
||||
type: Boolean,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.numberBox.integer
|
||||
},
|
||||
// 是否禁用,包括输入框,加减按钮
|
||||
disabled: {
|
||||
type: Boolean,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.numberBox.disabled
|
||||
},
|
||||
// 是否禁用输入框
|
||||
disabledInput: {
|
||||
type: Boolean,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.numberBox.disabledInput
|
||||
},
|
||||
// 是否开启异步变更,开启后需要手动控制输入值
|
||||
asyncChange: {
|
||||
type: Boolean,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.numberBox.asyncChange
|
||||
},
|
||||
// 输入框宽度,单位为px
|
||||
inputWidth: {
|
||||
type: [String, Number],
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.numberBox.inputWidth
|
||||
},
|
||||
// 是否显示减少按钮
|
||||
showMinus: {
|
||||
type: Boolean,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.numberBox.showMinus
|
||||
},
|
||||
// 是否显示增加按钮
|
||||
showPlus: {
|
||||
type: Boolean,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.numberBox.showPlus
|
||||
},
|
||||
// 显示的小数位数
|
||||
decimalLength: {
|
||||
type: [String, Number, null],
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.numberBox.decimalLength
|
||||
},
|
||||
// 是否开启长按加减手势
|
||||
longPress: {
|
||||
type: Boolean,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.numberBox.longPress
|
||||
},
|
||||
// 输入框文字和加减按钮图标的颜色
|
||||
color: {
|
||||
type: String,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.numberBox.color
|
||||
},
|
||||
// 按钮大小,宽高等于此值,单位px,输入框高度和此值保持一致
|
||||
buttonSize: {
|
||||
type: [String, Number],
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.numberBox.buttonSize
|
||||
},
|
||||
// 输入框和按钮的背景颜色
|
||||
bgColor: {
|
||||
type: String,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.numberBox.bgColor
|
||||
},
|
||||
// 指定光标于键盘的距离,避免键盘遮挡输入框,单位px
|
||||
cursorSpacing: {
|
||||
type: [String, Number],
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.numberBox.cursorSpacing
|
||||
},
|
||||
// 是否禁用增加按钮
|
||||
disablePlus: {
|
||||
type: Boolean,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.numberBox.disablePlus
|
||||
},
|
||||
// 是否禁用减少按钮
|
||||
disableMinus: {
|
||||
type: Boolean,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.numberBox.disableMinus
|
||||
},
|
||||
// 加减按钮图标的样式
|
||||
iconStyle: {
|
||||
type: [Object, String],
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.numberBox.iconStyle
|
||||
}
|
||||
}
|
||||
};
|
||||
exports.props = props;
|
||||
62
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-number-box/u-number-box.acss
vendored
Normal file
62
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-number-box/u-number-box.acss
vendored
Normal file
@@ -0,0 +1,62 @@
|
||||
.u-empty.data-v-eb6f6237,
|
||||
.u-empty__wrap.data-v-eb6f6237,
|
||||
.u-tabs.data-v-eb6f6237,
|
||||
.u-tabs__wrapper.data-v-eb6f6237,
|
||||
.u-tabs__wrapper__scroll-view-wrapper.data-v-eb6f6237,
|
||||
.u-tabs__wrapper__scroll-view.data-v-eb6f6237,
|
||||
.u-tabs__wrapper__nav.data-v-eb6f6237,
|
||||
.u-tabs__wrapper__nav__line.data-v-eb6f6237 {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
flex-shrink: 0;
|
||||
flex-grow: 0;
|
||||
flex-basis: auto;
|
||||
align-items: stretch;
|
||||
align-content: flex-start;
|
||||
}
|
||||
.u-number-box.data-v-eb6f6237 {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
}
|
||||
.u-number-box__slot.data-v-eb6f6237 {
|
||||
touch-action: none;
|
||||
}
|
||||
.u-number-box__plus.data-v-eb6f6237, .u-number-box__minus.data-v-eb6f6237 {
|
||||
width: 35px;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
touch-action: none;
|
||||
}
|
||||
.u-number-box__plus--hover.data-v-eb6f6237, .u-number-box__minus--hover.data-v-eb6f6237 {
|
||||
background-color: #E6E6E6 !important;
|
||||
}
|
||||
.u-number-box__plus--disabled.data-v-eb6f6237, .u-number-box__minus--disabled.data-v-eb6f6237 {
|
||||
color: #c8c9cc;
|
||||
background-color: #f7f8fa;
|
||||
}
|
||||
.u-number-box__plus.data-v-eb6f6237 {
|
||||
border-top-right-radius: 4px;
|
||||
border-bottom-right-radius: 4px;
|
||||
}
|
||||
.u-number-box__minus.data-v-eb6f6237 {
|
||||
border-top-left-radius: 4px;
|
||||
border-bottom-left-radius: 4px;
|
||||
}
|
||||
.u-number-box__input.data-v-eb6f6237 {
|
||||
position: relative;
|
||||
text-align: center;
|
||||
font-size: 15px;
|
||||
padding: 0;
|
||||
margin: 0 2px;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
.u-number-box__input--disabled.data-v-eb6f6237 {
|
||||
color: #c8c9cc;
|
||||
background-color: #f2f3f5;
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
<view class="u-number-box data-v-eb6f6237"><view a:if="{{a}}" class="u-number-box__slot cursor-pointer data-v-eb6f6237" catchTap="{{b}}" onTouchStart="{{c}}" catchTouchEnd="{{d}}"><slot name="minus"/></view><view a:elif="{{e}}" catchTap="{{g}}" onTouchStart="{{h}}" catchTouchEnd="{{i}}" hover-class="u-number-box__minus--hover" hover-stay-time="150" class="{{('u-number-box__minus') + ' ' + 'cursor-pointer' + ' ' + 'data-v-eb6f6237' + ' ' + (j && 'u-number-box__minus--disabled')}}" style="{{k}}"><u-icon class="data-v-eb6f6237" u-i="eb6f6237-0" onVI="__l" u-p="{{f}}"></u-icon></view><slot name="input"><input disabled="{{l}}" cursor-spacing="{{m}}" class="{{(n && 'u-number-box__input--disabled') + ' ' + 'u-number-box__input' + ' ' + 'data-v-eb6f6237'}}" onBlur="{{o}}" onFocus="{{p}}" onInput="{{q}}" type="number" style="{{r}}" value="{{s}}"/></slot><view a:if="{{t}}" class="u-number-box__slot cursor-pointer data-v-eb6f6237" catchTap="{{v}}" onTouchStart="{{w}}" catchTouchEnd="{{x}}"><slot name="plus"/></view><view a:elif="{{y}}" catchTap="{{A}}" onTouchStart="{{B}}" catchTouchEnd="{{C}}" hover-class="u-number-box__plus--hover" hover-stay-time="150" class="{{('u-number-box__plus') + ' ' + 'cursor-pointer' + ' ' + 'data-v-eb6f6237' + ' ' + (D && 'u-number-box__minus--disabled')}}" style="{{E}}"><u-icon class="data-v-eb6f6237" u-i="eb6f6237-1" onVI="__l" u-p="{{z}}"></u-icon></view></view>
|
||||
284
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-number-box/u-number-box.js
vendored
Normal file
284
unpackage/dist/dev/mp-alipay/uni_modules/uview-plus/components/u-number-box/u-number-box.js
vendored
Normal file
@@ -0,0 +1,284 @@
|
||||
"use strict";
|
||||
const uni_modules_uviewPlus_components_uNumberBox_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-number-box",
|
||||
mixins: [uni_modules_uviewPlus_libs_mixin_mpMixin.mpMixin, uni_modules_uviewPlus_libs_mixin_mixin.mixin, uni_modules_uviewPlus_components_uNumberBox_props.props],
|
||||
data() {
|
||||
return {
|
||||
// 输入框实际操作的值
|
||||
currentValue: "",
|
||||
// 定时器
|
||||
longPressTimer: null
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
// 多个值之间,只要一个值发生变化,都要重新检查check()函数
|
||||
watchChange(n) {
|
||||
this.check();
|
||||
},
|
||||
// 监听v-mode的变化,重新初始化内部的值
|
||||
modelValue: {
|
||||
handler: function(newV, oldV) {
|
||||
if (newV !== this.currentValue) {
|
||||
this.currentValue = this.format(this.modelValue);
|
||||
}
|
||||
},
|
||||
immediate: true
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
getCursorSpacing() {
|
||||
return uni_modules_uviewPlus_libs_function_index.getPx(this.cursorSpacing);
|
||||
},
|
||||
// 按钮的样式
|
||||
buttonStyle() {
|
||||
return (type) => {
|
||||
const style = {
|
||||
backgroundColor: this.bgColor,
|
||||
height: uni_modules_uviewPlus_libs_function_index.addUnit(this.buttonSize),
|
||||
color: this.color
|
||||
};
|
||||
if (this.isDisabled(type)) {
|
||||
style.backgroundColor = "#f7f8fa";
|
||||
}
|
||||
return style;
|
||||
};
|
||||
},
|
||||
// 输入框的样式
|
||||
inputStyle() {
|
||||
this.disabled || this.disabledInput;
|
||||
const style = {
|
||||
color: this.color,
|
||||
backgroundColor: this.bgColor,
|
||||
height: uni_modules_uviewPlus_libs_function_index.addUnit(this.buttonSize),
|
||||
width: uni_modules_uviewPlus_libs_function_index.addUnit(this.inputWidth)
|
||||
};
|
||||
return style;
|
||||
},
|
||||
// 用于监听多个值发生变化
|
||||
watchChange() {
|
||||
return [this.integer, this.decimalLength, this.min, this.max];
|
||||
},
|
||||
isDisabled() {
|
||||
return (type) => {
|
||||
if (type === "plus") {
|
||||
return this.disabled || this.disablePlus || this.currentValue >= this.max;
|
||||
}
|
||||
return this.disabled || this.disableMinus || this.currentValue <= this.min;
|
||||
};
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.init();
|
||||
},
|
||||
emits: ["update:modelValue", "focus", "blur", "overlimit", "change", "plus", "minus"],
|
||||
methods: {
|
||||
init() {
|
||||
this.currentValue = this.format(this.modelValue);
|
||||
},
|
||||
// 格式化整理数据,限制范围
|
||||
format(value) {
|
||||
value = this.filter(value);
|
||||
value = value === "" ? 0 : +value;
|
||||
value = Math.max(Math.min(this.max, value), this.min);
|
||||
if (this.decimalLength !== null) {
|
||||
value = value.toFixed(this.decimalLength);
|
||||
}
|
||||
return value;
|
||||
},
|
||||
// 过滤非法的字符
|
||||
filter(value) {
|
||||
value = String(value).replace(/[^0-9.-]/g, "");
|
||||
if (this.integer && value.indexOf(".") !== -1) {
|
||||
value = value.split(".")[0];
|
||||
}
|
||||
return value;
|
||||
},
|
||||
check() {
|
||||
const val = this.format(this.currentValue);
|
||||
if (val !== this.currentValue) {
|
||||
this.currentValue = val;
|
||||
}
|
||||
},
|
||||
// 判断是否出于禁止操作状态
|
||||
// isDisabled(type) {
|
||||
// if (type === 'plus') {
|
||||
// // 在点击增加按钮情况下,判断整体的disabled,是否单独禁用增加按钮,以及当前值是否大于最大的允许值
|
||||
// return (
|
||||
// this.disabled ||
|
||||
// this.disablePlus ||
|
||||
// this.currentValue >= this.max
|
||||
// )
|
||||
// }
|
||||
// // 点击减少按钮同理
|
||||
// return (
|
||||
// this.disabled ||
|
||||
// this.disableMinus ||
|
||||
// this.currentValue <= this.min
|
||||
// )
|
||||
// },
|
||||
// 输入框活动焦点
|
||||
onFocus(event) {
|
||||
this.$emit("focus", {
|
||||
...event.detail,
|
||||
name: this.name
|
||||
});
|
||||
},
|
||||
// 输入框失去焦点
|
||||
onBlur(event) {
|
||||
this.format(event.detail.value);
|
||||
this.$emit(
|
||||
"blur",
|
||||
{
|
||||
...event.detail,
|
||||
name: this.name
|
||||
}
|
||||
);
|
||||
},
|
||||
// 输入框值发生变化
|
||||
onInput(e) {
|
||||
const {
|
||||
value = ""
|
||||
} = e.detail || {};
|
||||
if (value === "")
|
||||
return;
|
||||
let formatted = this.filter(value);
|
||||
if (this.decimalLength !== null && formatted.indexOf(".") !== -1) {
|
||||
const pair = formatted.split(".");
|
||||
formatted = `${pair[0]}.${pair[1].slice(0, this.decimalLength)}`;
|
||||
}
|
||||
formatted = this.format(formatted);
|
||||
this.emitChange(formatted);
|
||||
},
|
||||
// 发出change事件
|
||||
emitChange(value) {
|
||||
if (!this.asyncChange) {
|
||||
this.$nextTick(() => {
|
||||
this.$emit("update:modelValue", value);
|
||||
this.currentValue = value;
|
||||
this.$forceUpdate();
|
||||
});
|
||||
}
|
||||
this.$emit("change", {
|
||||
value,
|
||||
name: this.name
|
||||
});
|
||||
},
|
||||
onChange() {
|
||||
const {
|
||||
type
|
||||
} = this;
|
||||
if (this.isDisabled(type)) {
|
||||
return this.$emit("overlimit", type);
|
||||
}
|
||||
const diff = type === "minus" ? -this.step : +this.step;
|
||||
const value = this.format(this.add(+this.currentValue, diff));
|
||||
this.emitChange(value);
|
||||
this.$emit(type);
|
||||
},
|
||||
// 对值扩大后进行四舍五入,再除以扩大因子,避免出现浮点数操作的精度问题
|
||||
add(num1, num2) {
|
||||
const cardinal = Math.pow(10, 10);
|
||||
return Math.round((num1 + num2) * cardinal) / cardinal;
|
||||
},
|
||||
// 点击加减按钮
|
||||
clickHandler(type) {
|
||||
this.type = type;
|
||||
this.onChange();
|
||||
},
|
||||
longPressStep() {
|
||||
this.clearTimeout();
|
||||
this.longPressTimer = setTimeout(() => {
|
||||
this.onChange();
|
||||
this.longPressStep();
|
||||
}, 250);
|
||||
},
|
||||
onTouchStart(type) {
|
||||
if (!this.longPress)
|
||||
return;
|
||||
this.clearTimeout();
|
||||
this.type = type;
|
||||
this.longPressTimer = setTimeout(() => {
|
||||
this.onChange();
|
||||
this.longPressStep();
|
||||
}, 600);
|
||||
},
|
||||
// 触摸结束,清除定时器,停止长按加减
|
||||
onTouchEnd() {
|
||||
if (!this.longPress)
|
||||
return;
|
||||
this.clearTimeout();
|
||||
},
|
||||
// 清除定时器
|
||||
clearTimeout() {
|
||||
clearTimeout(this.longPressTimer);
|
||||
this.longPressTimer = null;
|
||||
}
|
||||
}
|
||||
};
|
||||
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.showMinus && _ctx.$slots.minus
|
||||
}, _ctx.showMinus && _ctx.$slots.minus ? {
|
||||
b: common_vendor.o(($event) => $options.clickHandler("minus")),
|
||||
c: common_vendor.o(($event) => $options.onTouchStart("minus")),
|
||||
d: common_vendor.o((...args) => $options.clearTimeout && $options.clearTimeout(...args))
|
||||
} : _ctx.showMinus ? {
|
||||
f: common_vendor.p({
|
||||
name: "minus",
|
||||
color: $options.isDisabled("minus") ? "#c8c9cc" : "#323233",
|
||||
size: "15",
|
||||
bold: true,
|
||||
customStyle: _ctx.iconStyle
|
||||
}),
|
||||
g: common_vendor.o(($event) => $options.clickHandler("minus")),
|
||||
h: common_vendor.o(($event) => $options.onTouchStart("minus")),
|
||||
i: common_vendor.o((...args) => $options.clearTimeout && $options.clearTimeout(...args)),
|
||||
j: $options.isDisabled("minus") ? 1 : "",
|
||||
k: common_vendor.s($options.buttonStyle("minus"))
|
||||
} : {}, {
|
||||
e: _ctx.showMinus,
|
||||
l: _ctx.disabledInput || _ctx.disabled,
|
||||
m: $options.getCursorSpacing,
|
||||
n: _ctx.disabled || _ctx.disabledInput ? 1 : "",
|
||||
o: common_vendor.o((...args) => $options.onBlur && $options.onBlur(...args)),
|
||||
p: common_vendor.o((...args) => $options.onFocus && $options.onFocus(...args)),
|
||||
q: common_vendor.o([($event) => $data.currentValue = $event.detail.value, (...args) => $options.onInput && $options.onInput(...args)]),
|
||||
r: common_vendor.s($options.inputStyle),
|
||||
s: $data.currentValue,
|
||||
t: _ctx.showPlus && _ctx.$slots.plus
|
||||
}, _ctx.showPlus && _ctx.$slots.plus ? {
|
||||
v: common_vendor.o(($event) => $options.clickHandler("plus")),
|
||||
w: common_vendor.o(($event) => $options.onTouchStart("plus")),
|
||||
x: common_vendor.o((...args) => $options.clearTimeout && $options.clearTimeout(...args))
|
||||
} : _ctx.showPlus ? {
|
||||
z: common_vendor.p({
|
||||
name: "plus",
|
||||
color: $options.isDisabled("plus") ? "#c8c9cc" : "#323233",
|
||||
size: "15",
|
||||
bold: true,
|
||||
customStyle: _ctx.iconStyle
|
||||
}),
|
||||
A: common_vendor.o(($event) => $options.clickHandler("plus")),
|
||||
B: common_vendor.o(($event) => $options.onTouchStart("plus")),
|
||||
C: common_vendor.o((...args) => $options.clearTimeout && $options.clearTimeout(...args)),
|
||||
D: $options.isDisabled("plus") ? 1 : "",
|
||||
E: common_vendor.s($options.buttonStyle("plus"))
|
||||
} : {}, {
|
||||
y: _ctx.showPlus
|
||||
});
|
||||
}
|
||||
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-eb6f6237"]]);
|
||||
my.createComponent(Component);
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"component": true,
|
||||
"styleIsolation": "apply-shared",
|
||||
"usingComponents": {
|
||||
"u-icon": "../u-icon/u-icon"
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user