EASYAIuniappNewUI/dist/dev/mp-weixin/node-modules/uview-plus/components/u-line/u-line.js
2025-02-08 18:50:38 +08:00

35 lines
1.2 KiB
JavaScript

"use strict";
const common_vendor = require("../../../../common/vendor.js");
const _sfc_main = {
name: "u-line",
mixins: [common_vendor.mpMixin, common_vendor.mixin, common_vendor.props$8],
computed: {
lineStyle() {
const style = {};
style.margin = this.margin;
if (this.direction === "row") {
style.borderBottomWidth = "1px";
style.borderBottomStyle = this.dashed ? "dashed" : "solid";
style.width = common_vendor.addUnit(this.length);
if (this.hairline)
style.transform = "scaleY(0.5)";
} else {
style.borderLeftWidth = "1px";
style.borderLeftStyle = this.dashed ? "dashed" : "solid";
style.height = common_vendor.addUnit(this.length);
if (this.hairline)
style.transform = "scaleX(0.5)";
}
style.borderColor = this.color;
return common_vendor.deepMerge(style, common_vendor.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-bbd9963c"]]);
wx.createComponent(Component);