@atooyu/uxto-ui 1.1.27 → 1.1.29

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -4,7 +4,7 @@ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { en
4
4
  var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
5
5
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
6
6
  const vue = require("vue");
7
- const _hoisted_1$I = ["disabled", "hover-class"];
7
+ const _hoisted_1$H = ["disabled", "hover-class"];
8
8
  const _hoisted_2$w = {
9
9
  key: 0,
10
10
  class: "u-button__loading"
@@ -85,7 +85,7 @@ const _sfc_main$N = /* @__PURE__ */ vue.defineComponent({
85
85
  vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
86
86
  ])
87
87
  ]))
88
- ], 14, _hoisted_1$I);
88
+ ], 14, _hoisted_1$H);
89
89
  };
90
90
  }
91
91
  });
@@ -97,7 +97,7 @@ const _export_sfc = (sfc, props) => {
97
97
  return target;
98
98
  };
99
99
  const uButton = /* @__PURE__ */ _export_sfc(_sfc_main$N, [["__scopeId", "data-v-a51cb0bf"]]);
100
- const _hoisted_1$H = {
100
+ const _hoisted_1$G = {
101
101
  key: 0,
102
102
  class: "u-input__prefix"
103
103
  };
@@ -166,7 +166,7 @@ const _sfc_main$M = /* @__PURE__ */ vue.defineComponent({
166
166
  "u-input--focus": isFocus.value
167
167
  }])
168
168
  }, [
169
- _ctx.$slots.prefix || __props.prefixIcon ? (vue.openBlock(), vue.createElementBlock("view", _hoisted_1$H, [
169
+ _ctx.$slots.prefix || __props.prefixIcon ? (vue.openBlock(), vue.createElementBlock("view", _hoisted_1$G, [
170
170
  vue.renderSlot(_ctx.$slots, "prefix", {}, () => [
171
171
  vue.createElementVNode("text", _hoisted_2$v, vue.toDisplayString(__props.prefixIcon), 1)
172
172
  ], true)
@@ -207,7 +207,7 @@ const _sfc_main$M = /* @__PURE__ */ vue.defineComponent({
207
207
  }
208
208
  });
209
209
  const uInput = /* @__PURE__ */ _export_sfc(_sfc_main$M, [["__scopeId", "data-v-2f635824"]]);
210
- const _hoisted_1$G = ["hover-class"];
210
+ const _hoisted_1$F = ["hover-class"];
211
211
  const _hoisted_2$u = {
212
212
  key: 0,
213
213
  class: "u-cell__icon"
@@ -296,12 +296,12 @@ const _sfc_main$L = /* @__PURE__ */ vue.defineComponent({
296
296
  vue.createElementVNode("text", { class: "u-cell__arrow-icon" }, "›", -1)
297
297
  ])])) : vue.createCommentVNode("", true),
298
298
  vue.renderSlot(_ctx.$slots, "right-icon", {}, void 0, true)
299
- ], 10, _hoisted_1$G);
299
+ ], 10, _hoisted_1$F);
300
300
  };
301
301
  }
302
302
  });
303
303
  const uCell = /* @__PURE__ */ _export_sfc(_sfc_main$L, [["__scopeId", "data-v-c3a35a65"]]);
