first commit
This commit is contained in:
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"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user