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