304
- const _hoisted_1$F = { class: "u-cell-group" };
304
+ const _hoisted_1$E = { class: "u-cell-group" };
305
305
  const _hoisted_2$t = {
306
306
  key: 0,
307
307
  class: "u-cell-group__title"
@@ -321,7 +321,7 @@ const _sfc_main$K = /* @__PURE__ */ vue.defineComponent({
321
321
  },
322
322
  setup(__props) {
323
323
  return (_ctx, _cache) => {
324
- return vue.openBlock(), vue.createElementBlock("view", _hoisted_1$F, [
324
+ return vue.openBlock(), vue.createElementBlock("view", _hoisted_1$E, [
325
325
  __props.title || _ctx.$slots.title ? (vue.openBlock(), vue.createElementBlock("view", _hoisted_2$t, [
326
326
  vue.renderSlot(_ctx.$slots, "title", {}, () => [
327
327
  vue.createTextVNode(vue.toDisplayString(__props.title), 1)
@@ -335,7 +335,7 @@ const _sfc_main$K = /* @__PURE__ */ vue.defineComponent({
335
335
  }
336
336
  });
337
337
  const uCellGroup = /* @__PURE__ */ _export_sfc(_sfc_main$K, [["__scopeId", "data-v-f529bc69"]]);
338
- const _hoisted_1$E = {
338
+ const _hoisted_1$D = {
339
339
  key: 0,
340
340
  class: "u-modal__header"
341
341
  };
@@ -389,7 +389,7 @@ const _sfc_main$J = /* @__PURE__ */ vue.defineComponent({
389
389
  onClick: _cache[0] || (_cache[0] = vue.withModifiers(() => {
390
390
  }, ["stop"]))
391
391
  }, [
392
- __props.title ? (vue.openBlock(), vue.createElementBlock("view", _hoisted_1$E, [
392
+ __props.title ? (vue.openBlock(), vue.createElementBlock("view", _hoisted_1$D, [
393
393
  vue.createElementVNode("text", _hoisted_2$s, vue.toDisplayString(__props.title), 1)
394
394
  ])) : vue.createCommentVNode("", true),
395
395
  vue.createElementVNode("view", _hoisted_3$m, [
@@ -631,7 +631,7 @@ function getIconNames() {
631
631
  function addIcon(name, svg) {
632
632
  icons[name] = svg;
633
633
  }
634
- const _hoisted_1$D = ["src"];
634
+ const _hoisted_1$C = ["src"];
635
635
  const _hoisted_2$r = {
636
636
  key: 1,
637
637
  class: "u-icon__inner"
@@ -665,8 +665,8 @@ const _sfc_main$I = /* @__PURE__ */ vue.defineComponent({
665
665
  return getIcon(props.name) || "";
666
666
  });
667
667
  const sizePx = vue.computed(() => {
668
- const size2 = typeof props.size === "number" ? props.size : parseInt(props.size);
669
- return size2 + "px";
668
+ const size = typeof props.size === "number" ? props.size : parseInt(props.size);
669
+ return size + "px";
670
670
  });
671
671
  const colorToFilter = (color) => {
672
672
  const colorMap = {
@@ -690,11 +690,11 @@ const _sfc_main$I = /* @__PURE__ */ vue.defineComponent({
690
690
  return `invert(1) sepia(1) saturate(10000%) hue-rotate(${hue}deg)`;
691
691
  };
692
692
  const iconStyle = vue.computed(() => {
693
- const size2 = typeof props.size === "number" ? props.size : parseInt(props.size);
693
+ const size = typeof props.size === "number" ? props.size : parseInt(props.size);
694
694
  const style = {
695
- fontSize: size2 + "px",
696
- width: size2 + "px",
697
- height: size2 + "px"
695
+ fontSize: size + "px",
696
+ width: size + "px",
697
+ height: size + "px"
698
698
  };
699
699
  if (props.color && isSvgIcon.value) {
700
700
  style.filter = colorToFilter(props.color);
@@ -722,7 +722,7 @@ const _sfc_main$I = /* @__PURE__ */ vue.defineComponent({
722
722
  src: iconSrc.value,
723
723
  style: vue.normalizeStyle(svgStyle.value),
724
724
  mode: "aspectFit"
725
- }, null, 12, _hoisted_1$D)) : (vue.openBlock(), vue.createElementBlock("text", _hoisted_2$r, vue.toDisplayString(__props.name), 1))
725
+ }, null, 12, _hoisted_1$C)) : (vue.openBlock(), vue.createElementBlock("text", _hoisted_2$r, vue.toDisplayString(__props.name), 1))
726
726
  ], 6);
727
727
  };
728
728
  }
@@ -774,7 +774,7 @@ const _sfc_main$H = /* @__PURE__ */ vue.defineComponent({
774
774
  }
775
775
  });
776
776
  const uLoading = /* @__PURE__ */ _export_sfc(_sfc_main$H, [["__scopeId", "data-v-ce769006"]]);
777
- const _hoisted_1$C = { class: "u-tag__text" };
777
+ const _hoisted_1$B = { class: "u-tag__text" };
778
778
  const __default__$G = {
779
779
  options: {
780
780
  virtualHost: true,
@@ -814,7 +814,7 @@ const _sfc_main$G = /* @__PURE__ */ vue.defineComponent({
814
814
  class: vue.normalizeClass(["u-tag", [`u-tag--${__props.type}`, `u-tag--${__props.size}`, { "u-tag--plain": __props.plain, "u-tag--round": __props.round }]]),
815
815
  style: vue.normalizeStyle(tagStyle.value)
816
816
  }, [
817
- vue.createElementVNode("text", _hoisted_1$C, [
817
+ vue.createElementVNode("text", _hoisted_1$B, [
818
818
  vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
819
819
  ]),
820
820
  __props.closable ? (vue.openBlock(), vue.createElementBlock("view", {
@@ -895,7 +895,7 @@ const _sfc_main$F = /* @__PURE__ */ vue.defineComponent({
895
895
  }
896
896
  });
897
897
  const uSwitch = /* @__PURE__ */ _export_sfc(_sfc_main$F, [["__scopeId", "data-v-8922fa66"]]);
898
- const _hoisted_1$B = ["src", "mode", "lazy-load", "fade"];
898
+ const _hoisted_1$A = ["src", "mode", "lazy-load", "fade"];
899
899
  const _hoisted_2$q = {
900
900
  key: 0,
901
901
  class: "u-image__loading"
@@ -949,7 +949,7 @@ const _sfc_main$E = /* @__PURE__ */ vue.defineComponent({
949
949
  fade: __props.fade,
950
950
  onLoad: handleLoad,
951
951
  onError: handleError
952
- }, null, 40, _hoisted_1$B),
952
+ }, null, 40, _hoisted_1$A),
953
953
  __props.loading && !loaded.value ? (vue.openBlock(), vue.createElementBlock("view", _hoisted_2$q, [
954
954
  vue.renderSlot(_ctx.$slots, "loading", {}, () => [
955
955
  vue.createVNode(_component_u_loading, { size: 20 })
@@ -965,7 +965,7 @@ const _sfc_main$E = /* @__PURE__ */ vue.defineComponent({
965
965
  }
966
966
  });
967
967
  const uImage = /* @__PURE__ */ _export_sfc(_sfc_main$E, [["__scopeId", "data-v-55a4498e"]]);
968
- const _hoisted_1$A = {
968
+ const _hoisted_1$z = {
969
969
  key: 0,
970
970
  class: "u-divider__text"
971
971
  };
@@ -988,7 +988,7 @@ const _sfc_main$D = /* @__PURE__ */ vue.defineComponent({
988
988
  return vue.openBlock(), vue.createElementBlock("view", {
989
989
  class: vue.normalizeClass(["u-divider", { "u-divider--hairline": __props.hairline, "u-divider--dashed": __props.dashed }])
990
990
  }, [
991
- _ctx.$slots.default || __props.content ? (vue.openBlock(), vue.createElementBlock("view", _hoisted_1$A, [
991
+ _ctx.$slots.default || __props.content ? (vue.openBlock(), vue.createElementBlock("view", _hoisted_1$z, [
992
992
  vue.renderSlot(_ctx.$slots, "default", {}, () => [
993
993
  vue.createTextVNode(vue.toDisplayString(__props.content), 1)
994
994
  ], true)
@@ -998,7 +998,7 @@ const _sfc_main$D = /* @__PURE__ */ vue.defineComponent({
998
998
  }
999
999
  });
1000
1000
  const uDivider = /* @__PURE__ */ _export_sfc(_sfc_main$D, [["__scopeId", "data-v-7f88d163"]]);
1001
- const _hoisted_1$z = {
1001
+ const _hoisted_1$y = {
1002
1002
  key: 0,
1003
1003
  class: "u-notice-bar__left-icon"
1004
1004
  };
@@ -1038,7 +1038,7 @@ const _sfc_main$C = /* @__PURE__ */ vue.defineComponent({
1038
1038
  class: vue.normalizeClass(["u-notice-bar", { "u-notice-bar--wrapable": __props.wrapable }]),
1039
1039
  style: vue.normalizeStyle({ color: __props.color, background: __props.background })
1040
1040
  }, [
1041
- _ctx.$slots.leftIcon || __props.leftIcon ? (vue.openBlock(), vue.createElementBlock("view", _hoisted_1$z, [
1041
+ _ctx.$slots.leftIcon || __props.leftIcon ? (vue.openBlock(), vue.createElementBlock("view", _hoisted_1$y, [
1042
1042
  vue.renderSlot(_ctx.$slots, "leftIcon", {}, () => [
1043
1043
  vue.createElementVNode("text", null, vue.toDisplayString(__props.leftIcon), 1)
1044
1044
  ], true)
@@ -1069,7 +1069,7 @@ const _sfc_main$C = /* @__PURE__ */ vue.defineComponent({
1069
1069
  }
1070
1070
  });
1071
1071
  const uNoticeBar = /* @__PURE__ */ _export_sfc(_sfc_main$C, [["__scopeId", "data-v-f80a744d"]]);
1072
- const _hoisted_1$y = {
1072
+ const _hoisted_1$x = {
1073
1073
  key: 0,
1074
1074
  class: "u-layout__header"
1075
1075
  };
@@ -1094,7 +1094,7 @@ const _sfc_main$B = /* @__PURE__ */ vue.defineComponent({
1094
1094
  return vue.openBlock(), vue.createElementBlock("view", {
1095
1095
  class: vue.normalizeClass(["u-layout", { "u-layout--has-footer": hasFooter.value }])
1096
1096
  }, [
1097
- _ctx.$slots.header ? (vue.openBlock(), vue.createElementBlock("view", _hoisted_1$y, [
1097
+ _ctx.$slots.header ? (vue.openBlock(), vue.createElementBlock("view", _hoisted_1$x, [
1098
1098
  vue.renderSlot(_ctx.$slots, "header", {}, void 0, true)
1099
1099
  ])) : vue.createCommentVNode("", true),
1100
1100
  vue.createElementVNode("view", _hoisted_2$o, [
@@ -1108,7 +1108,7 @@ const _sfc_main$B = /* @__PURE__ */ vue.defineComponent({
1108
1108
  }
1109
1109
  });
1110
1110
  const uLayout = /* @__PURE__ */ _export_sfc(_sfc_main$B, [["__scopeId", "data-v-1682e77a"]]);
1111
- const _hoisted_1$x = {
1111
+ const _hoisted_1$w = {
1112
1112
  key: 0,
1113
1113
  class: "u-badge__text"
1114
1114
  };
@@ -1164,14 +1164,14 @@ const _sfc_main$A = /* @__PURE__ */ vue.defineComponent({
1164
1164
  class: vue.normalizeClass(["u-badge__content", [`u-badge__content--${__props.type}`, { "u-badge__content--dot": __props.dot, "u-badge__content--alone": !_ctx.$slots.default }]]),
1165
1165
  style: vue.normalizeStyle(badgeStyle.value)
1166
1166
  }, [
1167
- !__props.dot && displayValue.value ? (vue.openBlock(), vue.createElementBlock("text", _hoisted_1$x, vue.toDisplayString(displayValue.value), 1)) : vue.createCommentVNode("", true)
1167
+ !__props.dot && displayValue.value ? (vue.openBlock(), vue.createElementBlock("text", _hoisted_1$w, vue.toDisplayString(displayValue.value), 1)) : vue.createCommentVNode("", true)
1168
1168
  ], 6)) : vue.createCommentVNode("", true)
1169
1169
  ], 2);
1170
1170
  };
1171
1171
  }
1172
1172
  });
1173
1173
  const uBadge = /* @__PURE__ */ _export_sfc(_sfc_main$A, [["__scopeId", "data-v-56dd42ed"]]);
1174
- const _hoisted_1$w = {
1174
+ const _hoisted_1$v = {
1175
1175
  key: 0,
1176
1176
  class: "u-loading-page"
1177
1177
  };
@@ -1194,7 +1194,7 @@ const _sfc_main$z = /* @__PURE__ */ vue.defineComponent({
1194
1194
  },
1195
1195
  setup(__props) {
1196
1196
  return (_ctx, _cache) => {
1197
- return __props.visible ? (vue.openBlock(), vue.createElementBlock("view", _hoisted_1$w, [
1197
+ return __props.visible ? (vue.openBlock(), vue.createElementBlock("view", _hoisted_1$v, [
1198
1198
  vue.createElementVNode("view", _hoisted_2$n, [
1199
1199
  vue.createElementVNode("view", {
1200
1200
  class: "u-loading-page__spinner",
@@ -1222,7 +1222,7 @@ const _sfc_main$z = /* @__PURE__ */ vue.defineComponent({
1222
1222
  }
1223
1223
  });
1224
1224
  const uLoadingPage = /* @__PURE__ */ _export_sfc(_sfc_main$z, [["__scopeId", "data-v-ddf92cf6"]]);
1225
- const _hoisted_1$v = { class: "u-parse" };
1225
+ const _hoisted_1$u = { class: "u-parse" };
1226
1226
  const __default__$y = {
1227
1227
  options: {
1228
1228
  virtualHost: true,
@@ -1328,7 +1328,7 @@ const _sfc_main$y = /* @__PURE__ */ vue.defineComponent({
1328
1328
  };
1329
1329
  return (_ctx, _cache) => {
1330
1330
  const _component_rich_text = vue.resolveComponent("rich-text");
1331
- return vue.openBlock(), vue.createElementBlock("view", _hoisted_1$v, [
1331
+ return vue.openBlock(), vue.createElementBlock("view", _hoisted_1$u, [
1332
1332
  vue.createVNode(_component_rich_text, {
1333
1333
  nodes: parsedNodes.value,
1334
1334
  selectable: __props.selectable,
@@ -1340,7 +1340,7 @@ const _sfc_main$y = /* @__PURE__ */ vue.defineComponent({
1340
1340
  }
1341
1341
  });
1342
1342
  const uParse = /* @__PURE__ */ _export_sfc(_sfc_main$y, [["__scopeId", "data-v-5361245b"]]);
1343
- const _hoisted_1$u = { class: "u-keyboard__header" };
1343
+ const _hoisted_1$t = { class: "u-keyboard__header" };
1344
1344
  const _hoisted_2$m = { class: "u-keyboard__title" };
1345
1345
  const _hoisted_3$i = ["onClick"];
1346
1346
  const __default__$x = {
@@ -1472,7 +1472,7 @@ const _sfc_main$x = /* @__PURE__ */ vue.defineComponent({
1472
1472
  onClick: _cache[0] || (_cache[0] = vue.withModifiers(() => {
1473
1473
  }, ["stop"]))
1474
1474
  }, [
1475
- vue.createElementVNode("view", _hoisted_1$u, [
1475
+ vue.createElementVNode("view", _hoisted_1$t, [
1476
1476
  vue.createElementVNode("text", _hoisted_2$m, vue.toDisplayString(__props.title), 1),
1477
1477
  vue.createElementVNode("text", {
1478
1478
  class: "u-keyboard__close",
@@ -1501,7 +1501,7 @@ const _sfc_main$x = /* @__PURE__ */ vue.defineComponent({
1501
1501
  }
1502
1502
  });
1503
1503
  const uKeyboard = /* @__PURE__ */ _export_sfc(_sfc_main$x, [["__scopeId", "data-v-b318be29"]]);
1504
- const _hoisted_1$t = { class: "u-picker__toolbar" };
1504
+ const _hoisted_1$s = { class: "u-picker__toolbar" };
1505
1505
  const _hoisted_2$l = { class: "u-picker__title" };
1506
1506
  const _hoisted_3$h = {
1507
1507
  key: 0,
@@ -1599,7 +1599,7 @@ const _sfc_main$w = /* @__PURE__ */ vue.defineComponent({
1599
1599
  onClick: _cache[0] || (_cache[0] = vue.withModifiers(() => {
1600
1600
  }, ["stop"]))
1601
1601
  }, [
1602
- vue.createElementVNode("view", _hoisted_1$t, [
1602
+ vue.createElementVNode("view", _hoisted_1$s, [
1603
1603
  vue.createElementVNode("text", {
1604
1604
  class: "u-picker__action",
1605
1605
  onClick: handleCancel
@@ -1644,7 +1644,7 @@ const _sfc_main$w = /* @__PURE__ */ vue.defineComponent({
1644
1644
  }
1645
1645
  });
1646
1646
  const uPicker = /* @__PURE__ */ _export_sfc(_sfc_main$w, [["__scopeId", "data-v-54bd44d7"]]);
1647
- const _hoisted_1$s = { class: "u-datetime-picker__toolbar" };
1647
+ const _hoisted_1$r = { class: "u-datetime-picker__toolbar" };
1648
1648
  const _hoisted_2$k = { class: "u-datetime-picker__title" };
1649
1649
  const __default__$v = {
1650
1650
  options: {
@@ -1873,7 +1873,7 @@ const _sfc_main$v = /* @__PURE__ */ vue.defineComponent({
1873
1873
  onClick: _cache[0] || (_cache[0] = vue.withModifiers(() => {
1874
1874
  }, ["stop"]))
1875
1875
  }, [
1876
- vue.createElementVNode("view", _hoisted_1$s, [
1876
+ vue.createElementVNode("view", _hoisted_1$r, [
1877
1877
  vue.createElementVNode("text", {
1878
1878
  class: "u-datetime-picker__action",
1879
1879
  onClick: handleCancel
@@ -1915,7 +1915,7 @@ const _sfc_main$v = /* @__PURE__ */ vue.defineComponent({
1915
1915
  }
1916
1916
  });
1917
1917
  const uDatetimePicker = /* @__PURE__ */ _export_sfc(_sfc_main$v, [["__scopeId", "data-v-45acbf1d"]]);
1918
- const _hoisted_1$r = ["onClick"];
1918
+ const _hoisted_1$q = ["onClick"];
1919
1919
  const __default__$u = {
1920
1920
  options: {
1921
1921
  virtualHost: true,
@@ -2021,14 +2021,14 @@ const _sfc_main$u = /* @__PURE__ */ vue.defineComponent({
2021
2021
  style: vue.normalizeStyle(activeStyle.value)
2022
2022
  }, "★", 4)
2023
2023
  ], 4)
2024
- ], 12, _hoisted_1$r);
2024
+ ], 12, _hoisted_1$q);
2025
2025
  }), 128))
2026
2026
  ], 2);
2027
2027
  };
2028
2028
  }
2029
2029
  });
2030
2030
  const uRate = /* @__PURE__ */ _export_sfc(_sfc_main$u, [["__scopeId", "data-v-62d85215"]]);
2031
- const _hoisted_1$q = { class: "u-grid" };
2031
+ const _hoisted_1$p = { class: "u-grid" };
2032
2032
  const __default__$t = {
2033
2033
  options: {
2034
2034
  virtualHost: true,
@@ -2065,14 +2065,14 @@ const _sfc_main$t = /* @__PURE__ */ vue.defineComponent({
2065
2065
  onItemClick
2066
2066
  });
2067
2067
  return (_ctx, _cache) => {
2068
- return vue.openBlock(), vue.createElementBlock("view", _hoisted_1$q, [
2068
+ return vue.openBlock(), vue.createElementBlock("view", _hoisted_1$p, [
2069
2069
  vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
2070
2070
  ]);
2071
2071
  };
2072
2072
  }
2073
2073
  });
2074
2074
  const uGrid = /* @__PURE__ */ _export_sfc(_sfc_main$t, [["__scopeId", "data-v-d005bea6"]]);
2075
- const _hoisted_1$p = {
2075
+ const _hoisted_1$o = {
2076
2076
  key: 0,
2077
2077
  class: "u-grid-item__icon"
2078
2078
  };
@@ -2145,7 +2145,7 @@ const _sfc_main$s = /* @__PURE__ */ vue.defineComponent({
2145
2145
  style: vue.normalizeStyle(itemStyle.value),
2146
2146
  onClick: handleClick
2147
2147
  }, [
2148
- _ctx.$slots.icon || __props.icon || __props.iconUrl ? (vue.openBlock(), vue.createElementBlock("view", _hoisted_1$p, [
2148
+ _ctx.$slots.icon || __props.icon || __props.iconUrl ? (vue.openBlock(), vue.createElementBlock("view", _hoisted_1$o, [
2149
2149
  vue.renderSlot(_ctx.$slots, "icon", {}, () => [
2150
2150
  __props.iconUrl ? (vue.openBlock(), vue.createElementBlock("image", {
2151
2151
  key: 0,
@@ -2168,7 +2168,7 @@ const _sfc_main$s = /* @__PURE__ */ vue.defineComponent({
2168
2168
  }
2169
2169
  });
2170
2170
  const uGridItem = /* @__PURE__ */ _export_sfc(_sfc_main$s, [["__scopeId", "data-v-de6f40c1"]]);
2171
- const _hoisted_1$o = { class: "u-swiper" };
2171
+ const _hoisted_1$n = { class: "u-swiper" };
2172
2172
  const _hoisted_2$i = {
2173
2173
  key: 0,
2174
2174
  class: "u-swiper__loading"
@@ -2281,7 +2281,7 @@ const _sfc_main$r = /* @__PURE__ */ vue.defineComponent({
2281
2281
  });
2282
2282
  return (_ctx, _cache) => {
2283
2283
  const _component_swiper = vue.resolveComponent("swiper");
2284
- return vue.openBlock(), vue.createElementBlock("view", _hoisted_1$o, [
2284
+ return vue.openBlock(), vue.createElementBlock("view", _hoisted_1$n, [
2285
2285
  vue.createVNode(_component_swiper, {
2286
2286
  class: "u-swiper__wrapper",
2287
2287
  style: vue.normalizeStyle({ height: swiperHeight.value }),
@@ -2383,7 +2383,7 @@ const _sfc_main$q = /* @__PURE__ */ vue.defineComponent({
2383
2383
  }
2384
2384
  });
2385
2385
  const uSwiperItem = /* @__PURE__ */ _export_sfc(_sfc_main$q, [["__scopeId", "data-v-ef481687"]]);
2386
- const _hoisted_1$n = {
2386
+ const _hoisted_1$m = {
2387
2387
  key: 0,
2388
2388
  class: "u-search__icon"
2389
2389
  };
@@ -2469,7 +2469,7 @@ const _sfc_main$p = /* @__PURE__ */ vue.defineComponent({
2469
2469
  class: "u-search__content",
2470
2470
  style: vue.normalizeStyle(contentStyle.value)
2471
2471
  }, [
2472
- __props.showSearchIcon ? (vue.openBlock(), vue.createElementBlock("view", _hoisted_1$n, [..._cache[0] || (_cache[0] = [
2472
+ __props.showSearchIcon ? (vue.openBlock(), vue.createElementBlock("view", _hoisted_1$m, [..._cache[0] || (_cache[0] = [
2473
2473
  vue.createElementVNode("text", { class: "u-search__icon-text" }, "🔍", -1)
2474
2474
  ])])) : vue.createCommentVNode("", true),
2475
2475
  vue.createElementVNode("view", _hoisted_2$h, [
@@ -2513,7 +2513,7 @@ const _sfc_main$p = /* @__PURE__ */ vue.defineComponent({
2513
2513
  }
2514
2514
  });
2515
2515
  const uSearch = /* @__PURE__ */ _export_sfc(_sfc_main$p, [["__scopeId", "data-v-223b845c"]]);
2516
- const _hoisted_1$m = ["type", "value", "disabled"];
2516
+ const _hoisted_1$l = ["type", "value", "disabled"];
2517
2517
  const __default__$o = {
2518
2518
  options: {
2519
2519
  virtualHost: true,
@@ -2553,8 +2553,8 @@ const _sfc_main$o = /* @__PURE__ */ vue.defineComponent({
2553
2553
  return currentValue.value;
2554
2554
  });
2555
2555
  const btnSize = vue.computed(() => {
2556
- const size2 = props.buttonSize;
2557
- return typeof size2 === "number" ? `${size2}px` : size2;
2556
+ const size = props.buttonSize;
2557
+ return typeof size === "number" ? `${size}px` : size;
2558
2558
  });
2559
2559
  const iptWidth = vue.computed(() => {
2560
2560
  const width = props.inputWidth;
@@ -2661,7 +2661,7 @@ const _sfc_main$o = /* @__PURE__ */ vue.defineComponent({
2661
2661
  onInput: handleInput,
2662
2662
  onBlur: handleBlur,
2663
2663
  onFocus: handleFocus
2664
- }, null, 46, _hoisted_1$m),
2664
+ }, null, 46, _hoisted_1$l),
2665
2665
  vue.createElementVNode("view", {
2666
2666
  class: vue.normalizeClass(["u-number-box__btn u-number-box__btn--plus", {
2667
2667
  "u-number-box__btn--disabled": plusDisabled.value
@@ -2679,7 +2679,7 @@ const _sfc_main$o = /* @__PURE__ */ vue.defineComponent({
2679
2679
  }
2680
2680
  });
2681
2681
  const uNumberBox = /* @__PURE__ */ _export_sfc(_sfc_main$o, [["__scopeId", "data-v-86153bb8"]]);
2682
- const _hoisted_1$l = { class: "u-upload" };
2682
+ const _hoisted_1$k = { class: "u-upload" };
2683
2683
  const _hoisted_2$g = { class: "u-upload__list" };
2684
2684
  const _hoisted_3$d = ["src", "onClick"];
2685
2685
  const _hoisted_4$9 = {
@@ -2810,7 +2810,7 @@ const _sfc_main$n = /* @__PURE__ */ vue.defineComponent({
2810
2810
  fileList
2811
2811
  });
2812
2812
  return (_ctx, _cache) => {
2813
- return vue.openBlock(), vue.createElementBlock("view", _hoisted_1$l, [
2813
+ return vue.openBlock(), vue.createElementBlock("view", _hoisted_1$k, [
2814
2814
  vue.createElementVNode("view", _hoisted_2$g, [
2815
2815
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(fileList.value, (file, index) => {
2816
2816
  return vue.openBlock(), vue.createElementBlock("view", {
@@ -2882,7 +2882,7 @@ const _sfc_main$n = /* @__PURE__ */ vue.defineComponent({
2882
2882
  }
2883
2883
  });
2884
2884
  const uUpload = /* @__PURE__ */ _export_sfc(_sfc_main$n, [["__scopeId", "data-v-172bcb23"]]);
2885
- const _hoisted_1$k = ["value", "placeholder", "placeholder-style", "disabled", "maxlength", "focus", "auto-height", "fixed", "cursor-spacing", "show-confirm-bar", "adjust-position"];
2885
+ const _hoisted_1$j = ["value", "placeholder", "placeholder-style", "disabled", "maxlength", "focus", "auto-height", "fixed", "cursor-spacing", "show-confirm-bar", "adjust-position"];
2886
2886
  const _hoisted_2$f = {
2887
2887
  key: 0,
2888
2888
  class: "u-textarea__limit"
@@ -2974,7 +2974,7 @@ const _sfc_main$m = /* @__PURE__ */ vue.defineComponent({
2974
2974
  onBlur: handleBlur,
2975
2975
  onConfirm: handleConfirm,
2976
2976
  onLinechange: handleLineChange
2977
- }, null, 44, _hoisted_1$k),
2977
+ }, null, 44, _hoisted_1$j),
2978
2978
  __props.showWordLimit && __props.maxlength ? (vue.openBlock(), vue.createElementBlock("view", _hoisted_2$f, [
2979
2979
  vue.createElementVNode("text", _hoisted_3$c, vue.toDisplayString(currentLength.value) + "/" + vue.toDisplayString(__props.maxlength), 1)
2980
2980
  ])) : vue.createCommentVNode("", true)
@@ -2983,7 +2983,7 @@ const _sfc_main$m = /* @__PURE__ */ vue.defineComponent({
2983
2983
  }
2984
2984
  });
2985
2985
  const uTextarea = /* @__PURE__ */ _export_sfc(_sfc_main$m, [["__scopeId", "data-v-82478b77"]]);
2986
- const _hoisted_1$j = {
2986
+ const _hoisted_1$i = {
2987
2987
  key: 0,
2988
2988
  class: "u-slider__min"
2989
2989
  };
@@ -3053,8 +3053,8 @@ const _sfc_main$l = /* @__PURE__ */ vue.defineComponent({
3053
3053
  return typeof height === "number" ? `${height}px` : height;
3054
3054
  });
3055
3055
  const buttonSizeStyle = vue.computed(() => {
3056
- const size2 = props.buttonSize;
3057
- return typeof size2 === "number" ? `${size2}px` : size2;
3056
+ const size = props.buttonSize;
3057
+ return typeof size === "number" ? `${size}px` : size;
3058
3058
  });
3059
3059
  const trackStyle = vue.computed(() => ({
3060
3060
  height: barHeightStyle.value,
@@ -3232,7 +3232,7 @@ const _sfc_main$l = /* @__PURE__ */ vue.defineComponent({
3232
3232
  "u-slider--disabled": __props.disabled
3233
3233
  }])
3234
3234
  }, [
3235
- __props.showMinMax ? (vue.openBlock(), vue.createElementBlock("view", _hoisted_1$j, [
3235
+ __props.showMinMax ? (vue.openBlock(), vue.createElementBlock("view", _hoisted_1$i, [
3236
3236
  vue.createElementVNode("text", _hoisted_2$e, vue.toDisplayString(__props.min), 1)
3237
3237
  ])) : vue.createCommentVNode("", true),
3238
3238
  vue.createElementVNode("view", {
@@ -3302,7 +3302,7 @@ const _sfc_main$l = /* @__PURE__ */ vue.defineComponent({
3302
3302
  }
3303
3303
  });
3304
3304
  const uSlider = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["__scopeId", "data-v-c099c413"]]);
3305
- const _hoisted_1$i = { class: "u-list" };
3305
+ const _hoisted_1$h = { class: "u-list" };
3306
3306
  const _hoisted_2$d = {
3307
3307
  key: 0,
3308
3308
  class: "u-list__header"
@@ -3353,7 +3353,7 @@ const _sfc_main$k = /* @__PURE__ */ vue.defineComponent({
3353
3353
  emit("load");
3354
3354
  };
3355
3355
  return (_ctx, _cache) => {
3356
- return vue.openBlock(), vue.createElementBlock("view", _hoisted_1$i, [
3356
+ return vue.openBlock(), vue.createElementBlock("view", _hoisted_1$h, [
3357
3357
  _ctx.$slots.header || __props.header ? (vue.openBlock(), vue.createElementBlock("view", _hoisted_2$d, [
3358
3358
  vue.renderSlot(_ctx.$slots, "header", {}, () => [
3359
3359
  vue.createTextVNode(vue.toDisplayString(__props.header), 1)
@@ -3386,7 +3386,7 @@ const _sfc_main$k = /* @__PURE__ */ vue.defineComponent({
3386
3386
  }
3387
3387
  });
3388
3388
  const uList = /* @__PURE__ */ _export_sfc(_sfc_main$k, [["__scopeId", "data-v-6d331927"]]);
3389
- const _hoisted_1$h = {
3389
+ const _hoisted_1$g = {
3390
3390
  key: 0,
3391
3391
  class: "u-list-item__icon"
3392
3392
  };
@@ -3460,7 +3460,7 @@ const _sfc_main$j = /* @__PURE__ */ vue.defineComponent({
3460
3460
  }]),
3461
3461
  onClick: handleClick
3462
3462
  }, [
3463
- _ctx.$slots.icon || __props.icon || __props.thumb ? (vue.openBlock(), vue.createElementBlock("view", _hoisted_1$h, [
3463
+ _ctx.$slots.icon || __props.icon || __props.thumb ? (vue.openBlock(), vue.createElementBlock("view", _hoisted_1$g, [
3464
3464
  vue.renderSlot(_ctx.$slots, "icon", {}, () => [
3465
3465
  __props.thumb ? (vue.openBlock(), vue.createElementBlock("image", {
3466
3466
  key: 0,
@@ -3499,7 +3499,7 @@ const _sfc_main$j = /* @__PURE__ */ vue.defineComponent({
3499
3499
  }
3500
3500
  });
3501
3501
  const uListItem = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["__scopeId", "data-v-8c31b17c"]]);
3502
- const _hoisted_1$g = {
3502
+ const _hoisted_1$f = {
3503
3503
  key: 0,
3504
3504
  class: "u-line-progress__text u-line-progress__text--inside"
3505
3505
  };
@@ -3572,7 +3572,7 @@ const _sfc_main$i = /* @__PURE__ */ vue.defineComponent({
3572
3572
  }]),
3573
3573
  style: vue.normalizeStyle(barStyle.value)
3574
3574
  }, [
3575
- __props.showText && __props.textInside && __props.percentage <= 100 ? (vue.openBlock(), vue.createElementBlock("text", _hoisted_1$g, vue.toDisplayString(textContent.value), 1)) : vue.createCommentVNode("", true)
3575
+ __props.showText && __props.textInside && __props.percentage <= 100 ? (vue.openBlock(), vue.createElementBlock("text", _hoisted_1$f, vue.toDisplayString(textContent.value), 1)) : vue.createCommentVNode("", true)
3576
3576
  ], 6)
3577
3577
  ], 4),
3578
3578
  __props.showText && !__props.textInside ? (vue.openBlock(), vue.createElementBlock("text", _hoisted_2$b, vue.toDisplayString(textContent.value), 1)) : vue.createCommentVNode("", true)
@@ -3581,7 +3581,7 @@ const _sfc_main$i = /* @__PURE__ */ vue.defineComponent({
3581
3581
  }
3582
3582
  });
3583
3583
  const uLineProgress = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["__scopeId", "data-v-99121563"]]);
3584
- const _hoisted_1$f = { class: "u-count-down" };
3584
+ const _hoisted_1$e = { class: "u-count-down" };
3585
3585
  const __default__$h = {
3586
3586
  options: {
3587
3587
  virtualHost: true,
@@ -3704,7 +3704,7 @@ const _sfc_main$h = /* @__PURE__ */ vue.defineComponent({
3704
3704
  timeData
3705
3705
  });
3706
3706
  return (_ctx, _cache) => {
3707
- return vue.openBlock(), vue.createElementBlock("view", _hoisted_1$f, [
3707
+ return vue.openBlock(), vue.createElementBlock("view", _hoisted_1$e, [
3708
3708
  vue.renderSlot(_ctx.$slots, "default", {
3709
3709
  time: timeData.value,
3710
3710
  current: current.value
@@ -3719,7 +3719,7 @@ const _sfc_main$h = /* @__PURE__ */ vue.defineComponent({
3719
3719
  }
3720
3720
  });
3721
3721
  const uCountDown = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["__scopeId", "data-v-da70e500"]]);
3722
- const _hoisted_1$e = { class: "u-tooltip__content" };
3722
+ const _hoisted_1$d = { class: "u-tooltip__content" };
3723
3723
  const _hoisted_2$a = {
3724
3724
  key: 0,
3725
3725
  class: "u-tooltip__actions"
@@ -3897,7 +3897,7 @@ const _sfc_main$g = /* @__PURE__ */ vue.defineComponent({
3897
3897
  vue.createElementVNode("view", {
3898
3898
  class: vue.normalizeClass(["u-tooltip__arrow", `u-tooltip__arrow--${actualPlacement.value}`])
3899
3899
  }, null, 2),
3900
- vue.createElementVNode("view", _hoisted_1$e, [
3900
+ vue.createElementVNode("view", _hoisted_1$d, [
3901
3901
  __props.actions.length ? (vue.openBlock(), vue.createElementBlock("view", _hoisted_2$a, [
3902
3902
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(__props.actions, (action, index) => {
3903
3903
  return vue.openBlock(), vue.createElementBlock("view", {
@@ -3918,7 +3918,7 @@ const _sfc_main$g = /* @__PURE__ */ vue.defineComponent({
3918
3918
  }
3919
3919
  });
3920
3920
  const uTooltip = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["__scopeId", "data-v-dd1bff02"]]);
3921
- const _hoisted_1$d = ["src"];
3921
+ const _hoisted_1$c = ["src"];
3922
3922
  const _hoisted_2$9 = {
3923
3923
  key: 1,
3924
3924
  class: "u-avatar__text"
@@ -3985,9 +3985,9 @@ const _sfc_main$f = /* @__PURE__ */ vue.defineComponent({
3985
3985
  ]);
3986
3986
  const avatarStyle = vue.computed(() => {
3987
3987
  const style = {};
3988
- const size2 = avatarSize.value;
3989
- style.width = `${size2}px`;
3990
- style.height = `${size2}px`;
3988
+ const size = avatarSize.value;
3989
+ style.width = `${size}px`;
3990
+ style.height = `${size}px`;
3991
3991
  if (props.bgColor) {
3992
3992
  style.backgroundColor = props.bgColor;
3993
3993
  }
@@ -4017,7 +4017,7 @@ const _sfc_main$f = /* @__PURE__ */ vue.defineComponent({
4017
4017
  src: __props.src,
4018
4018
  mode: "aspectFill",
4019
4019
  onError: handleError
4020
- }, null, 40, _hoisted_1$d)) : __props.text ? (vue.openBlock(), vue.createElementBlock("text", _hoisted_2$9, vue.toDisplayString(displayText.value), 1)) : (vue.openBlock(), vue.createElementBlock("text", _hoisted_3$7, vue.toDisplayString(__props.icon || "👤"), 1))
4020
+ }, null, 40, _hoisted_1$c)) : __props.text ? (vue.openBlock(), vue.createElementBlock("text", _hoisted_2$9, vue.toDisplayString(displayText.value), 1)) : (vue.openBlock(), vue.createElementBlock("text", _hoisted_3$7, vue.toDisplayString(__props.icon || "👤"), 1))
4021
4021
  ], true),
4022
4022
  __props.badge && !badgeSlot.value ? (vue.openBlock(), vue.createElementBlock("view", {
4023
4023
  key: 0,
@@ -4031,7 +4031,7 @@ const _sfc_main$f = /* @__PURE__ */ vue.defineComponent({
4031
4031
  }
4032
4032
  });
4033
4033
  const uAvatar = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["__scopeId", "data-v-10f478fe"]]);
4034
- const _hoisted_1$c = { class: "u-empty__image" };
4034
+ const _hoisted_1$b = { class: "u-empty__image" };
4035
4035
  const _hoisted_2$8 = ["src"];
4036
4036
  const _hoisted_3$6 = {
4037
4037
  key: 1,
@@ -4064,7 +4064,7 @@ const _sfc_main$e = /* @__PURE__ */ vue.defineComponent({
4064
4064
  return vue.openBlock(), vue.createElementBlock("view", {
4065
4065
  class: vue.normalizeClass(["u-empty", { "u-empty--inline": __props.inline }])
4066
4066
  }, [
4067
- vue.createElementVNode("view", _hoisted_1$c, [
4067
+ vue.createElementVNode("view", _hoisted_1$b, [
4068
4068
  vue.renderSlot(_ctx.$slots, "image", {}, () => [
4069
4069
  __props.image ? (vue.openBlock(), vue.createElementBlock("image", {
4070
4070
  key: 0,
@@ -4089,7 +4089,7 @@ const _sfc_main$e = /* @__PURE__ */ vue.defineComponent({
4089
4089
  }
4090
4090
  });
4091
4091
  const uEmpty = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["__scopeId", "data-v-853e089d"]]);
4092
- const _hoisted_1$b = {
4092
+ const _hoisted_1$a = {
4093
4093
  key: 0,
4094
4094
  class: "u-checkbox__check"
4095
4095
  };
@@ -4172,7 +4172,7 @@ const _sfc_main$d = /* @__PURE__ */ vue.defineComponent({
4172
4172
  class: vue.normalizeClass(["u-checkbox__icon", iconClass.value]),
4173
4173
  style: vue.normalizeStyle(iconStyle.value)
4174
4174
  }, [
4175
- checked.value ? (vue.openBlock(), vue.createElementBlock("text", _hoisted_1$b, "✓")) : vue.createCommentVNode("", true)
4175
+ checked.value ? (vue.openBlock(), vue.createElementBlock("text", _hoisted_1$a, "✓")) : vue.createCommentVNode("", true)
4176
4176
  ], 6),
4177
4177
  __props.label || _ctx.$slots.default ? (vue.openBlock(), vue.createElementBlock("view", _hoisted_2$7, [
4178
4178
  vue.renderSlot(_ctx.$slots, "default", {}, () => [
@@ -4184,7 +4184,7 @@ const _sfc_main$d = /* @__PURE__ */ vue.defineComponent({
4184
4184
  }
4185
4185
  });
4186
4186
  const uCheckbox = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["__scopeId", "data-v-6f3ea0c6"]]);
4187
- const _hoisted_1$a = { class: "u-checkbox-group" };
4187
+ const _hoisted_1$9 = { class: "u-checkbox-group" };
4188
4188
  const __default__$c = {
4189
4189
  options: {
4190
4190
  virtualHost: true,
@@ -4227,14 +4227,14 @@ const _sfc_main$c = /* @__PURE__ */ vue.defineComponent({
4227
4227
  toggle
4228
4228
  });
4229
4229
  return (_ctx, _cache) => {
4230
- return vue.openBlock(), vue.createElementBlock("view", _hoisted_1$a, [
4230
+ return vue.openBlock(), vue.createElementBlock("view", _hoisted_1$9, [
4231
4231
  vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
4232
4232
  ]);
4233
4233
  };
4234
4234
  }
4235
4235
  });
4236
4236
  const uCheckboxGroup = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["__scopeId", "data-v-4e51c49e"]]);
4237
- const _hoisted_1$9 = {
4237
+ const _hoisted_1$8 = {
4238
4238
  key: 0,
4239
4239
  class: "u-radio__dot"
4240
4240
  };
@@ -4314,7 +4314,7 @@ const _sfc_main$b = /* @__PURE__ */ vue.defineComponent({
4314
4314
  class: vue.normalizeClass(["u-radio__icon", iconClass.value]),
4315
4315
  style: vue.normalizeStyle(iconStyle.value)
4316
4316
  }, [
4317
- checked.value ? (vue.openBlock(), vue.createElementBlock("view", _hoisted_1$9)) : vue.createCommentVNode("", true)
4317
+ checked.value ? (vue.openBlock(), vue.createElementBlock("view", _hoisted_1$8)) : vue.createCommentVNode("", true)
4318
4318
  ], 6),
4319
4319
  __props.label || _ctx.$slots.default ? (vue.openBlock(), vue.createElementBlock("view", _hoisted_2$6, [
4320
4320
  vue.renderSlot(_ctx.$slots, "default", {}, () => [
@@ -4326,7 +4326,7 @@ const _sfc_main$b = /* @__PURE__ */ vue.defineComponent({
4326
4326
  }
4327
4327
  });
4328
4328
  const uRadio = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["__scopeId", "data-v-3b4f8627"]]);
4329
- const _hoisted_1$8 = { class: "u-radio-group" };
4329
+ const _hoisted_1$7 = { class: "u-radio-group" };
4330
4330
  const __default__$a = {
4331
4331
  options: {
4332
4332
  virtualHost: true,
@@ -4360,14 +4360,14 @@ const _sfc_main$a = /* @__PURE__ */ vue.defineComponent({
4360
4360
  select
4361
4361
  });
4362
4362
  return (_ctx, _cache) => {
4363
- return vue.openBlock(), vue.createElementBlock("view", _hoisted_1$8, [
4363
+ return vue.openBlock(), vue.createElementBlock("view", _hoisted_1$7, [
4364
4364
  vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
4365
4365
  ]);
4366
4366
  };
4367
4367
  }
4368
4368
  });
4369
4369
  const uRadioGroup = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["__scopeId", "data-v-04ea4949"]]);
4370
- const _hoisted_1$7 = { class: "u-toast__content" };
4370
+ const _hoisted_1$6 = { class: "u-toast__content" };
4371
4371
  const _hoisted_2$5 = {
4372
4372
  key: 0,
4373
4373
  class: "u-toast__loading"
@@ -4451,7 +4451,7 @@ const _sfc_main$9 = /* @__PURE__ */ vue.defineComponent({
4451
4451
  class: vue.normalizeClass(["u-toast", toastClass.value]),
4452
4452
  style: vue.normalizeStyle(toastStyle.value)
4453
4453
  }, [
4454
- vue.createElementVNode("view", _hoisted_1$7, [
4454
+ vue.createElementVNode("view", _hoisted_1$6, [
4455
4455
  __props.type === "loading" ? (vue.openBlock(), vue.createElementBlock("view", _hoisted_2$5, [..._cache[0] || (_cache[0] = [
4456
4456
  vue.createElementVNode("view", { class: "u-toast__loading-icon" }, null, -1)
4457
4457
  ])])) : __props.icon ? (vue.openBlock(), vue.createElementBlock("text", _hoisted_3$5, vue.toDisplayString(__props.icon), 1)) : vue.createCommentVNode("", true),
@@ -4462,7 +4462,7 @@ const _sfc_main$9 = /* @__PURE__ */ vue.defineComponent({
4462
4462
  }
4463
4463
  });
4464
4464
  const uToast = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["__scopeId", "data-v-ffefead4"]]);
4465
- const _hoisted_1$6 = {
4465
+ const _hoisted_1$5 = {
4466
4466
  key: 0,
4467
4467
  class: "u-popup"
4468
4468
  };
@@ -4497,7 +4497,7 @@ const _sfc_main$8 = /* @__PURE__ */ vue.defineComponent({
4497
4497
  emit("close");
4498
4498
  };
4499
4499
  return (_ctx, _cache) => {
4500
- return __props.visible ? (vue.openBlock(), vue.createElementBlock("view", _hoisted_1$6, [
4500
+ return __props.visible ? (vue.openBlock(), vue.createElementBlock("view", _hoisted_1$5, [
4501
4501
  vue.createElementVNode("view", {
4502
4502
  class: "u-popup__overlay",
4503
4503
  onClick: handleOverlayClick
@@ -4519,7 +4519,7 @@ const _sfc_main$8 = /* @__PURE__ */ vue.defineComponent({
4519
4519
  }
4520
4520
  });
4521
4521
  const uPopup = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["__scopeId", "data-v-dc430e12"]]);
4522
- const _hoisted_1$5 = { class: "u-code-input" };
4522
+ const _hoisted_1$4 = { class: "u-code-input" };
4523
4523
  const _hoisted_2$4 = { class: "u-code-input__wrapper" };
4524
4524
  const _hoisted_3$4 = {
4525
4525
  key: 0,
@@ -4618,7 +4618,7 @@ const _sfc_main$7 = /* @__PURE__ */ vue.defineComponent({
4618
4618
  emit("blur");
4619
4619
  };
4620
4620
  return (_ctx, _cache) => {
4621
- return vue.openBlock(), vue.createElementBlock("view", _hoisted_1$5, [
4621
+ return vue.openBlock(), vue.createElementBlock("view", _hoisted_1$4, [
4622
4622
  vue.createElementVNode("view", _hoisted_2$4, [
4623
4623
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(__props.length, (i) => {
4624
4624
  return vue.openBlock(), vue.createElementBlock("view", {
@@ -4648,7 +4648,7 @@ const _sfc_main$7 = /* @__PURE__ */ vue.defineComponent({
4648
4648
  }
4649
4649
  });
4650
4650
  const uCodeInput = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["__scopeId", "data-v-9fffa23f"]]);
4651
- const _hoisted_1$4 = {
4651
+ const _hoisted_1$3 = {
4652
4652
  key: 0,
4653
4653
  class: "u-skeleton__content"
4654
4654
  };
@@ -4678,10 +4678,10 @@ const _sfc_main$6 = /* @__PURE__ */ vue.defineComponent({
4678
4678
  setup(__props) {
4679
4679
  const props = __props;
4680
4680
  const avatarStyle = vue.computed(() => {
4681
- const size2 = typeof props.avatarSize === "number" ? `${props.avatarSize}px` : props.avatarSize;
4681
+ const size = typeof props.avatarSize === "number" ? `${props.avatarSize}px` : props.avatarSize;
4682
4682
  return {
4683
- width: size2,
4684
- height: size2
4683
+ width: size,
4684
+ height: size
4685
4685
  };
4686
4686
  });
4687
4687
  const titleStyle = vue.computed(() => {
@@ -4714,7 +4714,7 @@ const _sfc_main$6 = /* @__PURE__ */ vue.defineComponent({
4714
4714
  return style;
4715
4715
  };
4716
4716
  return (_ctx, _cache) => {
4717
- return !__props.loading ? (vue.openBlock(), vue.createElementBlock("view", _hoisted_1$4, [
4717
+ return !__props.loading ? (vue.openBlock(), vue.createElementBlock("view", _hoisted_1$3, [
4718
4718
  vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
4719
4719
  ])) : (vue.openBlock(), vue.createElementBlock("view", {
4720
4720
  key: 1,
@@ -4879,7 +4879,7 @@ const _sfc_main$4 = /* @__PURE__ */ vue.defineComponent({
4879
4879
  }
4880
4880
  });
4881
4881
  const uLink = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-f60d6c27"]]);
4882
- const _hoisted_1$3 = { class: "u-read-more" };
4882
+ const _hoisted_1$2 = { class: "u-read-more" };
4883
4883
  const _hoisted_2$2 = { class: "u-read-more__toggle-text" };
4884
4884
  const _hoisted_3$2 = { class: "u-read-more__toggle-icon" };
4885
4885
  const __default__$3 = {
@@ -4928,7 +4928,7 @@ const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
4928
4928
  }
4929
4929
  };
4930
4930
  return (_ctx, _cache) => {
4931
- return vue.openBlock(), vue.createElementBlock("view", _hoisted_1$3, [
4931
+ return vue.openBlock(), vue.createElementBlock("view", _hoisted_1$2, [
4932
4932
  vue.createElementVNode("view", {
4933
4933
  class: "u-read-more__content",
4934
4934
  style: vue.normalizeStyle(contentStyle.value)
@@ -4948,7 +4948,7 @@ const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
4948
4948
  }
4949
4949
  });
4950
4950
  const uReadMore = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-b31720eb"]]);
4951
- const _hoisted_1$2 = { class: "u-tabbar" };
4951
+ const _hoisted_1$1 = { class: "u-tabbar" };
4952
4952
  const _hoisted_2$1 = { class: "u-tabbar__nav-wrap" };
4953
4953
  const _hoisted_3$1 = { class: "u-tabbar__center" };
4954
4954
  const _hoisted_4 = { class: "u-tabbar__center-brand" };
@@ -4980,7 +4980,7 @@ const _sfc_main$2 = /* @__PURE__ */ vue.defineComponent({
4980
4980
  emit("tab-change", tab);
4981
4981
  };
4982
4982
  return (_ctx, _cache) => {
4983
- return vue.openBlock(), vue.createElementBlock("view", _hoisted_1$2, [
4983
+ return vue.openBlock(), vue.createElementBlock("view", _hoisted_1$1, [
4984
4984
  vue.createElementVNode("view", _hoisted_2$1, [
4985
4985
  vue.createElementVNode("view", {
4986
4986
  class: vue.normalizeClass(["u-tabbar__tab-btn", { "u-tabbar__tab-btn--active": __props.modelValue === __props.leftTab.value }]),
@@ -5030,7 +5030,6 @@ const _sfc_main$2 = /* @__PURE__ */ vue.defineComponent({
5030
5030
  }
5031
5031
  });
5032
5032
  const uTabbar = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-10cb84bc"]]);
5033
- const _hoisted_1$1 = { class: "u-qrcode" };
5034
5033
  const __default__$1 = {
5035
5034
  options: {
5036
5035
  virtualHost: true,
@@ -5049,234 +5048,212 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
5049
5048
  },
5050
5049
  setup(__props) {
5051
5050
  const props = __props;
5052
- const matrix = vue.ref([]);
5051
+ const modules = vue.ref([]);
5052
+ const qrSize = vue.ref(0);
5053
5053
  const cellSize = vue.computed(() => {
5054
- if (matrix.value.length === 0) return 0;
5055
- return props.size / matrix.value.length;
5056
- });
5057
- const matrixStyle = vue.computed(() => ({
5058
- width: `${props.size}px`,
5059
- height: `${props.size}px`,
5060
- backgroundColor: props.bgColor
5061
- }));
5062
- const cellStyle = (cell) => ({
5063
- width: `${cellSize.value}px`,
5064
- height: `${cellSize.value}px`,
5065
- backgroundColor: cell === 1 ? props.color : props.bgColor
5054
+ if (qrSize.value === 0) return 0;
5055
+ return props.size / qrSize.value;
5066
5056
  });
5067
5057
  class QRCodeGenerator {
5068
- // 根据数据长度获取版本
5058
+ // 初始化 GF 表
5059
+ static initGF() {
5060
+ if (this.GF_EXP.length > 0) return;
5061
+ let x = 1;
5062
+ for (let i = 0; i < 255; i++) {
5063
+ this.GF_EXP[i] = x;
5064
+ this.GF_LOG[x] = i;
5065
+ x = x * 2;
5066
+ if (x >= 256) x ^= 285;
5067
+ }
5068
+ for (let i = 255; i < 512; i++) {
5069
+ this.GF_EXP[i] = this.GF_EXP[i - 255];
5070
+ }
5071
+ }
5072
+ // GF 乘法
5073
+ static gfMul(a, b) {
5074
+ if (a === 0 || b === 0) return 0;
5075
+ return this.GF_EXP[this.GF_LOG[a] + this.GF_LOG[b]];
5076
+ }
5077
+ // 获取版本
5069
5078
  static getVersion(dataLength) {
5070
5079
  for (let v = 1; v <= 40; v++) {
5071
5080
  if (this.CAPACITY[v] >= dataLength) return v;
5072
5081
  }
5073
5082
  return 40;
5074
5083
  }
5075
- // 生成二维码矩阵
5076
- static generate(data, ecl) {
5084
+ // 生成二维码
5085
+ static generate(data) {
5086
+ this.initGF();
5077
5087
  const version = this.getVersion(data.length);
5078
- const size2 = version * 4 + 17;
5079
- const matrix2 = [];
5080
- for (let i = 0; i < size2; i++) {
5081
- matrix2[i] = new Array(size2).fill(-1);
5088
+ const size = version * 4 + 17;
5089
+ const matrix = [];
5090
+ for (let i = 0; i < size; i++) {
5091
+ matrix[i] = new Array(size).fill(-1);
5082
5092
  }
5083
- this.addFinderPattern(matrix2, 0, 0);
5084
- this.addFinderPattern(matrix2, size2 - 7, 0);
5085
- this.addFinderPattern(matrix2, 0, size2 - 7);
5086
- this.addSeparator(matrix2, size2);
5093
+ this.addFinderPatterns(matrix, size);
5094
+ this.addTimingPatterns(matrix, size);
5095
+ this.addDarkModule(matrix, size);
5087
5096
  if (version >= 2) {
5088
- this.addAlignmentPatterns(matrix2, version);
5097
+ this.addAlignmentPatterns(matrix, version, size);
5098
+ }
5099
+ const codewords = this.encodeData(data, version);
5100
+ this.fillData(matrix, codewords, size);
5101
+ this.applyMask(matrix, size, 0);
5102
+ this.addFormatInfo(matrix, size, 0);
5103
+ for (let row = 0; row < size; row++) {
5104
+ for (let col = 0; col < size; col++) {
5105
+ if (matrix[row][col] === -1) matrix[row][col] = 0;
5106
+ }
5089
5107
  }
5090
- this.addTimingPatterns(matrix2, size2);
5091
- matrix2[size2 - 8][8] = 1;
5092
- this.reserveFormatArea(matrix2, size2);
5093
- const encodedData = this.encodeData(data, version, ecl);
5094
- this.fillData(matrix2, encodedData, size2);
5095
- this.applyMask(matrix2, size2, 0);
5096
- this.addFormatInfo(matrix2, size2, ecl, 0);
5097
- return matrix2;
5098
- }
5099
- // 添加定位图案(7x7 的方块)
5100
- static addFinderPattern(matrix2, row, col) {
5101
- for (let r = -1; r <= 7; r++) {
5102
- for (let c = -1; c <= 7; c++) {
5103
- const tr = row + r;
5104
- const tc = col + c;
5105
- if (tr >= 0 && tr < matrix2.length && tc >= 0 && tc < matrix2.length) {
5106
- if (r === -1 || r === 7 || c === -1 || c === 7) {
5107
- matrix2[tr][tc] = 0;
5108
- } else if (
5109
- // 外框
5110
- r === 0 || r === 6 || c === 0 || c === 6 || // 内框(中心 3x3)
5111
- r >= 2 && r <= 4 && c >= 2 && c <= 4
5112
- ) {
5113
- matrix2[tr][tc] = 1;
5114
- } else {
5115
- matrix2[tr][tc] = 0;
5108
+ return { size, modules: matrix };
5109
+ }
5110
+ // 添加定位图案
5111
+ static addFinderPatterns(matrix, size) {
5112
+ const positions = [[0, 0], [size - 7, 0], [0, size - 7]];
5113
+ for (const [startRow, startCol] of positions) {
5114
+ for (let r = 0; r < 7; r++) {
5115
+ for (let c = 0; c < 7; c++) {
5116
+ const row = startRow + r;
5117
+ const col = startCol + c;
5118
+ if (row >= 0 && row < size && col >= 0 && col < size) {
5119
+ if (r === 0 || r === 6 || c === 0 || c === 6 || r >= 2 && r <= 4 && c >= 2 && c <= 4) {
5120
+ matrix[row][col] = 1;
5121
+ } else {
5122
+ matrix[row][col] = 0;
5123
+ }
5116
5124
  }
5117
5125
  }
5118
5126
  }
5127
+ for (let i = 0; i < 8; i++) {
5128
+ if (startCol + 7 < size && startRow + i < size && startRow + i >= 0) {
5129
+ matrix[startRow + i][startCol + 7] = 0;
5130
+ }
5131
+ if (startRow + 7 < size && startCol + i < size && startCol + i >= 0) {
5132
+ matrix[startRow + 7][startCol + i] = 0;
5133
+ }
5134
+ }
5135
+ }
5136
+ }
5137
+ // 添加时序图案
5138
+ static addTimingPatterns(matrix, size) {
5139
+ for (let i = 8; i < size - 8; i++) {
5140
+ if (matrix[6][i] === -1) matrix[6][i] = i % 2 === 0 ? 1 : 0;
5141
+ if (matrix[i][6] === -1) matrix[i][6] = i % 2 === 0 ? 1 : 0;
5119
5142
  }
5120
5143
  }
5121
- // 添加分隔符
5122
- static addSeparator(matrix2, size2) {
5144
+ // 添加暗模块
5145
+ static addDarkModule(matrix, size) {
5146
+ matrix[size - 8][8] = 1;
5123
5147
  }
5124
5148
  // 添加定位图案
5125
- static addAlignmentPatterns(matrix2, version) {
5126
- const positions = this.getAlignmentPositions(version);
5149
+ static addAlignmentPatterns(matrix, version, size) {
5150
+ const positions = this.getAlignmentPositions(version, size);
5127
5151
  for (const row of positions) {
5128
5152
  for (const col of positions) {
5129
- if (row < 9 && col < 9 || row < 9 && col > size - 9 || row > size - 9 && col < 9) {
5130
- continue;
5131
- }
5132
- if (matrix2[row] && matrix2[row][col] === -1) {
5133
- this.addAlignmentPattern(matrix2, row, col);
5153
+ if (matrix[row][col] !== -1) continue;
5154
+ for (let r = -2; r <= 2; r++) {
5155
+ for (let c = -2; c <= 2; c++) {
5156
+ const tr = row + r;
5157
+ const tc = col + c;
5158
+ if (tr >= 0 && tr < size && tc >= 0 && tc < size && matrix[tr][tc] === -1) {
5159
+ if (Math.abs(r) === 2 || Math.abs(c) === 2 || r === 0 && c === 0) {
5160
+ matrix[tr][tc] = 1;
5161
+ } else {
5162
+ matrix[tr][tc] = 0;
5163
+ }
5164
+ }
5165
+ }
5134
5166
  }
5135
5167
  }
5136
5168
  }
5137
5169
  }
5138
5170
  // 获取定位图案位置
5139
- static getAlignmentPositions(version) {
5171
+ static getAlignmentPositions(version, size) {
5140
5172
  if (version === 1) return [];
5141
- const intervals = Math.floor(version / 7) + 1;
5142
- const size2 = version * 4 + 17;
5143
- const step = Math.ceil((size2 - 13) / intervals);
5144
5173
  const positions = [6];
5145
- for (let i = 1; i <= intervals; i++) {
5146
- positions.push(size2 - 7 - (intervals - i) * step);
5147
- }
5148
- return positions.sort((a, b) => a - b);
5149
- }
5150
- // 添加单个定位图案(5x5)
5151
- static addAlignmentPattern(matrix2, row, col) {
5152
- for (let r = -2; r <= 2; r++) {
5153
- for (let c = -2; c <= 2; c++) {
5154
- const tr = row + r;
5155
- const tc = col + c;
5156
- if (tr >= 0 && tr < matrix2.length && tc >= 0 && tc < matrix2.length) {
5157
- if (Math.abs(r) === 2 || Math.abs(c) === 2 || r === 0 && c === 0) {
5158
- matrix2[tr][tc] = 1;
5159
- } else {
5160
- matrix2[tr][tc] = 0;
5161
- }
5162
- }
5163
- }
5164
- }
5165
- }
5166
- // 添加时序图案
5167
- static addTimingPatterns(matrix2, size2) {
5168
- for (let i = 8; i < size2 - 8; i++) {
5169
- if (matrix2[6][i] === -1) {
5170
- matrix2[6][i] = i % 2 === 0 ? 1 : 0;
5171
- }
5172
- if (matrix2[i][6] === -1) {
5173
- matrix2[i][6] = i % 2 === 0 ? 1 : 0;
5174
- }
5175
- }
5176
- }
5177
- // 保留格式信息区域
5178
- static reserveFormatArea(matrix2, size2) {
5179
- for (let i = 0; i < 9; i++) {
5180
- if (matrix2[8] && matrix2[8][i] === -1) matrix2[8][i] = 0;
5181
- if (matrix2[i] && matrix2[i][8] === -1) matrix2[i][8] = 0;
5182
- }
5183
- for (let i = 0; i < 8; i++) {
5184
- if (matrix2[8] && matrix2[8][size2 - 1 - i] === -1) matrix2[8][size2 - 1 - i] = 0;
5185
- if (matrix2[size2 - 1 - i] && matrix2[size2 - 1 - i][8] === -1) matrix2[size2 - 1 - i][8] = 0;
5174
+ const intervals = Math.floor(version / 7) + 1;
5175
+ const step = Math.ceil((size - 13) / intervals);
5176
+ let pos = size - 7;
5177
+ while (pos > 6) {
5178
+ positions.unshift(pos);
5179
+ pos -= step;
5186
5180
  }
5181
+ return positions;
5187
5182
  }
5188
5183
  // 编码数据
5189
- static encodeData(data, version, ecl) {
5184
+ static encodeData(data, version) {
5190
5185
  const bits = [];
5191
5186
  bits.push(0, 1, 0, 0);
5192
5187
  const cciBits = version <= 9 ? 8 : 16;
5193
- const len = data.length;
5194
5188
  for (let i = cciBits - 1; i >= 0; i--) {
5195
- bits.push(len >> i & 1);
5189
+ bits.push(data.length >> i & 1);
5196
5190
  }
5197
- for (let i = 0; i < data.length; i++) {
5198
- const code2 = data.charCodeAt(i);
5199
- for (let j = 7; j >= 0; j--) {
5200
- bits.push(code2 >> j & 1);
5191
+ for (const char of data) {
5192
+ const code2 = char.charCodeAt(0);
5193
+ for (let i = 7; i >= 0; i--) {
5194
+ bits.push(code2 >> i & 1);
5201
5195
  }
5202
5196
  }
5203
- const terminatorLength = Math.min(4, this.getDataCapacity(version) * 8 - bits.length);
5204
- for (let i = 0; i < terminatorLength; i++) {
5205
- bits.push(0);
5197
+ const totalDataBits = (this.TOTAL_CODEWORDS[version] - this.ECC_CODEWORDS[version]) * 8;
5198
+ const termLen = Math.min(4, totalDataBits - bits.length);
5199
+ for (let i = 0; i < termLen; i++) bits.push(0);
5200
+ while (bits.length % 8 !== 0) bits.push(0);
5201
+ const padBytes = [236, 17];
5202
+ let padIdx = 0;
5203
+ while (bits.length < totalDataBits) {
5204
+ for (let i = 7; i >= 0; i--) {
5205
+ bits.push(padBytes[padIdx] >> i & 1);
5206
+ }
5207
+ padIdx = (padIdx + 1) % 2;
5206
5208
  }
5207
- while (bits.length % 8 !== 0) {
5208
- bits.push(0);
5209
+ const dataBytes = [];
5210
+ for (let i = 0; i < bits.length; i += 8) {
5211
+ let b = 0;
5212
+ for (let j = 0; j < 8; j++) b = b << 1 | bits[i + j];
5213
+ dataBytes.push(b);
5209
5214
  }
5210
- const totalCodewords = this.getDataCapacity(version);
5211
- while (bits.length < totalCodewords * 8) {
5212
- const padByte = bits.length / 8 % 2 === 0 ? [1, 1, 1, 0, 1, 1, 0, 0] : [0, 0, 0, 1, 0, 0, 0, 1];
5213
- bits.push(...padByte);
5215
+ const eccBytes = this.generateECC(dataBytes, this.ECC_CODEWORDS[version]);
5216
+ return [...dataBytes, ...eccBytes];
5217
+ }
5218
+ // Reed-Solomon 纠错码生成
5219
+ static generateECC(data, eccCount) {
5220
+ const genPoly = [1];
5221
+ for (let i = 0; i < eccCount; i++) {
5222
+ const temp = new Array(genPoly.length + 1).fill(0);
5223
+ for (let j = 0; j < genPoly.length; j++) {
5224
+ temp[j] ^= genPoly[j];
5225
+ temp[j + 1] ^= this.gfMul(genPoly[j], this.GF_EXP[i]);
5226
+ }
5227
+ genPoly.length = 0;
5228
+ genPoly.push(...temp);
5214
5229
  }
5215
- const bytes = [];
5216
- for (let i = 0; i < bits.length; i += 8) {
5217
- let byte = 0;
5218
- for (let j = 0; j < 8; j++) {
5219
- byte = byte << 1 | bits[i + j];
5230
+ const ecc = new Array(eccCount).fill(0);
5231
+ for (const byte of data) {
5232
+ const factor = byte ^ ecc[0];
5233
+ ecc.shift();
5234
+ ecc.push(0);
5235
+ for (let i = 0; i < eccCount; i++) {
5236
+ ecc[i] ^= this.gfMul(genPoly[i], factor);
5220
5237
  }
5221
- bytes.push(byte);
5222
5238
  }
5223
- return bytes;
5224
- }
5225
- // 获取数据容量(码字数)
5226
- static getDataCapacity(version) {
5227
- const totalCodewords = [
5228
- 0,
5229
- 26,
5230
- 44,
5231
- 70,
5232
- 100,
5233
- 134,
5234
- 172,
5235
- 196,
5236
- 242,
5237
- 292,
5238
- 346,
5239
- 404,
5240
- 466,
5241
- 532,
5242
- 581,
5243
- 625,
5244
- 733,
5245
- 815,
5246
- 901,
5247
- 993,
5248
- 1079,
5249
- 1157,
5250
- 1253,
5251
- 1353,
5252
- 1453,
5253
- 1553,
5254
- 1673,
5255
- 1793,
5256
- 1913,
5257
- 2033
5258
- ];
5259
- const eccPerBlock = [0, 10, 16, 22, 28, 36, 44, 52, 64, 72];
5260
- const blocks = [0, 1, 1, 1, 1, 1, 2, 2, 2, 2];
5261
- const totalEcc = eccPerBlock[version] * blocks[version];
5262
- return totalCodewords[version] - totalEcc;
5263
- }
5264
- // 填充数据到矩阵
5265
- static fillData(matrix2, data, size2) {
5266
- let bitIndex = 0;
5239
+ return ecc;
5240
+ }
5241
+ // 填充数据
5242
+ static fillData(matrix, codewords, size) {
5243
+ let bitIdx = 0;
5267
5244
  let upward = true;
5268
- for (let col = size2 - 1; col >= 1; col -= 2) {
5245
+ for (let col = size - 1; col >= 0; col -= 2) {
5269
5246
  if (col === 6) col = 5;
5270
- for (let row = upward ? size2 - 1 : 0; upward ? row >= 0 : row < size2; upward ? row-- : row++) {
5247
+ for (let row = upward ? size - 1 : 0; upward ? row >= 0 : row < size; upward ? row-- : row++) {
5271
5248
  for (let c = 0; c < 2; c++) {
5272
- const currentCol = col - c;
5273
- if (matrix2[row] && matrix2[row][currentCol] === -1) {
5249
+ const tc = col - c;
5250
+ if (tc >= 0 && matrix[row][tc] === -1) {
5274
5251
  let bit = 0;
5275
- if (bitIndex < data.length * 8) {
5276
- bit = data[Math.floor(bitIndex / 8)] >> 7 - bitIndex % 8 & 1;
5252
+ if (bitIdx < codewords.length * 8) {
5253
+ bit = codewords[Math.floor(bitIdx / 8)] >> 7 - bitIdx % 8 & 1;
5277
5254
  }
5278
- matrix2[row][currentCol] = bit;
5279
- bitIndex++;
5255
+ matrix[row][tc] = bit;
5256
+ bitIdx++;
5280
5257
  }
5281
5258
  }
5282
5259
  }
@@ -5284,160 +5261,175 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
5284
5261
  }
5285
5262
  }
5286
5263
  // 应用掩码
5287
- static applyMask(matrix2, size2, maskPattern) {
5288
- for (let row = 0; row < size2; row++) {
5289
- for (let col = 0; col < size2; col++) {
5290
- if (matrix2[row][col] >= 0 && !this.isReserved(row, col, size2)) {
5291
- if (this.getMaskBit(row, col, maskPattern)) {
5292
- matrix2[row][col] = matrix2[row][col] === 1 ? 0 : 1;
5264
+ static applyMask(matrix, size, mask) {
5265
+ for (let row = 0; row < size; row++) {
5266
+ for (let col = 0; col < size; col++) {
5267
+ if (matrix[row][col] >= 0) {
5268
+ let invert = false;
5269
+ if (mask === 0) invert = (row + col) % 2 === 0;
5270
+ if (invert) {
5271
+ matrix[row][col] = matrix[row][col] === 1 ? 0 : 1;
5293
5272
  }
5294
5273
  }
5295
5274
  }
5296
5275
  }
5297
5276
  }
5298
- // 判断是否是保留区域
5299
- static isReserved(row, col, size2) {
5300
- if (row < 9 && col < 9) return true;
5301
- if (row < 9 && col > size2 - 9) return true;
5302
- if (row > size2 - 9 && col < 9) return true;
5303
- if (row === 6 || col === 6) return true;
5304
- if (row === size2 - 8 && col === 8) return true;
5305
- return false;
5306
- }
5307
- // 计算掩码位
5308
- static getMaskBit(row, col, pattern) {
5309
- switch (pattern) {
5310
- case 0:
5311
- return (row + col) % 2 === 0;
5312
- case 1:
5313
- return row % 2 === 0;
5314
- case 2:
5315
- return col % 3 === 0;
5316
- case 3:
5317
- return (row + col) % 3 === 0;
5318
- case 4:
5319
- return (Math.floor(row / 2) + Math.floor(col / 3)) % 2 === 0;
5320
- case 5:
5321
- return row * col % 2 + row * col % 3 === 0;
5322
- case 6:
5323
- return (row * col % 2 + row * col % 3) % 2 === 0;
5324
- case 7:
5325
- return ((row + col) % 2 + row * col % 3) % 2 === 0;
5326
- default:
5327
- return false;
5328
- }
5329
- }
5330
5277
  // 添加格式信息
5331
- static addFormatInfo(matrix2, size2, ecl, maskPattern) {
5332
- const eclBits = { L: 1, M: 0, Q: 3, H: 2 };
5333
- const formatData = eclBits[ecl] << 3 | maskPattern;
5334
- const bchBits = this.calculateBCH(formatData);
5335
- const formatBits = [];
5336
- for (let i = 14; i >= 0; i--) {
5337
- if (i >= 5) {
5338
- formatBits.push(bchBits >> i & 1);
5339
- } else {
5340
- formatBits.push(formatData >> i & 1);
5341
- }
5342
- }
5343
- const maskBits = [1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0];
5344
- for (let i = 0; i < 15; i++) {
5345
- formatBits[i] = formatBits[i] ^ maskBits[i];
5346
- }
5347
- for (let i = 0; i < 6; i++) {
5348
- matrix2[8][i] = formatBits[14 - i];
5349
- }
5350
- matrix2[8][7] = formatBits[8];
5351
- matrix2[8][8] = formatBits[7];
5352
- matrix2[7][8] = formatBits[6];
5353
- for (let i = 0; i < 6; i++) {
5354
- matrix2[5 - i][8] = formatBits[5 - i];
5278
+ static addFormatInfo(matrix, size, mask) {
5279
+ const ecl = 0;
5280
+ const data = ecl << 3 | mask;
5281
+ let rem = data;
5282
+ for (let i = 0; i < 10; i++) {
5283
+ rem = rem << 1 ^ (rem >> 14) * 1335;
5355
5284
  }
5356
- for (let i = 0; i < 8; i++) {
5357
- matrix2[8][size2 - 1 - i] = formatBits[i];
5358
- }
5359
- for (let i = 0; i < 7; i++) {
5360
- matrix2[size2 - 1 - i][8] = formatBits[14 - 7 + i];
5361
- }
5362
- }
5363
- // 计算 BCH 码(简化版本)
5364
- static calculateBCH(data) {
5365
- let g = 1335;
5366
- let d = data << 10;
5367
- for (let i = 14; i >= 10; i--) {
5368
- if (d >> i & 1) {
5369
- d ^= g << i - 10;
5370
- }
5285
+ const format = (data << 10 | rem) ^ 21522;
5286
+ const bits = [];
5287
+ for (let i = 14; i >= 0; i--) {
5288
+ bits.push(format >> i & 1);
5371
5289
  }
5372
- return data << 10 | d;
5290
+ for (let i = 0; i < 6; i++) matrix[8][i] = bits[i];
5291
+ matrix[8][7] = bits[6];
5292
+ matrix[8][8] = bits[7];
5293
+ matrix[7][8] = bits[8];
5294
+ for (let i = 9; i < 15; i++) matrix[14 - i][8] = bits[i];
5295
+ for (let i = 0; i < 8; i++) matrix[8][size - 8 + i] = bits[14 - i];
5296
+ for (let i = 8; i < 15; i++) matrix[size - 15 + i][8] = bits[14 - i];
5373
5297
  }
5374
5298
  }
5375
- // 纠错级别对应的指示符
5376
- __publicField(QRCodeGenerator, "ECC_CODEWORDS", {
5377
- L: [7, 10, 13, 17, 22, 28, 31, 36, 41],
5378
- M: [10, 16, 22, 28, 36, 44, 52, 64, 72],
5379
- Q: [13, 22, 31, 40, 53, 66, 80, 96, 108],
5380
- H: [17, 28, 41, 56, 77, 96, 114, 136, 156]
5381
- });
5382
- // 版本容量表(字节模式)
5383
- __publicField(QRCodeGenerator, "CAPACITY", [
5299
+ // 纠错级别
5300
+ __publicField(QRCodeGenerator, "ECC_LEVEL", { L: 1, M: 0, Q: 3, H: 2 });
5301
+ // 每个版本的纠错码字数(M级别)
5302
+ __publicField(QRCodeGenerator, "ECC_CODEWORDS", [
5303
+ 0,
5304
+ 10,
5305
+ 16,
5306
+ 22,
5307
+ 28,
5308
+ 36,
5309
+ 44,
5310
+ 52,
5311
+ 64,
5312
+ 72,
5313
+ 80,
5314
+ 96,
5315
+ 108,
5316
+ 120,
5317
+ 132,
5318
+ 144,
5319
+ 168,
5320
+ 180,
5321
+ 196,
5322
+ 216,
5323
+ 240,
5324
+ 260,
5325
+ 288,
5326
+ 320,
5327
+ 344,
5328
+ 376,
5329
+ 412,
5330
+ 452,
5331
+ 492,
5332
+ 536
5333
+ ]);
5334
+ // 每个版本的总码字数
5335
+ __publicField(QRCodeGenerator, "TOTAL_CODEWORDS", [
5384
5336
  0,
5385
- 17,
5386
- 32,
5387
- 53,
5388
- 78,
5389
- 106,
5337
+ 26,
5338
+ 44,
5339
+ 70,
5340
+ 100,
5390
5341
  134,
5342
+ 172,
5343
+ 196,
5344
+ 242,
5345
+ 292,
5346
+ 346,
5347
+ 404,
5348
+ 466,
5349
+ 532,
5350
+ 581,
5351
+ 625,
5352
+ 733,
5353
+ 815,
5354
+ 901,
5355
+ 993,
5356
+ 1079,
5357
+ 1157,
5358
+ 1253,
5359
+ 1353,
5360
+ 1453,
5361
+ 1553,
5362
+ 1673,
5363
+ 1793,
5364
+ 1913,
5365
+ 2033
5366
+ ]);
5367
+ // 每个版本的容量(字节模式,M级别)
5368
+ __publicField(QRCodeGenerator, "CAPACITY", [
5369
+ 0,
5370
+ 16,
5371
+ 28,
5372
+ 44,
5373
+ 64,
5374
+ 86,
5375
+ 108,
5376
+ 124,
5391
5377
  154,
5392
- 192,
5393
- 230,
5394
- 271,
5395
- 321,
5396
- 367,
5397
- 425,
5398
- 458,
5399
- 520,
5400
- 586,
5401
- 644,
5402
- 718,
5403
- 792,
5404
- 858,
5405
- 929,
5406
- 1003,
5407
- 1091,
5408
- 1171,
5409
- 1273,
5410
- 1367,
5411
- 1465,
5412
- 1528,
5413
- 1628,
5414
- 1732
5378
+ 186,
5379
+ 216,
5380
+ 252,
5381
+ 290,
5382
+ 334,
5383
+ 365,
5384
+ 415,
5385
+ 453,
5386
+ 507,
5387
+ 563,
5388
+ 623,
5389
+ 669,
5390
+ 719,
5391
+ 783,
5392
+ 843,
5393
+ 909,
5394
+ 969,
5395
+ 1047,
5396
+ 1119,
5397
+ 1193,
5398
+ 1273
5415
5399
  ]);
5400
+ // Galois Field 查找表
5401
+ __publicField(QRCodeGenerator, "GF_EXP", []);
5402
+ __publicField(QRCodeGenerator, "GF_LOG", []);
5416
5403
  const generateQRCode = () => {
5417
5404
  if (!props.value) {
5418
- matrix.value = [];
5405
+ modules.value = [];
5406
+ qrSize.value = 0;
5419
5407
  return;
5420
5408
  }
5421
5409
  try {
5422
- matrix.value = QRCodeGenerator.generate(props.value, props.errorCorrectLevel);
5410
+ const result = QRCodeGenerator.generate(props.value);
5411
+ modules.value = result.modules;
5412
+ qrSize.value = result.size;
5423
5413
  } catch (e) {
5424
5414
  console.error("QR Code generation failed:", e);
5425
- matrix.value = [];
5415
+ modules.value = [];
5416
+ qrSize.value = 0;
5426
5417
  }
5427
5418
  };
5428
5419
  vue.watch(() => props.value, generateQRCode);
5429
- vue.watch(() => props.errorCorrectLevel, generateQRCode);
5430
5420
  vue.onMounted(() => {
5431
5421
  generateQRCode();
5432
5422
  });
5433
5423
  return (_ctx, _cache) => {
5434
- return vue.openBlock(), vue.createElementBlock("view", _hoisted_1$1, [
5435
- matrix.value.length > 0 ? (vue.openBlock(), vue.createElementBlock("view", {
5436
- key: 0,
5424
+ return vue.openBlock(), vue.createElementBlock("view", {
5425
+ class: "u-qrcode",
5426
+ style: vue.normalizeStyle({ width: `${__props.size}px`, height: `${__props.size}px` })
5427
+ }, [
5428
+ vue.createElementVNode("view", {
5437
5429
  class: "u-qrcode__matrix",
5438
- style: vue.normalizeStyle(matrixStyle.value)
5430
+ style: vue.normalizeStyle({ backgroundColor: __props.bgColor })
5439
5431
  }, [
5440
- (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(matrix.value, (row, rowIndex) => {
5432
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(modules.value, (row, rowIndex) => {
5441
5433
  return vue.openBlock(), vue.createElementBlock("view", {
5442
5434
  key: rowIndex,
5443
5435
  class: "u-qrcode__row"
@@ -5446,17 +5438,21 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
5446
5438
  return vue.openBlock(), vue.createElementBlock("view", {
5447
5439
  key: colIndex,
5448
5440
  class: "u-qrcode__cell",
5449
- style: vue.normalizeStyle(cellStyle(cell))
5441
+ style: vue.normalizeStyle({
5442
+ width: `${cellSize.value}px`,
5443
+ height: `${cellSize.value}px`,
5444
+ backgroundColor: cell === 1 ? __props.color : __props.bgColor
5445
+ })
5450
5446
  }, null, 4);
5451
5447
  }), 128))
5452
5448
  ]);
5453
5449
  }), 128))
5454
- ], 4)) : vue.createCommentVNode("", true)
5455
- ]);
5450
+ ], 4)
5451
+ ], 4);
5456
5452
  };
5457
5453
  }
5458
5454
  });
5459
- const uQrcode = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-3f660ab3"]]);
5455
+ const uQrcode = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-fbf77201"]]);
5460
5456
  const _hoisted_1 = { class: "u-barcode" };
5461
5457
  const _hoisted_2 = ["canvas-id"];
5462
5458
  const _hoisted_3 = ["src"];