u-divider.js 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. "use strict";
  2. const common_vendor = require("../../../../common/vendor.js");
  3. const _sfc_main = {
  4. name: "u-divider",
  5. mixins: [common_vendor.mpMixin, common_vendor.mixin, common_vendor.props$7],
  6. computed: {
  7. textStyle() {
  8. const style = {};
  9. style.fontSize = common_vendor.index.$u.addUnit(this.textSize);
  10. style.color = this.textColor;
  11. return style;
  12. },
  13. // 左边线条的的样式
  14. leftLineStyle() {
  15. const style = {};
  16. if (this.textPosition === "left") {
  17. style.width = "80rpx";
  18. } else {
  19. style.flex = 1;
  20. }
  21. return style;
  22. },
  23. // 右边线条的的样式
  24. rightLineStyle() {
  25. const style = {};
  26. if (this.textPosition === "right") {
  27. style.width = "80rpx";
  28. } else {
  29. style.flex = 1;
  30. }
  31. return style;
  32. }
  33. },
  34. emits: ["click"],
  35. methods: {
  36. // divider组件被点击时触发
  37. click() {
  38. this.$emit("click");
  39. }
  40. }
  41. };
  42. if (!Array) {
  43. const _easycom_u_line2 = common_vendor.resolveComponent("u-line");
  44. _easycom_u_line2();
  45. }
  46. const _easycom_u_line = () => "../u-line/u-line.js";
  47. if (!Math) {
  48. _easycom_u_line();
  49. }
  50. function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
  51. return common_vendor.e({
  52. a: common_vendor.p({
  53. color: _ctx.lineColor,
  54. customStyle: $options.leftLineStyle,
  55. hairline: _ctx.hairline,
  56. dashed: _ctx.dashed
  57. }),
  58. b: _ctx.dot
  59. }, _ctx.dot ? {} : _ctx.text ? {
  60. d: common_vendor.t(_ctx.text),
  61. e: common_vendor.s($options.textStyle)
  62. } : {}, {
  63. c: _ctx.text,
  64. f: common_vendor.p({
  65. color: _ctx.lineColor,
  66. customStyle: $options.rightLineStyle,
  67. hairline: _ctx.hairline,
  68. dashed: _ctx.dashed
  69. }),
  70. g: common_vendor.s(_ctx.$u.addStyle(_ctx.customStyle)),
  71. h: common_vendor.o((...args) => $options.click && $options.click(...args))
  72. });
  73. }
  74. const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-363a2c1a"], ["__file", "D:/project/赋强公证/notarization_applet/node_modules/uview-plus/components/u-divider/u-divider.vue"]]);
  75. wx.createComponent(Component);