@atooyu/uxto-ui 1.1.26 → 1.1.28

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
@@ -1,8 +1,11 @@
1
1
  "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
4
+ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
2
5
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
6
  const vue = require("vue");
4
- const _hoisted_1$H = ["disabled", "hover-class"];
5
- const _hoisted_2$w = {
7
+ const _hoisted_1$I = ["disabled", "hover-class"];
8
+ const _hoisted_2$x = {
6
9
  key: 0,
7
10
  class: "u-button__loading"
8
11
  };
@@ -74,7 +77,7 @@ const _sfc_main$N = /* @__PURE__ */ vue.defineComponent({
74
77
  "hover-class": __props.disabled || __props.loading ? "" : "u-button--active",
75
78
  onClick: handleClick
76
79
  }, [
77
- __props.loading ? (vue.openBlock(), vue.createElementBlock("view", _hoisted_2$w, [..._cache[0] || (_cache[0] = [
80
+ __props.loading ? (vue.openBlock(), vue.createElementBlock("view", _hoisted_2$x, [..._cache[0] || (_cache[0] = [
78
81
  vue.createElementVNode("view", { class: "u-button__loading-icon" }, null, -1)
79
82
  ])])) : (vue.openBlock(), vue.createElementBlock("view", _hoisted_3$q, [
80
83
  __props.icon ? (vue.openBlock(), vue.createElementBlock("text", _hoisted_4$h, vue.toDisplayString(__props.icon), 1)) : vue.createCommentVNode("", true),
@@ -82,7 +85,7 @@ const _sfc_main$N = /* @__PURE__ */ vue.defineComponent({
82
85
  vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
83
86
  ])
84
87
  ]))
85
- ], 14, _hoisted_1$H);
88
+ ], 14, _hoisted_1$I);
86
89
  };
87
90
  }
88
91
  });
@@ -94,11 +97,11 @@ const _export_sfc = (sfc, props) => {
94
97
  return target;
95
98
  };
96
99
  const uButton = /* @__PURE__ */ _export_sfc(_sfc_main$N, [["__scopeId", "data-v-a51cb0bf"]]);
97
- const _hoisted_1$G = {
100
+ const _hoisted_1$H = {
98
101
  key: 0,
99
102
  class: "u-input__prefix"
100
103
  };
101
- const _hoisted_2$v = { class: "u-input__icon" };
104
+ const _hoisted_2$w = { class: "u-input__icon" };
102
105
  const _hoisted_3$p = { class: "u-input__body" };
103
106
  const _hoisted_4$g = ["type", "value", "placeholder", "placeholder-style", "disabled", "maxlength", "focus", "confirm-type", "adjust-position"];
104
107
  const _hoisted_5$c = {
@@ -163,9 +166,9 @@ const _sfc_main$M = /* @__PURE__ */ vue.defineComponent({
163
166
  "u-input--focus": isFocus.value
164
167
  }])
165
168
  }, [
166
- _ctx.$slots.prefix || __props.prefixIcon ? (vue.openBlock(), vue.createElementBlock("view", _hoisted_1$G, [
169
+ _ctx.$slots.prefix || __props.prefixIcon ? (vue.openBlock(), vue.createElementBlock("view", _hoisted_1$H, [
167
170
  vue.renderSlot(_ctx.$slots, "prefix", {}, () => [
168
- vue.createElementVNode("text", _hoisted_2$v, vue.toDisplayString(__props.prefixIcon), 1)
171
+ vue.createElementVNode("text", _hoisted_2$w, vue.toDisplayString(__props.prefixIcon), 1)
169
172
  ], true)
170
173
  ])) : vue.createCommentVNode("", true),
171
174
  vue.createElementVNode("view", _hoisted_3$p, [
@@ -204,8 +207,8 @@ const _sfc_main$M = /* @__PURE__ */ vue.defineComponent({
204
207
  }
205
208
  });
206
209
  const uInput = /* @__PURE__ */ _export_sfc(_sfc_main$M, [["__scopeId", "data-v-2f635824"]]);
207
- const _hoisted_1$F = ["hover-class"];
208
- const _hoisted_2$u = {
210
+ const _hoisted_1$G = ["hover-class"];
211
+ const _hoisted_2$v = {
209
212
  key: 0,
210
213
  class: "u-cell__icon"
211
214
  };
@@ -268,7 +271,7 @@ const _sfc_main$L = /* @__PURE__ */ vue.defineComponent({
268
271
  "hover-class": isClickable.value && !__props.disabled ? "u-cell--active" : "",
269
272
  onClick: handleClick
270
273
  }, [
271
- _ctx.$slots.icon || __props.icon ? (vue.openBlock(), vue.createElementBlock("view", _hoisted_2$u, [
274
+ _ctx.$slots.icon || __props.icon ? (vue.openBlock(), vue.createElementBlock("view", _hoisted_2$v, [
272
275
  vue.renderSlot(_ctx.$slots, "icon", {}, () => [
273
276
  __props.icon ? (vue.openBlock(), vue.createElementBlock("image", {
274
277
  key: 0,
@@ -293,13 +296,13 @@ const _sfc_main$L = /* @__PURE__ */ vue.defineComponent({
293
296
  vue.createElementVNode("text", { class: "u-cell__arrow-icon" }, "›", -1)
294
297
  ])])) : vue.createCommentVNode("", true),
295
298
  vue.renderSlot(_ctx.$slots, "right-icon", {}, void 0, true)
296
- ], 10, _hoisted_1$F);
299
+ ], 10, _hoisted_1$G);
297
300
  };
298
301
  }
299
302
  });
300
303
  const uCell = /* @__PURE__ */ _export_sfc(_sfc_main$L, [["__scopeId", "data-v-c3a35a65"]]);
301
- const _hoisted_1$E = { class: "u-cell-group" };
302
- const _hoisted_2$t = {
304
+ const _hoisted_1$F = { class: "u-cell-group" };
305
+ const _hoisted_2$u = {
303
306
  key: 0,
304
307
  class: "u-cell-group__title"
305
308
  };
@@ -318,8 +321,8 @@ const _sfc_main$K = /* @__PURE__ */ vue.defineComponent({
318
321
  },
319
322
  setup(__props) {
320
323
  return (_ctx, _cache) => {
321
- return vue.openBlock(), vue.createElementBlock("view", _hoisted_1$E, [
322
- __props.title || _ctx.$slots.title ? (vue.openBlock(), vue.createElementBlock("view", _hoisted_2$t, [
324
+ return vue.openBlock(), vue.createElementBlock("view", _hoisted_1$F, [
325
+ __props.title || _ctx.$slots.title ? (vue.openBlock(), vue.createElementBlock("view", _hoisted_2$u, [
323
326
  vue.renderSlot(_ctx.$slots, "title", {}, () => [
324
327
  vue.createTextVNode(vue.toDisplayString(__props.title), 1)
325
328
  ], true)
@@ -332,11 +335,11 @@ const _sfc_main$K = /* @__PURE__ */ vue.defineComponent({
332
335
  }
333
336
  });
334
337
  const uCellGroup = /* @__PURE__ */ _export_sfc(_sfc_main$K, [["__scopeId", "data-v-f529bc69"]]);
335
- const _hoisted_1$D = {
338
+ const _hoisted_1$E = {
336
339
  key: 0,
337
340
  class: "u-modal__header"
338
341
  };
339
- const _hoisted_2$s = { class: "u-modal__title" };
342
+ const _hoisted_2$t = { class: "u-modal__title" };
340
343
  const _hoisted_3$m = { class: "u-modal__body" };
341
344
  const _hoisted_4$e = { class: "u-modal__message" };
342
345
  const _hoisted_5$a = { class: "u-modal__footer" };
@@ -386,8 +389,8 @@ const _sfc_main$J = /* @__PURE__ */ vue.defineComponent({
386
389
  onClick: _cache[0] || (_cache[0] = vue.withModifiers(() => {
387
390
  }, ["stop"]))
388
391
  }, [
389
- __props.title ? (vue.openBlock(), vue.createElementBlock("view", _hoisted_1$D, [
390
- vue.createElementVNode("text", _hoisted_2$s, vue.toDisplayString(__props.title), 1)
392
+ __props.title ? (vue.openBlock(), vue.createElementBlock("view", _hoisted_1$E, [
393
+ vue.createElementVNode("text", _hoisted_2$t, vue.toDisplayString(__props.title), 1)
391
394
  ])) : vue.createCommentVNode("", true),
392
395
  vue.createElementVNode("view", _hoisted_3$m, [
393
396
  vue.renderSlot(_ctx.$slots, "default", {}, () => [
@@ -628,8 +631,8 @@ function getIconNames() {
628
631
  function addIcon(name, svg) {
629
632
  icons[name] = svg;
630
633
  }
631
- const _hoisted_1$C = ["src"];
632
- const _hoisted_2$r = {
634
+ const _hoisted_1$D = ["src"];
635
+ const _hoisted_2$s = {
633
636
  key: 1,
634
637
  class: "u-icon__inner"
635
638
  };
@@ -719,7 +722,7 @@ const _sfc_main$I = /* @__PURE__ */ vue.defineComponent({
719
722
  src: iconSrc.value,
720
723
  style: vue.normalizeStyle(svgStyle.value),
721
724
  mode: "aspectFit"
722
- }, null, 12, _hoisted_1$C)) : (vue.openBlock(), vue.createElementBlock("text", _hoisted_2$r, vue.toDisplayString(__props.name), 1))
725
+ }, null, 12, _hoisted_1$D)) : (vue.openBlock(), vue.createElementBlock("text", _hoisted_2$s, vue.toDisplayString(__props.name), 1))
723
726
  ], 6);
724
727
  };
725
728
  }
@@ -771,7 +774,7 @@ const _sfc_main$H = /* @__PURE__ */ vue.defineComponent({
771
774
  }
772
775
  });
773
776
  const uLoading = /* @__PURE__ */ _export_sfc(_sfc_main$H, [["__scopeId", "data-v-ce769006"]]);
774
- const _hoisted_1$B = { class: "u-tag__text" };
777
+ const _hoisted_1$C = { class: "u-tag__text" };
775
778
  const __default__$G = {
776
779
  options: {
777
780
  virtualHost: true,
@@ -811,7 +814,7 @@ const _sfc_main$G = /* @__PURE__ */ vue.defineComponent({
811
814
  class: vue.normalizeClass(["u-tag", [`u-tag--${__props.type}`, `u-tag--${__props.size}`, { "u-tag--plain": __props.plain, "u-tag--round": __props.round }]]),
812
815
  style: vue.normalizeStyle(tagStyle.value)
813
816
  }, [
814
- vue.createElementVNode("text", _hoisted_1$B, [
817
+ vue.createElementVNode("text", _hoisted_1$C, [
815
818
  vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
816
819
  ]),
817
820
  __props.closable ? (vue.openBlock(), vue.createElementBlock("view", {
@@ -892,8 +895,8 @@ const _sfc_main$F = /* @__PURE__ */ vue.defineComponent({
892
895
  }
893
896
  });
894
897
  const uSwitch = /* @__PURE__ */ _export_sfc(_sfc_main$F, [["__scopeId", "data-v-8922fa66"]]);
895
- const _hoisted_1$A = ["src", "mode", "lazy-load", "fade"];
896
- const _hoisted_2$q = {
898
+ const _hoisted_1$B = ["src", "mode", "lazy-load", "fade"];
899
+ const _hoisted_2$r = {
897
900
  key: 0,
898
901
  class: "u-image__loading"
899
902
  };
@@ -946,8 +949,8 @@ const _sfc_main$E = /* @__PURE__ */ vue.defineComponent({
946
949
  fade: __props.fade,
947
950
  onLoad: handleLoad,
948
951
  onError: handleError
949
- }, null, 40, _hoisted_1$A),
950
- __props.loading && !loaded.value ? (vue.openBlock(), vue.createElementBlock("view", _hoisted_2$q, [
952
+ }, null, 40, _hoisted_1$B),
953
+ __props.loading && !loaded.value ? (vue.openBlock(), vue.createElementBlock("view", _hoisted_2$r, [
951
954
  vue.renderSlot(_ctx.$slots, "loading", {}, () => [
952
955
  vue.createVNode(_component_u_loading, { size: 20 })
953
956
  ], true)
@@ -962,7 +965,7 @@ const _sfc_main$E = /* @__PURE__ */ vue.defineComponent({
962
965
  }
963
966
  });
964
967
  const uImage = /* @__PURE__ */ _export_sfc(_sfc_main$E, [["__scopeId", "data-v-55a4498e"]]);
965
- const _hoisted_1$z = {
968
+ const _hoisted_1$A = {
966
969
  key: 0,
967
970
  class: "u-divider__text"
968
971
  };
@@ -985,7 +988,7 @@ const _sfc_main$D = /* @__PURE__ */ vue.defineComponent({
985
988
  return vue.openBlock(), vue.createElementBlock("view", {
986
989
  class: vue.normalizeClass(["u-divider", { "u-divider--hairline": __props.hairline, "u-divider--dashed": __props.dashed }])
987
990
  }, [
988
- _ctx.$slots.default || __props.content ? (vue.openBlock(), vue.createElementBlock("view", _hoisted_1$z, [
991
+ _ctx.$slots.default || __props.content ? (vue.openBlock(), vue.createElementBlock("view", _hoisted_1$A, [
989
992
  vue.renderSlot(_ctx.$slots, "default", {}, () => [
990
993
  vue.createTextVNode(vue.toDisplayString(__props.content), 1)
991
994
  ], true)
@@ -995,11 +998,11 @@ const _sfc_main$D = /* @__PURE__ */ vue.defineComponent({
995
998
  }
996
999
  });
997
1000
  const uDivider = /* @__PURE__ */ _export_sfc(_sfc_main$D, [["__scopeId", "data-v-7f88d163"]]);
998
- const _hoisted_1$y = {
1001
+ const _hoisted_1$z = {
999
1002
  key: 0,
1000
1003
  class: "u-notice-bar__left-icon"
1001
1004
  };
1002
- const _hoisted_2$p = { class: "u-notice-bar__text-item" };
1005
+ const _hoisted_2$q = { class: "u-notice-bar__text-item" };
1003
1006
  const _hoisted_3$k = { class: "u-notice-bar__text-item" };
1004
1007
  const _hoisted_4$d = {
1005
1008
  key: 1,
@@ -1035,7 +1038,7 @@ const _sfc_main$C = /* @__PURE__ */ vue.defineComponent({
1035
1038
  class: vue.normalizeClass(["u-notice-bar", { "u-notice-bar--wrapable": __props.wrapable }]),
1036
1039
  style: vue.normalizeStyle({ color: __props.color, background: __props.background })
1037
1040
  }, [
1038
- _ctx.$slots.leftIcon || __props.leftIcon ? (vue.openBlock(), vue.createElementBlock("view", _hoisted_1$y, [
1041
+ _ctx.$slots.leftIcon || __props.leftIcon ? (vue.openBlock(), vue.createElementBlock("view", _hoisted_1$z, [
1039
1042
  vue.renderSlot(_ctx.$slots, "leftIcon", {}, () => [
1040
1043
  vue.createElementVNode("text", null, vue.toDisplayString(__props.leftIcon), 1)
1041
1044
  ], true)
@@ -1048,7 +1051,7 @@ const _sfc_main$C = /* @__PURE__ */ vue.defineComponent({
1048
1051
  class: "u-notice-bar__text",
1049
1052
  style: vue.normalizeStyle({ animationDuration: __props.speed + "s" })
1050
1053
  }, [
1051
- vue.createElementVNode("text", _hoisted_2$p, vue.toDisplayString(__props.text), 1),
1054
+ vue.createElementVNode("text", _hoisted_2$q, vue.toDisplayString(__props.text), 1),
1052
1055
  vue.createElementVNode("text", _hoisted_3$k, vue.toDisplayString(__props.text), 1)
1053
1056
  ], 4)) : (vue.openBlock(), vue.createElementBlock("text", _hoisted_4$d, vue.toDisplayString(__props.text), 1))
1054
1057
  ], 2),
@@ -1066,11 +1069,11 @@ const _sfc_main$C = /* @__PURE__ */ vue.defineComponent({
1066
1069
  }
1067
1070
  });
1068
1071
  const uNoticeBar = /* @__PURE__ */ _export_sfc(_sfc_main$C, [["__scopeId", "data-v-f80a744d"]]);
1069
- const _hoisted_1$x = {
1072
+ const _hoisted_1$y = {
1070
1073
  key: 0,
1071
1074
  class: "u-layout__header"
1072
1075
  };
1073
- const _hoisted_2$o = { class: "u-layout__content" };
1076
+ const _hoisted_2$p = { class: "u-layout__content" };
1074
1077
  const _hoisted_3$j = {
1075
1078
  key: 1,
1076
1079
  class: "u-layout__footer"
@@ -1091,10 +1094,10 @@ const _sfc_main$B = /* @__PURE__ */ vue.defineComponent({
1091
1094
  return vue.openBlock(), vue.createElementBlock("view", {
1092
1095
  class: vue.normalizeClass(["u-layout", { "u-layout--has-footer": hasFooter.value }])
1093
1096
  }, [
1094
- _ctx.$slots.header ? (vue.openBlock(), vue.createElementBlock("view", _hoisted_1$x, [
1097
+ _ctx.$slots.header ? (vue.openBlock(), vue.createElementBlock("view", _hoisted_1$y, [
1095
1098
  vue.renderSlot(_ctx.$slots, "header", {}, void 0, true)
1096
1099
  ])) : vue.createCommentVNode("", true),
1097
- vue.createElementVNode("view", _hoisted_2$o, [
1100
+ vue.createElementVNode("view", _hoisted_2$p, [
1098
1101
  vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
1099
1102
  ]),
1100
1103
  _ctx.$slots.footer ? (vue.openBlock(), vue.createElementBlock("view", _hoisted_3$j, [
@@ -1105,7 +1108,7 @@ const _sfc_main$B = /* @__PURE__ */ vue.defineComponent({
1105
1108
  }
1106
1109
  });
1107
1110
  const uLayout = /* @__PURE__ */ _export_sfc(_sfc_main$B, [["__scopeId", "data-v-1682e77a"]]);
1108
- const _hoisted_1$w = {
1111
+ const _hoisted_1$x = {
1109
1112
  key: 0,
1110
1113
  class: "u-badge__text"
1111
1114
  };
@@ -1161,18 +1164,18 @@ const _sfc_main$A = /* @__PURE__ */ vue.defineComponent({
1161
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 }]]),
1162
1165
  style: vue.normalizeStyle(badgeStyle.value)
1163
1166
  }, [
1164
- !__props.dot && displayValue.value ? (vue.openBlock(), vue.createElementBlock("text", _hoisted_1$w, vue.toDisplayString(displayValue.value), 1)) : vue.createCommentVNode("", true)
1167
+ !__props.dot && displayValue.value ? (vue.openBlock(), vue.createElementBlock("text", _hoisted_1$x, vue.toDisplayString(displayValue.value), 1)) : vue.createCommentVNode("", true)
1165
1168
  ], 6)) : vue.createCommentVNode("", true)
1166
1169
  ], 2);
1167
1170
  };
1168
1171
  }
1169
1172
  });
1170
1173
  const uBadge = /* @__PURE__ */ _export_sfc(_sfc_main$A, [["__scopeId", "data-v-56dd42ed"]]);
1171
- const _hoisted_1$v = {
1174
+ const _hoisted_1$w = {
1172
1175
  key: 0,
1173
1176
  class: "u-loading-page"
1174
1177
  };
1175
- const _hoisted_2$n = { class: "u-loading-page__content" };
1178
+ const _hoisted_2$o = { class: "u-loading-page__content" };
1176
1179
  const __default__$z = {
1177
1180
  options: {
1178
1181
  virtualHost: true,
@@ -1191,8 +1194,8 @@ const _sfc_main$z = /* @__PURE__ */ vue.defineComponent({
1191
1194
  },
1192
1195
  setup(__props) {
1193
1196
  return (_ctx, _cache) => {
1194
- return __props.visible ? (vue.openBlock(), vue.createElementBlock("view", _hoisted_1$v, [
1195
- vue.createElementVNode("view", _hoisted_2$n, [
1197
+ return __props.visible ? (vue.openBlock(), vue.createElementBlock("view", _hoisted_1$w, [
1198
+ vue.createElementVNode("view", _hoisted_2$o, [
1196
1199
  vue.createElementVNode("view", {
1197
1200
  class: "u-loading-page__spinner",
1198
1201
  style: vue.normalizeStyle({ width: __props.size + "px", height: __props.size + "px" })
@@ -1219,7 +1222,7 @@ const _sfc_main$z = /* @__PURE__ */ vue.defineComponent({
1219
1222
  }
1220
1223
  });
1221
1224
  const uLoadingPage = /* @__PURE__ */ _export_sfc(_sfc_main$z, [["__scopeId", "data-v-ddf92cf6"]]);
1222
- const _hoisted_1$u = { class: "u-parse" };
1225
+ const _hoisted_1$v = { class: "u-parse" };
1223
1226
  const __default__$y = {
1224
1227
  options: {
1225
1228
  virtualHost: true,
@@ -1325,7 +1328,7 @@ const _sfc_main$y = /* @__PURE__ */ vue.defineComponent({
1325
1328
  };
1326
1329
  return (_ctx, _cache) => {
1327
1330
  const _component_rich_text = vue.resolveComponent("rich-text");
1328
- return vue.openBlock(), vue.createElementBlock("view", _hoisted_1$u, [
1331
+ return vue.openBlock(), vue.createElementBlock("view", _hoisted_1$v, [
1329
1332
  vue.createVNode(_component_rich_text, {
1330
1333
  nodes: parsedNodes.value,
1331
1334
  selectable: __props.selectable,
@@ -1337,8 +1340,8 @@ const _sfc_main$y = /* @__PURE__ */ vue.defineComponent({
1337
1340
  }
1338
1341
  });
1339
1342
  const uParse = /* @__PURE__ */ _export_sfc(_sfc_main$y, [["__scopeId", "data-v-5361245b"]]);
1340
- const _hoisted_1$t = { class: "u-keyboard__header" };
1341
- const _hoisted_2$m = { class: "u-keyboard__title" };
1343
+ const _hoisted_1$u = { class: "u-keyboard__header" };
1344
+ const _hoisted_2$n = { class: "u-keyboard__title" };
1342
1345
  const _hoisted_3$i = ["onClick"];
1343
1346
  const __default__$x = {
1344
1347
  options: {
@@ -1469,8 +1472,8 @@ const _sfc_main$x = /* @__PURE__ */ vue.defineComponent({
1469
1472
  onClick: _cache[0] || (_cache[0] = vue.withModifiers(() => {
1470
1473
  }, ["stop"]))
1471
1474
  }, [
1472
- vue.createElementVNode("view", _hoisted_1$t, [
1473
- vue.createElementVNode("text", _hoisted_2$m, vue.toDisplayString(__props.title), 1),
1475
+ vue.createElementVNode("view", _hoisted_1$u, [
1476
+ vue.createElementVNode("text", _hoisted_2$n, vue.toDisplayString(__props.title), 1),
1474
1477
  vue.createElementVNode("text", {
1475
1478
  class: "u-keyboard__close",
1476
1479
  onClick: handleClose
@@ -1498,8 +1501,8 @@ const _sfc_main$x = /* @__PURE__ */ vue.defineComponent({
1498
1501
  }
1499
1502
  });
1500
1503
  const uKeyboard = /* @__PURE__ */ _export_sfc(_sfc_main$x, [["__scopeId", "data-v-b318be29"]]);
1501
- const _hoisted_1$s = { class: "u-picker__toolbar" };
1502
- const _hoisted_2$l = { class: "u-picker__title" };
1504
+ const _hoisted_1$t = { class: "u-picker__toolbar" };
1505
+ const _hoisted_2$m = { class: "u-picker__title" };
1503
1506
  const _hoisted_3$h = {
1504
1507
  key: 0,
1505
1508
  class: "u-picker__loading"
@@ -1596,12 +1599,12 @@ const _sfc_main$w = /* @__PURE__ */ vue.defineComponent({
1596
1599
  onClick: _cache[0] || (_cache[0] = vue.withModifiers(() => {
1597
1600
  }, ["stop"]))
1598
1601
  }, [
1599
- vue.createElementVNode("view", _hoisted_1$s, [
1602
+ vue.createElementVNode("view", _hoisted_1$t, [
1600
1603
  vue.createElementVNode("text", {
1601
1604
  class: "u-picker__action",
1602
1605
  onClick: handleCancel
1603
1606
  }, "取消"),
1604
- vue.createElementVNode("text", _hoisted_2$l, vue.toDisplayString(__props.title), 1),
1607
+ vue.createElementVNode("text", _hoisted_2$m, vue.toDisplayString(__props.title), 1),
1605
1608
  vue.createElementVNode("text", {
1606
1609
  class: "u-picker__action u-picker__action--confirm",
1607
1610
  onClick: handleConfirm
@@ -1641,8 +1644,8 @@ const _sfc_main$w = /* @__PURE__ */ vue.defineComponent({
1641
1644
  }
1642
1645
  });
1643
1646
  const uPicker = /* @__PURE__ */ _export_sfc(_sfc_main$w, [["__scopeId", "data-v-54bd44d7"]]);
1644
- const _hoisted_1$r = { class: "u-datetime-picker__toolbar" };
1645
- const _hoisted_2$k = { class: "u-datetime-picker__title" };
1647
+ const _hoisted_1$s = { class: "u-datetime-picker__toolbar" };
1648
+ const _hoisted_2$l = { class: "u-datetime-picker__title" };
1646
1649
  const __default__$v = {
1647
1650
  options: {
1648
1651
  virtualHost: true,
@@ -1870,12 +1873,12 @@ const _sfc_main$v = /* @__PURE__ */ vue.defineComponent({
1870
1873
  onClick: _cache[0] || (_cache[0] = vue.withModifiers(() => {
1871
1874
  }, ["stop"]))
1872
1875
  }, [
1873
- vue.createElementVNode("view", _hoisted_1$r, [
1876
+ vue.createElementVNode("view", _hoisted_1$s, [
1874
1877
  vue.createElementVNode("text", {
1875
1878
  class: "u-datetime-picker__action",
1876
1879
  onClick: handleCancel
1877
1880
  }, "取消"),
1878
- vue.createElementVNode("text", _hoisted_2$k, vue.toDisplayString(__props.title), 1),
1881
+ vue.createElementVNode("text", _hoisted_2$l, vue.toDisplayString(__props.title), 1),
1879
1882
  vue.createElementVNode("text", {
1880
1883
  class: "u-datetime-picker__action u-datetime-picker__action--confirm",
1881
1884
  onClick: handleConfirm
@@ -1912,7 +1915,7 @@ const _sfc_main$v = /* @__PURE__ */ vue.defineComponent({
1912
1915
  }
1913
1916
  });
1914
1917
  const uDatetimePicker = /* @__PURE__ */ _export_sfc(_sfc_main$v, [["__scopeId", "data-v-45acbf1d"]]);
1915
- const _hoisted_1$q = ["onClick"];
1918
+ const _hoisted_1$r = ["onClick"];
1916
1919
  const __default__$u = {
1917
1920
  options: {
1918
1921
  virtualHost: true,
@@ -2018,14 +2021,14 @@ const _sfc_main$u = /* @__PURE__ */ vue.defineComponent({
2018
2021
  style: vue.normalizeStyle(activeStyle.value)
2019
2022
  }, "★", 4)
2020
2023
  ], 4)
2021
- ], 12, _hoisted_1$q);
2024
+ ], 12, _hoisted_1$r);
2022
2025
  }), 128))
2023
2026
  ], 2);
2024
2027
  };
2025
2028
  }
2026
2029
  });
2027
2030
  const uRate = /* @__PURE__ */ _export_sfc(_sfc_main$u, [["__scopeId", "data-v-62d85215"]]);
2028
- const _hoisted_1$p = { class: "u-grid" };
2031
+ const _hoisted_1$q = { class: "u-grid" };
2029
2032
  const __default__$t = {
2030
2033
  options: {
2031
2034
  virtualHost: true,
@@ -2062,18 +2065,18 @@ const _sfc_main$t = /* @__PURE__ */ vue.defineComponent({
2062
2065
  onItemClick
2063
2066
  });
2064
2067
  return (_ctx, _cache) => {
2065
- return vue.openBlock(), vue.createElementBlock("view", _hoisted_1$p, [
2068
+ return vue.openBlock(), vue.createElementBlock("view", _hoisted_1$q, [
2066
2069
  vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
2067
2070
  ]);
2068
2071
  };
2069
2072
  }
2070
2073
  });
2071
2074
  const uGrid = /* @__PURE__ */ _export_sfc(_sfc_main$t, [["__scopeId", "data-v-d005bea6"]]);
2072
- const _hoisted_1$o = {
2075
+ const _hoisted_1$p = {
2073
2076
  key: 0,
2074
2077
  class: "u-grid-item__icon"
2075
2078
  };
2076
- const _hoisted_2$j = ["src"];
2079
+ const _hoisted_2$k = ["src"];
2077
2080
  const _hoisted_3$g = {
2078
2081
  key: 1,
2079
2082
  class: "u-grid-item__icon-text"
@@ -2142,14 +2145,14 @@ const _sfc_main$s = /* @__PURE__ */ vue.defineComponent({
2142
2145
  style: vue.normalizeStyle(itemStyle.value),
2143
2146
  onClick: handleClick
2144
2147
  }, [
2145
- _ctx.$slots.icon || __props.icon || __props.iconUrl ? (vue.openBlock(), vue.createElementBlock("view", _hoisted_1$o, [
2148
+ _ctx.$slots.icon || __props.icon || __props.iconUrl ? (vue.openBlock(), vue.createElementBlock("view", _hoisted_1$p, [
2146
2149
  vue.renderSlot(_ctx.$slots, "icon", {}, () => [
2147
2150
  __props.iconUrl ? (vue.openBlock(), vue.createElementBlock("image", {
2148
2151
  key: 0,
2149
2152
  class: "u-grid-item__icon-image",
2150
2153
  src: __props.iconUrl,
2151
2154
  mode: "aspectFit"
2152
- }, null, 8, _hoisted_2$j)) : __props.icon ? (vue.openBlock(), vue.createElementBlock("text", _hoisted_3$g, vue.toDisplayString(__props.icon), 1)) : vue.createCommentVNode("", true)
2155
+ }, null, 8, _hoisted_2$k)) : __props.icon ? (vue.openBlock(), vue.createElementBlock("text", _hoisted_3$g, vue.toDisplayString(__props.icon), 1)) : vue.createCommentVNode("", true)
2153
2156
  ], true),
2154
2157
  __props.badge !== void 0 && __props.badge !== null && __props.badge !== "" ? (vue.openBlock(), vue.createElementBlock("view", _hoisted_4$c, [
2155
2158
  vue.createElementVNode("text", _hoisted_5$9, vue.toDisplayString(__props.badge), 1)
@@ -2165,8 +2168,8 @@ const _sfc_main$s = /* @__PURE__ */ vue.defineComponent({
2165
2168
  }
2166
2169
  });
2167
2170
  const uGridItem = /* @__PURE__ */ _export_sfc(_sfc_main$s, [["__scopeId", "data-v-de6f40c1"]]);
2168
- const _hoisted_1$n = { class: "u-swiper" };
2169
- const _hoisted_2$i = {
2171
+ const _hoisted_1$o = { class: "u-swiper" };
2172
+ const _hoisted_2$j = {
2170
2173
  key: 0,
2171
2174
  class: "u-swiper__loading"
2172
2175
  };
@@ -2278,7 +2281,7 @@ const _sfc_main$r = /* @__PURE__ */ vue.defineComponent({
2278
2281
  });
2279
2282
  return (_ctx, _cache) => {
2280
2283
  const _component_swiper = vue.resolveComponent("swiper");
2281
- return vue.openBlock(), vue.createElementBlock("view", _hoisted_1$n, [
2284
+ return vue.openBlock(), vue.createElementBlock("view", _hoisted_1$o, [
2282
2285
  vue.createVNode(_component_swiper, {
2283
2286
  class: "u-swiper__wrapper",
2284
2287
  style: vue.normalizeStyle({ height: swiperHeight.value }),
@@ -2297,7 +2300,7 @@ const _sfc_main$r = /* @__PURE__ */ vue.defineComponent({
2297
2300
  ]),
2298
2301
  _: 3
2299
2302
  }, 8, ["style", "autoplay", "interval", "duration", "circular", "vertical", "current"]),
2300
- __props.loading ? (vue.openBlock(), vue.createElementBlock("view", _hoisted_2$i, [..._cache[0] || (_cache[0] = [
2303
+ __props.loading ? (vue.openBlock(), vue.createElementBlock("view", _hoisted_2$j, [..._cache[0] || (_cache[0] = [
2301
2304
  vue.createElementVNode("view", { class: "u-swiper__loading-icon" }, null, -1)
2302
2305
  ])])) : vue.createCommentVNode("", true),
2303
2306
  __props.showTitle && currentTitle.value ? (vue.openBlock(), vue.createElementBlock("view", _hoisted_3$f, [
@@ -2380,11 +2383,11 @@ const _sfc_main$q = /* @__PURE__ */ vue.defineComponent({
2380
2383
  }
2381
2384
  });
2382
2385
  const uSwiperItem = /* @__PURE__ */ _export_sfc(_sfc_main$q, [["__scopeId", "data-v-ef481687"]]);
2383
- const _hoisted_1$m = {
2386
+ const _hoisted_1$n = {
2384
2387
  key: 0,
2385
2388
  class: "u-search__icon"
2386
2389
  };
2387
- const _hoisted_2$h = { class: "u-search__body" };
2390
+ const _hoisted_2$i = { class: "u-search__body" };
2388
2391
  const _hoisted_3$e = ["type", "value", "placeholder", "placeholder-style", "disabled", "maxlength", "focus", "confirm-type", "adjust-position"];
2389
2392
  const _hoisted_4$a = { class: "u-search__action-text" };
2390
2393
  const __default__$p = {
@@ -2466,10 +2469,10 @@ const _sfc_main$p = /* @__PURE__ */ vue.defineComponent({
2466
2469
  class: "u-search__content",
2467
2470
  style: vue.normalizeStyle(contentStyle.value)
2468
2471
  }, [
2469
- __props.showSearchIcon ? (vue.openBlock(), vue.createElementBlock("view", _hoisted_1$m, [..._cache[0] || (_cache[0] = [
2472
+ __props.showSearchIcon ? (vue.openBlock(), vue.createElementBlock("view", _hoisted_1$n, [..._cache[0] || (_cache[0] = [
2470
2473
  vue.createElementVNode("text", { class: "u-search__icon-text" }, "🔍", -1)
2471
2474
  ])])) : vue.createCommentVNode("", true),
2472
- vue.createElementVNode("view", _hoisted_2$h, [
2475
+ vue.createElementVNode("view", _hoisted_2$i, [
2473
2476
  vue.createElementVNode("input", {
2474
2477
  class: "u-search__control",
2475
2478
  type: __props.type,
@@ -2510,7 +2513,7 @@ const _sfc_main$p = /* @__PURE__ */ vue.defineComponent({
2510
2513
  }
2511
2514
  });
2512
2515
  const uSearch = /* @__PURE__ */ _export_sfc(_sfc_main$p, [["__scopeId", "data-v-223b845c"]]);
2513
- const _hoisted_1$l = ["type", "value", "disabled"];
2516
+ const _hoisted_1$m = ["type", "value", "disabled"];
2514
2517
  const __default__$o = {
2515
2518
  options: {
2516
2519
  virtualHost: true,
@@ -2658,7 +2661,7 @@ const _sfc_main$o = /* @__PURE__ */ vue.defineComponent({
2658
2661
  onInput: handleInput,
2659
2662
  onBlur: handleBlur,
2660
2663
  onFocus: handleFocus
2661
- }, null, 46, _hoisted_1$l),
2664
+ }, null, 46, _hoisted_1$m),
2662
2665
  vue.createElementVNode("view", {
2663
2666
  class: vue.normalizeClass(["u-number-box__btn u-number-box__btn--plus", {
2664
2667
  "u-number-box__btn--disabled": plusDisabled.value
@@ -2676,8 +2679,8 @@ const _sfc_main$o = /* @__PURE__ */ vue.defineComponent({
2676
2679
  }
2677
2680
  });
2678
2681
  const uNumberBox = /* @__PURE__ */ _export_sfc(_sfc_main$o, [["__scopeId", "data-v-86153bb8"]]);
2679
- const _hoisted_1$k = { class: "u-upload" };
2680
- const _hoisted_2$g = { class: "u-upload__list" };
2682
+ const _hoisted_1$l = { class: "u-upload" };
2683
+ const _hoisted_2$h = { class: "u-upload__list" };
2681
2684
  const _hoisted_3$d = ["src", "onClick"];
2682
2685
  const _hoisted_4$9 = {
2683
2686
  key: 1,
@@ -2807,8 +2810,8 @@ const _sfc_main$n = /* @__PURE__ */ vue.defineComponent({
2807
2810
  fileList
2808
2811
  });
2809
2812
  return (_ctx, _cache) => {
2810
- return vue.openBlock(), vue.createElementBlock("view", _hoisted_1$k, [
2811
- vue.createElementVNode("view", _hoisted_2$g, [
2813
+ return vue.openBlock(), vue.createElementBlock("view", _hoisted_1$l, [
2814
+ vue.createElementVNode("view", _hoisted_2$h, [
2812
2815
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(fileList.value, (file, index) => {
2813
2816
  return vue.openBlock(), vue.createElementBlock("view", {
2814
2817
  key: index,
@@ -2879,8 +2882,8 @@ const _sfc_main$n = /* @__PURE__ */ vue.defineComponent({
2879
2882
  }
2880
2883
  });
2881
2884
  const uUpload = /* @__PURE__ */ _export_sfc(_sfc_main$n, [["__scopeId", "data-v-172bcb23"]]);
2882
- const _hoisted_1$j = ["value", "placeholder", "placeholder-style", "disabled", "maxlength", "focus", "auto-height", "fixed", "cursor-spacing", "show-confirm-bar", "adjust-position"];
2883
- const _hoisted_2$f = {
2885
+ const _hoisted_1$k = ["value", "placeholder", "placeholder-style", "disabled", "maxlength", "focus", "auto-height", "fixed", "cursor-spacing", "show-confirm-bar", "adjust-position"];
2886
+ const _hoisted_2$g = {
2884
2887
  key: 0,
2885
2888
  class: "u-textarea__limit"
2886
2889
  };
@@ -2971,8 +2974,8 @@ const _sfc_main$m = /* @__PURE__ */ vue.defineComponent({
2971
2974
  onBlur: handleBlur,
2972
2975
  onConfirm: handleConfirm,
2973
2976
  onLinechange: handleLineChange
2974
- }, null, 44, _hoisted_1$j),
2975
- __props.showWordLimit && __props.maxlength ? (vue.openBlock(), vue.createElementBlock("view", _hoisted_2$f, [
2977
+ }, null, 44, _hoisted_1$k),
2978
+ __props.showWordLimit && __props.maxlength ? (vue.openBlock(), vue.createElementBlock("view", _hoisted_2$g, [
2976
2979
  vue.createElementVNode("text", _hoisted_3$c, vue.toDisplayString(currentLength.value) + "/" + vue.toDisplayString(__props.maxlength), 1)
2977
2980
  ])) : vue.createCommentVNode("", true)
2978
2981
  ], 2);
@@ -2980,11 +2983,11 @@ const _sfc_main$m = /* @__PURE__ */ vue.defineComponent({
2980
2983
  }
2981
2984
  });
2982
2985
  const uTextarea = /* @__PURE__ */ _export_sfc(_sfc_main$m, [["__scopeId", "data-v-82478b77"]]);
2983
- const _hoisted_1$i = {
2986
+ const _hoisted_1$j = {
2984
2987
  key: 0,
2985
2988
  class: "u-slider__min"
2986
2989
  };
2987
- const _hoisted_2$e = { class: "u-slider__label" };
2990
+ const _hoisted_2$f = { class: "u-slider__label" };
2988
2991
  const _hoisted_3$b = {
2989
2992
  key: 0,
2990
2993
  class: "u-slider__tooltip"
@@ -3229,8 +3232,8 @@ const _sfc_main$l = /* @__PURE__ */ vue.defineComponent({
3229
3232
  "u-slider--disabled": __props.disabled
3230
3233
  }])
3231
3234
  }, [
3232
- __props.showMinMax ? (vue.openBlock(), vue.createElementBlock("view", _hoisted_1$i, [
3233
- vue.createElementVNode("text", _hoisted_2$e, vue.toDisplayString(__props.min), 1)
3235
+ __props.showMinMax ? (vue.openBlock(), vue.createElementBlock("view", _hoisted_1$j, [
3236
+ vue.createElementVNode("text", _hoisted_2$f, vue.toDisplayString(__props.min), 1)
3234
3237
  ])) : vue.createCommentVNode("", true),
3235
3238
  vue.createElementVNode("view", {
3236
3239
  class: "u-slider__track",
@@ -3299,8 +3302,8 @@ const _sfc_main$l = /* @__PURE__ */ vue.defineComponent({
3299
3302
  }
3300
3303
  });
3301
3304
  const uSlider = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["__scopeId", "data-v-c099c413"]]);
3302
- const _hoisted_1$h = { class: "u-list" };
3303
- const _hoisted_2$d = {
3305
+ const _hoisted_1$i = { class: "u-list" };
3306
+ const _hoisted_2$e = {
3304
3307
  key: 0,
3305
3308
  class: "u-list__header"
3306
3309
  };
@@ -3350,8 +3353,8 @@ const _sfc_main$k = /* @__PURE__ */ vue.defineComponent({
3350
3353
  emit("load");
3351
3354
  };
3352
3355
  return (_ctx, _cache) => {
3353
- return vue.openBlock(), vue.createElementBlock("view", _hoisted_1$h, [
3354
- _ctx.$slots.header || __props.header ? (vue.openBlock(), vue.createElementBlock("view", _hoisted_2$d, [
3356
+ return vue.openBlock(), vue.createElementBlock("view", _hoisted_1$i, [
3357
+ _ctx.$slots.header || __props.header ? (vue.openBlock(), vue.createElementBlock("view", _hoisted_2$e, [
3355
3358
  vue.renderSlot(_ctx.$slots, "header", {}, () => [
3356
3359
  vue.createTextVNode(vue.toDisplayString(__props.header), 1)
3357
3360
  ], true)
@@ -3383,11 +3386,11 @@ const _sfc_main$k = /* @__PURE__ */ vue.defineComponent({
3383
3386
  }
3384
3387
  });
3385
3388
  const uList = /* @__PURE__ */ _export_sfc(_sfc_main$k, [["__scopeId", "data-v-6d331927"]]);
3386
- const _hoisted_1$g = {
3389
+ const _hoisted_1$h = {
3387
3390
  key: 0,
3388
3391
  class: "u-list-item__icon"
3389
3392
  };
3390
- const _hoisted_2$c = ["src"];
3393
+ const _hoisted_2$d = ["src"];
3391
3394
  const _hoisted_3$9 = {
3392
3395
  key: 1,
3393
3396
  class: "u-list-item__icon-text"
@@ -3457,14 +3460,14 @@ const _sfc_main$j = /* @__PURE__ */ vue.defineComponent({
3457
3460
  }]),
3458
3461
  onClick: handleClick
3459
3462
  }, [
3460
- _ctx.$slots.icon || __props.icon || __props.thumb ? (vue.openBlock(), vue.createElementBlock("view", _hoisted_1$g, [
3463
+ _ctx.$slots.icon || __props.icon || __props.thumb ? (vue.openBlock(), vue.createElementBlock("view", _hoisted_1$h, [
3461
3464
  vue.renderSlot(_ctx.$slots, "icon", {}, () => [
3462
3465
  __props.thumb ? (vue.openBlock(), vue.createElementBlock("image", {
3463
3466
  key: 0,
3464
3467
  class: "u-list-item__thumb",
3465
3468
  src: __props.thumb,
3466
3469
  mode: "aspectFill"
3467
- }, null, 8, _hoisted_2$c)) : __props.icon ? (vue.openBlock(), vue.createElementBlock("text", _hoisted_3$9, vue.toDisplayString(__props.icon), 1)) : vue.createCommentVNode("", true)
3470
+ }, null, 8, _hoisted_2$d)) : __props.icon ? (vue.openBlock(), vue.createElementBlock("text", _hoisted_3$9, vue.toDisplayString(__props.icon), 1)) : vue.createCommentVNode("", true)
3468
3471
  ], true)
3469
3472
  ])) : vue.createCommentVNode("", true),
3470
3473
  vue.createElementVNode("view", _hoisted_4$6, [
@@ -3496,11 +3499,11 @@ const _sfc_main$j = /* @__PURE__ */ vue.defineComponent({
3496
3499
  }
3497
3500
  });
3498
3501
  const uListItem = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["__scopeId", "data-v-8c31b17c"]]);
3499
- const _hoisted_1$f = {
3502
+ const _hoisted_1$g = {
3500
3503
  key: 0,
3501
3504
  class: "u-line-progress__text u-line-progress__text--inside"
3502
3505
  };
3503
- const _hoisted_2$b = {
3506
+ const _hoisted_2$c = {
3504
3507
  key: 0,
3505
3508
  class: "u-line-progress__text"
3506
3509
  };
@@ -3569,16 +3572,16 @@ const _sfc_main$i = /* @__PURE__ */ vue.defineComponent({
3569
3572
  }]),
3570
3573
  style: vue.normalizeStyle(barStyle.value)
3571
3574
  }, [
3572
- __props.showText && __props.textInside && __props.percentage <= 100 ? (vue.openBlock(), vue.createElementBlock("text", _hoisted_1$f, vue.toDisplayString(textContent.value), 1)) : vue.createCommentVNode("", true)
3575
+ __props.showText && __props.textInside && __props.percentage <= 100 ? (vue.openBlock(), vue.createElementBlock("text", _hoisted_1$g, vue.toDisplayString(textContent.value), 1)) : vue.createCommentVNode("", true)
3573
3576
  ], 6)
3574
3577
  ], 4),
3575
- __props.showText && !__props.textInside ? (vue.openBlock(), vue.createElementBlock("text", _hoisted_2$b, vue.toDisplayString(textContent.value), 1)) : vue.createCommentVNode("", true)
3578
+ __props.showText && !__props.textInside ? (vue.openBlock(), vue.createElementBlock("text", _hoisted_2$c, vue.toDisplayString(textContent.value), 1)) : vue.createCommentVNode("", true)
3576
3579
  ], 4);
3577
3580
  };
3578
3581
  }
3579
3582
  });
3580
3583
  const uLineProgress = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["__scopeId", "data-v-99121563"]]);
3581
- const _hoisted_1$e = { class: "u-count-down" };
3584
+ const _hoisted_1$f = { class: "u-count-down" };
3582
3585
  const __default__$h = {
3583
3586
  options: {
3584
3587
  virtualHost: true,
@@ -3701,7 +3704,7 @@ const _sfc_main$h = /* @__PURE__ */ vue.defineComponent({
3701
3704
  timeData
3702
3705
  });
3703
3706
  return (_ctx, _cache) => {
3704
- return vue.openBlock(), vue.createElementBlock("view", _hoisted_1$e, [
3707
+ return vue.openBlock(), vue.createElementBlock("view", _hoisted_1$f, [
3705
3708
  vue.renderSlot(_ctx.$slots, "default", {
3706
3709
  time: timeData.value,
3707
3710
  current: current.value
@@ -3716,8 +3719,8 @@ const _sfc_main$h = /* @__PURE__ */ vue.defineComponent({
3716
3719
  }
3717
3720
  });
3718
3721
  const uCountDown = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["__scopeId", "data-v-da70e500"]]);
3719
- const _hoisted_1$d = { class: "u-tooltip__content" };
3720
- const _hoisted_2$a = {
3722
+ const _hoisted_1$e = { class: "u-tooltip__content" };
3723
+ const _hoisted_2$b = {
3721
3724
  key: 0,
3722
3725
  class: "u-tooltip__actions"
3723
3726
  };
@@ -3894,8 +3897,8 @@ const _sfc_main$g = /* @__PURE__ */ vue.defineComponent({
3894
3897
  vue.createElementVNode("view", {
3895
3898
  class: vue.normalizeClass(["u-tooltip__arrow", `u-tooltip__arrow--${actualPlacement.value}`])
3896
3899
  }, null, 2),
3897
- vue.createElementVNode("view", _hoisted_1$d, [
3898
- __props.actions.length ? (vue.openBlock(), vue.createElementBlock("view", _hoisted_2$a, [
3900
+ vue.createElementVNode("view", _hoisted_1$e, [
3901
+ __props.actions.length ? (vue.openBlock(), vue.createElementBlock("view", _hoisted_2$b, [
3899
3902
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(__props.actions, (action, index) => {
3900
3903
  return vue.openBlock(), vue.createElementBlock("view", {
3901
3904
  key: index,
@@ -3915,8 +3918,8 @@ const _sfc_main$g = /* @__PURE__ */ vue.defineComponent({
3915
3918
  }
3916
3919
  });
3917
3920
  const uTooltip = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["__scopeId", "data-v-dd1bff02"]]);
3918
- const _hoisted_1$c = ["src"];
3919
- const _hoisted_2$9 = {
3921
+ const _hoisted_1$d = ["src"];
3922
+ const _hoisted_2$a = {
3920
3923
  key: 1,
3921
3924
  class: "u-avatar__text"
3922
3925
  };
@@ -4014,7 +4017,7 @@ const _sfc_main$f = /* @__PURE__ */ vue.defineComponent({
4014
4017
  src: __props.src,
4015
4018
  mode: "aspectFill",
4016
4019
  onError: handleError
4017
- }, 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))
4020
+ }, null, 40, _hoisted_1$d)) : __props.text ? (vue.openBlock(), vue.createElementBlock("text", _hoisted_2$a, vue.toDisplayString(displayText.value), 1)) : (vue.openBlock(), vue.createElementBlock("text", _hoisted_3$7, vue.toDisplayString(__props.icon || "👤"), 1))
4018
4021
  ], true),
4019
4022
  __props.badge && !badgeSlot.value ? (vue.openBlock(), vue.createElementBlock("view", {
4020
4023
  key: 0,
@@ -4028,8 +4031,8 @@ const _sfc_main$f = /* @__PURE__ */ vue.defineComponent({
4028
4031
  }
4029
4032
  });
4030
4033
  const uAvatar = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["__scopeId", "data-v-10f478fe"]]);
4031
- const _hoisted_1$b = { class: "u-empty__image" };
4032
- const _hoisted_2$8 = ["src"];
4034
+ const _hoisted_1$c = { class: "u-empty__image" };
4035
+ const _hoisted_2$9 = ["src"];
4033
4036
  const _hoisted_3$6 = {
4034
4037
  key: 1,
4035
4038
  class: "u-empty__image-default"
@@ -4061,14 +4064,14 @@ const _sfc_main$e = /* @__PURE__ */ vue.defineComponent({
4061
4064
  return vue.openBlock(), vue.createElementBlock("view", {
4062
4065
  class: vue.normalizeClass(["u-empty", { "u-empty--inline": __props.inline }])
4063
4066
  }, [
4064
- vue.createElementVNode("view", _hoisted_1$b, [
4067
+ vue.createElementVNode("view", _hoisted_1$c, [
4065
4068
  vue.renderSlot(_ctx.$slots, "image", {}, () => [
4066
4069
  __props.image ? (vue.openBlock(), vue.createElementBlock("image", {
4067
4070
  key: 0,
4068
4071
  class: "u-empty__image-src",
4069
4072
  src: __props.image,
4070
4073
  mode: "aspectFit"
4071
- }, null, 8, _hoisted_2$8)) : (vue.openBlock(), vue.createElementBlock("view", _hoisted_3$6, [..._cache[0] || (_cache[0] = [
4074
+ }, null, 8, _hoisted_2$9)) : (vue.openBlock(), vue.createElementBlock("view", _hoisted_3$6, [..._cache[0] || (_cache[0] = [
4072
4075
  vue.createElementVNode("text", { class: "u-empty__icon" }, "📭", -1)
4073
4076
  ])]))
4074
4077
  ], true)
@@ -4086,11 +4089,11 @@ const _sfc_main$e = /* @__PURE__ */ vue.defineComponent({
4086
4089
  }
4087
4090
  });
4088
4091
  const uEmpty = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["__scopeId", "data-v-853e089d"]]);
4089
- const _hoisted_1$a = {
4092
+ const _hoisted_1$b = {
4090
4093
  key: 0,
4091
4094
  class: "u-checkbox__check"
4092
4095
  };
4093
- const _hoisted_2$7 = {
4096
+ const _hoisted_2$8 = {
4094
4097
  key: 0,
4095
4098
  class: "u-checkbox__label"
4096
4099
  };
@@ -4169,9 +4172,9 @@ const _sfc_main$d = /* @__PURE__ */ vue.defineComponent({
4169
4172
  class: vue.normalizeClass(["u-checkbox__icon", iconClass.value]),
4170
4173
  style: vue.normalizeStyle(iconStyle.value)
4171
4174
  }, [
4172
- checked.value ? (vue.openBlock(), vue.createElementBlock("text", _hoisted_1$a, "✓")) : vue.createCommentVNode("", true)
4175
+ checked.value ? (vue.openBlock(), vue.createElementBlock("text", _hoisted_1$b, "✓")) : vue.createCommentVNode("", true)
4173
4176
  ], 6),
4174
- __props.label || _ctx.$slots.default ? (vue.openBlock(), vue.createElementBlock("view", _hoisted_2$7, [
4177
+ __props.label || _ctx.$slots.default ? (vue.openBlock(), vue.createElementBlock("view", _hoisted_2$8, [
4175
4178
  vue.renderSlot(_ctx.$slots, "default", {}, () => [
4176
4179
  vue.createTextVNode(vue.toDisplayString(__props.label), 1)
4177
4180
  ], true)
@@ -4181,7 +4184,7 @@ const _sfc_main$d = /* @__PURE__ */ vue.defineComponent({
4181
4184
  }
4182
4185
  });
4183
4186
  const uCheckbox = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["__scopeId", "data-v-6f3ea0c6"]]);
4184
- const _hoisted_1$9 = { class: "u-checkbox-group" };
4187
+ const _hoisted_1$a = { class: "u-checkbox-group" };
4185
4188
  const __default__$c = {
4186
4189
  options: {
4187
4190
  virtualHost: true,
@@ -4224,18 +4227,18 @@ const _sfc_main$c = /* @__PURE__ */ vue.defineComponent({
4224
4227
  toggle
4225
4228
  });
4226
4229
  return (_ctx, _cache) => {
4227
- return vue.openBlock(), vue.createElementBlock("view", _hoisted_1$9, [
4230
+ return vue.openBlock(), vue.createElementBlock("view", _hoisted_1$a, [
4228
4231
  vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
4229
4232
  ]);
4230
4233
  };
4231
4234
  }
4232
4235
  });
4233
4236
  const uCheckboxGroup = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["__scopeId", "data-v-4e51c49e"]]);
4234
- const _hoisted_1$8 = {
4237
+ const _hoisted_1$9 = {
4235
4238
  key: 0,
4236
4239
  class: "u-radio__dot"
4237
4240
  };
4238
- const _hoisted_2$6 = {
4241
+ const _hoisted_2$7 = {
4239
4242
  key: 0,
4240
4243
  class: "u-radio__label"
4241
4244
  };
@@ -4311,9 +4314,9 @@ const _sfc_main$b = /* @__PURE__ */ vue.defineComponent({
4311
4314
  class: vue.normalizeClass(["u-radio__icon", iconClass.value]),
4312
4315
  style: vue.normalizeStyle(iconStyle.value)
4313
4316
  }, [
4314
- checked.value ? (vue.openBlock(), vue.createElementBlock("view", _hoisted_1$8)) : vue.createCommentVNode("", true)
4317
+ checked.value ? (vue.openBlock(), vue.createElementBlock("view", _hoisted_1$9)) : vue.createCommentVNode("", true)
4315
4318
  ], 6),
4316
- __props.label || _ctx.$slots.default ? (vue.openBlock(), vue.createElementBlock("view", _hoisted_2$6, [
4319
+ __props.label || _ctx.$slots.default ? (vue.openBlock(), vue.createElementBlock("view", _hoisted_2$7, [
4317
4320
  vue.renderSlot(_ctx.$slots, "default", {}, () => [
4318
4321
  vue.createTextVNode(vue.toDisplayString(__props.label), 1)
4319
4322
  ], true)
@@ -4323,7 +4326,7 @@ const _sfc_main$b = /* @__PURE__ */ vue.defineComponent({
4323
4326
  }
4324
4327
  });
4325
4328
  const uRadio = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["__scopeId", "data-v-3b4f8627"]]);
4326
- const _hoisted_1$7 = { class: "u-radio-group" };
4329
+ const _hoisted_1$8 = { class: "u-radio-group" };
4327
4330
  const __default__$a = {
4328
4331
  options: {
4329
4332
  virtualHost: true,
@@ -4357,15 +4360,15 @@ const _sfc_main$a = /* @__PURE__ */ vue.defineComponent({
4357
4360
  select
4358
4361
  });
4359
4362
  return (_ctx, _cache) => {
4360
- return vue.openBlock(), vue.createElementBlock("view", _hoisted_1$7, [
4363
+ return vue.openBlock(), vue.createElementBlock("view", _hoisted_1$8, [
4361
4364
  vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
4362
4365
  ]);
4363
4366
  };
4364
4367
  }
4365
4368
  });
4366
4369
  const uRadioGroup = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["__scopeId", "data-v-04ea4949"]]);
4367
- const _hoisted_1$6 = { class: "u-toast__content" };
4368
- const _hoisted_2$5 = {
4370
+ const _hoisted_1$7 = { class: "u-toast__content" };
4371
+ const _hoisted_2$6 = {
4369
4372
  key: 0,
4370
4373
  class: "u-toast__loading"
4371
4374
  };
@@ -4448,8 +4451,8 @@ const _sfc_main$9 = /* @__PURE__ */ vue.defineComponent({
4448
4451
  class: vue.normalizeClass(["u-toast", toastClass.value]),
4449
4452
  style: vue.normalizeStyle(toastStyle.value)
4450
4453
  }, [
4451
- vue.createElementVNode("view", _hoisted_1$6, [
4452
- __props.type === "loading" ? (vue.openBlock(), vue.createElementBlock("view", _hoisted_2$5, [..._cache[0] || (_cache[0] = [
4454
+ vue.createElementVNode("view", _hoisted_1$7, [
4455
+ __props.type === "loading" ? (vue.openBlock(), vue.createElementBlock("view", _hoisted_2$6, [..._cache[0] || (_cache[0] = [
4453
4456
  vue.createElementVNode("view", { class: "u-toast__loading-icon" }, null, -1)
4454
4457
  ])])) : __props.icon ? (vue.openBlock(), vue.createElementBlock("text", _hoisted_3$5, vue.toDisplayString(__props.icon), 1)) : vue.createCommentVNode("", true),
4455
4458
  __props.message ? (vue.openBlock(), vue.createElementBlock("text", _hoisted_4$2, vue.toDisplayString(__props.message), 1)) : vue.createCommentVNode("", true)
@@ -4459,7 +4462,7 @@ const _sfc_main$9 = /* @__PURE__ */ vue.defineComponent({
4459
4462
  }
4460
4463
  });
4461
4464
  const uToast = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["__scopeId", "data-v-ffefead4"]]);
4462
- const _hoisted_1$5 = {
4465
+ const _hoisted_1$6 = {
4463
4466
  key: 0,
4464
4467
  class: "u-popup"
4465
4468
  };
@@ -4494,7 +4497,7 @@ const _sfc_main$8 = /* @__PURE__ */ vue.defineComponent({
4494
4497
  emit("close");
4495
4498
  };
4496
4499
  return (_ctx, _cache) => {
4497
- return __props.visible ? (vue.openBlock(), vue.createElementBlock("view", _hoisted_1$5, [
4500
+ return __props.visible ? (vue.openBlock(), vue.createElementBlock("view", _hoisted_1$6, [
4498
4501
  vue.createElementVNode("view", {
4499
4502
  class: "u-popup__overlay",
4500
4503
  onClick: handleOverlayClick
@@ -4516,8 +4519,8 @@ const _sfc_main$8 = /* @__PURE__ */ vue.defineComponent({
4516
4519
  }
4517
4520
  });
4518
4521
  const uPopup = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["__scopeId", "data-v-dc430e12"]]);
4519
- const _hoisted_1$4 = { class: "u-code-input" };
4520
- const _hoisted_2$4 = { class: "u-code-input__wrapper" };
4522
+ const _hoisted_1$5 = { class: "u-code-input" };
4523
+ const _hoisted_2$5 = { class: "u-code-input__wrapper" };
4521
4524
  const _hoisted_3$4 = {
4522
4525
  key: 0,
4523
4526
  class: "u-code-input__char"
@@ -4615,8 +4618,8 @@ const _sfc_main$7 = /* @__PURE__ */ vue.defineComponent({
4615
4618
  emit("blur");
4616
4619
  };
4617
4620
  return (_ctx, _cache) => {
4618
- return vue.openBlock(), vue.createElementBlock("view", _hoisted_1$4, [
4619
- vue.createElementVNode("view", _hoisted_2$4, [
4621
+ return vue.openBlock(), vue.createElementBlock("view", _hoisted_1$5, [
4622
+ vue.createElementVNode("view", _hoisted_2$5, [
4620
4623
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(__props.length, (i) => {
4621
4624
  return vue.openBlock(), vue.createElementBlock("view", {
4622
4625
  key: i,
@@ -4645,11 +4648,11 @@ const _sfc_main$7 = /* @__PURE__ */ vue.defineComponent({
4645
4648
  }
4646
4649
  });
4647
4650
  const uCodeInput = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["__scopeId", "data-v-9fffa23f"]]);
4648
- const _hoisted_1$3 = {
4651
+ const _hoisted_1$4 = {
4649
4652
  key: 0,
4650
4653
  class: "u-skeleton__content"
4651
4654
  };
4652
- const _hoisted_2$3 = { class: "u-skeleton__content" };
4655
+ const _hoisted_2$4 = { class: "u-skeleton__content" };
4653
4656
  const _hoisted_3$3 = { class: "u-skeleton__paragraphs" };
4654
4657
  const __default__$6 = {
4655
4658
  options: {
@@ -4711,7 +4714,7 @@ const _sfc_main$6 = /* @__PURE__ */ vue.defineComponent({
4711
4714
  return style;
4712
4715
  };
4713
4716
  return (_ctx, _cache) => {
4714
- return !__props.loading ? (vue.openBlock(), vue.createElementBlock("view", _hoisted_1$3, [
4717
+ return !__props.loading ? (vue.openBlock(), vue.createElementBlock("view", _hoisted_1$4, [
4715
4718
  vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
4716
4719
  ])) : (vue.openBlock(), vue.createElementBlock("view", {
4717
4720
  key: 1,
@@ -4722,7 +4725,7 @@ const _sfc_main$6 = /* @__PURE__ */ vue.defineComponent({
4722
4725
  class: vue.normalizeClass(["u-skeleton__avatar", `u-skeleton__avatar--${__props.avatarShape}`]),
4723
4726
  style: vue.normalizeStyle(avatarStyle.value)
4724
4727
  }, null, 6)) : vue.createCommentVNode("", true),
4725
- vue.createElementVNode("view", _hoisted_2$3, [
4728
+ vue.createElementVNode("view", _hoisted_2$4, [
4726
4729
  __props.title ? (vue.openBlock(), vue.createElementBlock("view", {
4727
4730
  key: 0,
4728
4731
  class: "u-skeleton__title",
@@ -4876,8 +4879,8 @@ const _sfc_main$4 = /* @__PURE__ */ vue.defineComponent({
4876
4879
  }
4877
4880
  });
4878
4881
  const uLink = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-f60d6c27"]]);
4879
- const _hoisted_1$2 = { class: "u-read-more" };
4880
- const _hoisted_2$2 = { class: "u-read-more__toggle-text" };
4882
+ const _hoisted_1$3 = { class: "u-read-more" };
4883
+ const _hoisted_2$3 = { class: "u-read-more__toggle-text" };
4881
4884
  const _hoisted_3$2 = { class: "u-read-more__toggle-icon" };
4882
4885
  const __default__$3 = {
4883
4886
  options: {
@@ -4925,7 +4928,7 @@ const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
4925
4928
  }
4926
4929
  };
4927
4930
  return (_ctx, _cache) => {
4928
- return vue.openBlock(), vue.createElementBlock("view", _hoisted_1$2, [
4931
+ return vue.openBlock(), vue.createElementBlock("view", _hoisted_1$3, [
4929
4932
  vue.createElementVNode("view", {
4930
4933
  class: "u-read-more__content",
4931
4934
  style: vue.normalizeStyle(contentStyle.value)
@@ -4937,7 +4940,7 @@ const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
4937
4940
  class: "u-read-more__toggle",
4938
4941
  onClick: handleToggle
4939
4942
  }, [
4940
- vue.createElementVNode("text", _hoisted_2$2, vue.toDisplayString(toggleText.value), 1),
4943
+ vue.createElementVNode("text", _hoisted_2$3, vue.toDisplayString(toggleText.value), 1),
4941
4944
  vue.createElementVNode("text", _hoisted_3$2, vue.toDisplayString(expanded.value ? "↑" : "↓"), 1)
4942
4945
  ])) : vue.createCommentVNode("", true)
4943
4946
  ]);
@@ -4945,8 +4948,8 @@ const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
4945
4948
  }
4946
4949
  });
4947
4950
  const uReadMore = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-b31720eb"]]);
4948
- const _hoisted_1$1 = { class: "u-tabbar" };
4949
- const _hoisted_2$1 = { class: "u-tabbar__nav-wrap" };
4951
+ const _hoisted_1$2 = { class: "u-tabbar" };
4952
+ const _hoisted_2$2 = { class: "u-tabbar__nav-wrap" };
4950
4953
  const _hoisted_3$1 = { class: "u-tabbar__center" };
4951
4954
  const _hoisted_4 = { class: "u-tabbar__center-brand" };
4952
4955
  const _hoisted_5 = { class: "u-tabbar__center-text" };
@@ -4977,8 +4980,8 @@ const _sfc_main$2 = /* @__PURE__ */ vue.defineComponent({
4977
4980
  emit("tab-change", tab);
4978
4981
  };
4979
4982
  return (_ctx, _cache) => {
4980
- return vue.openBlock(), vue.createElementBlock("view", _hoisted_1$1, [
4981
- vue.createElementVNode("view", _hoisted_2$1, [
4983
+ return vue.openBlock(), vue.createElementBlock("view", _hoisted_1$2, [
4984
+ vue.createElementVNode("view", _hoisted_2$2, [
4982
4985
  vue.createElementVNode("view", {
4983
4986
  class: vue.normalizeClass(["u-tabbar__tab-btn", { "u-tabbar__tab-btn--active": __props.modelValue === __props.leftTab.value }]),
4984
4987
  onClick: _cache[0] || (_cache[0] = ($event) => switchTab(__props.leftTab.value))
@@ -5027,6 +5030,8 @@ const _sfc_main$2 = /* @__PURE__ */ vue.defineComponent({
5027
5030
  }
5028
5031
  });
5029
5032
  const uTabbar = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-10cb84bc"]]);
5033
+ const _hoisted_1$1 = { class: "u-qrcode" };
5034
+ const _hoisted_2$1 = ["canvas-id", "id"];
5030
5035
  const __default__$1 = {
5031
5036
  options: {
5032
5037
  virtualHost: true,
@@ -5045,246 +5050,452 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
5045
5050
  },
5046
5051
  setup(__props) {
5047
5052
  const props = __props;
5048
- const matrix = vue.ref([]);
5049
- const cellSize = vue.computed(() => {
5050
- if (matrix.value.length === 0) return 0;
5051
- return props.size / matrix.value.length;
5052
- });
5053
- const matrixStyle = vue.computed(() => ({
5054
- width: `${props.size}px`,
5055
- height: `${props.size}px`,
5056
- backgroundColor: props.bgColor
5057
- }));
5058
- const QRCode = {
5059
- // 错误纠正级别
5060
- ECL: { L: 1, M: 0, Q: 3, H: 2 },
5061
- // 版本容量表
5062
- getCapacity(version, ecl) {
5063
- const capacities = [
5064
- 0,
5065
- 17,
5066
- 32,
5067
- 53,
5068
- 78,
5069
- 106,
5070
- 134,
5071
- 154,
5072
- 192,
5073
- 230,
5074
- 271,
5075
- 321,
5076
- 367,
5077
- 425,
5078
- 458,
5079
- 520,
5080
- 586,
5081
- 644,
5082
- 718,
5083
- 792,
5084
- 858,
5085
- 929,
5086
- 1003,
5087
- 1091,
5088
- 1171,
5089
- 1273,
5090
- 1367,
5091
- 1465,
5092
- 1528,
5093
- 1628,
5094
- 1732,
5095
- 1840,
5096
- 1952,
5097
- 2068,
5098
- 2188,
5099
- 2303,
5100
- 2431,
5101
- 2563,
5102
- 2699,
5103
- 2809,
5104
- 2953
5105
- ];
5106
- return capacities[version] || 0;
5107
- },
5053
+ const canvasId = vue.ref(`qrcode_${Date.now()}_${Math.random().toString(36).slice(2, 7)}`);
5054
+ class QRCode {
5108
5055
  // 获取版本
5109
- getVersion(length, ecl) {
5056
+ static getVersion(dataLength) {
5110
5057
  for (let v = 1; v <= 40; v++) {
5111
- if (this.getCapacity(v, ecl) >= length) return v;
5058
+ if (this.CAPACITY[v] >= dataLength) return v;
5112
5059
  }
5113
5060
  return 40;
5114
- },
5115
- // 生成二维码矩阵
5116
- generate(data, ecl) {
5117
- const level = this.ECL[ecl] || 0;
5118
- const version = this.getVersion(data.length, level);
5061
+ }
5062
+ // 生成二维码数据
5063
+ static generate(data, ecl) {
5064
+ const version = this.getVersion(data.length);
5119
5065
  const size = version * 4 + 17;
5120
- const result = [];
5066
+ const modules = [];
5121
5067
  for (let i = 0; i < size; i++) {
5122
- result[i] = new Array(size).fill(-1);
5068
+ modules[i] = new Array(size).fill(0);
5123
5069
  }
5124
- this.addFinderPattern(result, 0, 0);
5125
- this.addFinderPattern(result, size - 7, 0);
5126
- this.addFinderPattern(result, 0, size - 7);
5127
- this.addSeparator(result, size);
5128
- this.addAlignmentPattern(result, version);
5129
- this.addTimingPattern(result, size);
5130
- this.addFormatInfo(result, size);
5131
- this.fillData(result, data, version, size);
5132
- return result;
5133
- },
5134
- addFinderPattern(matrix2, row, col) {
5135
- for (let r = 0; r < 7; r++) {
5136
- for (let c = 0; c < 7; c++) {
5137
- if (row + r < matrix2.length && col + c < matrix2.length) {
5070
+ this.addFinderPatterns(modules, size);
5071
+ this.addTimingPatterns(modules, size);
5072
+ if (version >= 2) {
5073
+ this.addAlignmentPatterns(modules, version, size);
5074
+ }
5075
+ this.addDarkModule(modules, size);
5076
+ const codewords = this.encodeCodewords(data, version, ecl);
5077
+ this.fillData(modules, codewords, size);
5078
+ const bestMask = this.findBestMask(modules, size);
5079
+ this.applyMask(modules, size, bestMask);
5080
+ this.addFormatInfo(modules, size, ecl, bestMask);
5081
+ return { version, size, modules };
5082
+ }
5083
+ // 添加定位图案
5084
+ static addFinderPatterns(modules, size) {
5085
+ const positions = [[0, 0], [size - 7, 0], [0, size - 7]];
5086
+ for (const [row, col] of positions) {
5087
+ for (let r = 0; r < 7; r++) {
5088
+ for (let c = 0; c < 7; c++) {
5138
5089
  if (r === 0 || r === 6 || c === 0 || c === 6 || r >= 2 && r <= 4 && c >= 2 && c <= 4) {
5139
- matrix2[row + r][col + c] = 1;
5140
- } else {
5141
- matrix2[row + r][col + c] = 0;
5090
+ modules[row + r][col + c] = 1;
5142
5091
  }
5143
5092
  }
5144
5093
  }
5094
+ for (let i = 0; i < 8; i++) {
5095
+ if (row === 0 && i < size && modules[7]) modules[7][i] = 0;
5096
+ if (row === 0 && i < size && modules[i]) modules[i][7] = 0;
5097
+ if (row === size - 7 && i < size && modules[7]) modules[7][size - 8 + i] = 0;
5098
+ if (row === size - 7 && i < size && modules[i]) modules[i][size - 8] = 0;
5099
+ if (row === 0 && col === size - 7 && i < size && modules[size - 8]) modules[size - 8][i] = 0;
5100
+ if (row === 0 && col === size - 7 && i < size && modules[size - 1 - i]) modules[size - 1 - i][7] = 0;
5101
+ }
5145
5102
  }
5146
- },
5147
- addSeparator(matrix2, size) {
5148
- for (let i = 0; i < 8; i++) {
5149
- if (i < size && matrix2[7]) matrix2[7][i] = 0;
5150
- if (i < size && matrix2[i]) matrix2[i][7] = 0;
5151
- if (size - 8 + i < size && matrix2[7]) matrix2[7][size - 8 + i] = 0;
5152
- if (i < size && matrix2[i]) matrix2[i][size - 8] = 0;
5153
- if (i < size && matrix2[size - 8]) matrix2[size - 8][i] = 0;
5154
- if (size - 8 + i < size && matrix2[size - 1 - i]) matrix2[size - 1 - i][7] = 0;
5103
+ }
5104
+ // 添加时序图案
5105
+ static addTimingPatterns(modules, size) {
5106
+ for (let i = 8; i < size - 8; i++) {
5107
+ modules[6][i] = i % 2 === 0 ? 1 : 0;
5108
+ modules[i][6] = i % 2 === 0 ? 1 : 0;
5155
5109
  }
5156
- },
5157
- addAlignmentPattern(matrix2, version) {
5158
- if (version < 2) return;
5159
- const positions = this.getAlignmentPositions(version);
5110
+ }
5111
+ // 添加定位图案
5112
+ static addAlignmentPatterns(modules, version, size) {
5113
+ const positions = this.getAlignmentPositions(version, size);
5160
5114
  for (const row of positions) {
5161
5115
  for (const col of positions) {
5162
- if (matrix2[row] && matrix2[row][col] === -1) {
5163
- this.addAlignmentPatternAt(matrix2, row, col);
5116
+ if (modules[row][col] !== 0) continue;
5117
+ for (let r = -2; r <= 2; r++) {
5118
+ for (let c = -2; c <= 2; c++) {
5119
+ if (row + r >= 0 && row + r < size && col + c >= 0 && col + c < size) {
5120
+ if (Math.abs(r) === 2 || Math.abs(c) === 2 || r === 0 && c === 0) {
5121
+ modules[row + r][col + c] = 1;
5122
+ } else {
5123
+ modules[row + r][col + c] = 0;
5124
+ }
5125
+ }
5126
+ }
5164
5127
  }
5165
5128
  }
5166
5129
  }
5167
- },
5168
- getAlignmentPositions(version) {
5130
+ }
5131
+ // 获取定位图案位置
5132
+ static getAlignmentPositions(version, size) {
5169
5133
  if (version === 1) return [];
5170
- const intervals = Math.floor(version / 7) + 1;
5171
- const size = version * 4 + 17;
5172
- const step = Math.ceil((size - 13) / intervals);
5173
5134
  const positions = [6];
5174
- for (let i = 1; i <= intervals; i++) {
5175
- positions.push(size - 7 + (i - intervals) * step);
5135
+ const step = version === 32 ? 26 : Math.ceil((size - 13) / (Math.floor(version / 7) + 1));
5136
+ let pos = size - 7;
5137
+ while (pos > 6) {
5138
+ positions.unshift(pos);
5139
+ pos -= step;
5176
5140
  }
5177
- return [...new Set(positions)].sort((a, b) => a - b);
5178
- },
5179
- addAlignmentPatternAt(matrix2, row, col) {
5180
- for (let r = -2; r <= 2; r++) {
5181
- for (let c = -2; c <= 2; c++) {
5182
- if (row + r >= 0 && row + r < matrix2.length && col + c >= 0 && col + c < matrix2.length) {
5183
- if (Math.abs(r) === 2 || Math.abs(c) === 2 || r === 0 && c === 0) {
5184
- matrix2[row + r][col + c] = 1;
5185
- } else {
5186
- matrix2[row + r][col + c] = 0;
5187
- }
5188
- }
5141
+ return positions;
5142
+ }
5143
+ // 添加暗模块
5144
+ static addDarkModule(modules, size) {
5145
+ modules[size - 8][8] = 1;
5146
+ }
5147
+ // 编码码字
5148
+ static encodeCodewords(data, version, ecl) {
5149
+ const bits = [];
5150
+ bits.push(0, 1, 0, 0);
5151
+ const cciBits = version <= 9 ? 8 : 16;
5152
+ for (let i = cciBits - 1; i >= 0; i--) {
5153
+ bits.push(data.length >> i & 1);
5154
+ }
5155
+ for (const char of data) {
5156
+ const code2 = char.charCodeAt(0);
5157
+ for (let i = 7; i >= 0; i--) {
5158
+ bits.push(code2 >> i & 1);
5189
5159
  }
5190
5160
  }
5191
- },
5192
- addTimingPattern(matrix2, size) {
5193
- for (let i = 8; i < size - 8; i++) {
5194
- if (matrix2[6] && matrix2[6][i] === -1) matrix2[6][i] = i % 2 === 0 ? 1 : 0;
5195
- if (matrix2[i] && matrix2[i][6] === -1) matrix2[i][6] = i % 2 === 0 ? 1 : 0;
5161
+ const totalDataBits = (this.TOTAL_CODEWORDS[version] - this.ECC_CODEWORDS[version]) * 8;
5162
+ const termLen = Math.min(4, totalDataBits - bits.length);
5163
+ for (let i = 0; i < termLen; i++) bits.push(0);
5164
+ while (bits.length % 8 !== 0) bits.push(0);
5165
+ const padBytes = [236, 17];
5166
+ let padIdx = 0;
5167
+ while (bits.length < totalDataBits) {
5168
+ for (let i = 7; i >= 0; i--) {
5169
+ bits.push(padBytes[padIdx] >> i & 1);
5170
+ }
5171
+ padIdx = (padIdx + 1) % 2;
5172
+ }
5173
+ const bytes = [];
5174
+ for (let i = 0; i < bits.length; i += 8) {
5175
+ let b = 0;
5176
+ for (let j = 0; j < 8; j++) b = b << 1 | bits[i + j];
5177
+ bytes.push(b);
5178
+ }
5179
+ const eccBytes = this.generateECC(bytes, this.ECC_CODEWORDS[version]);
5180
+ return [...bytes, ...eccBytes];
5181
+ }
5182
+ // Reed-Solomon 纠错码生成
5183
+ static generateECC(data, eccCount) {
5184
+ const GF_EXP = new Array(512);
5185
+ const GF_LOG = new Array(256);
5186
+ let x = 1;
5187
+ for (let i = 0; i < 255; i++) {
5188
+ GF_EXP[i] = x;
5189
+ GF_LOG[x] = i;
5190
+ x = x * 2;
5191
+ if (x >= 256) x ^= 285;
5192
+ }
5193
+ for (let i = 255; i < 512; i++) {
5194
+ GF_EXP[i] = GF_EXP[i - 255];
5195
+ }
5196
+ const gfMul = (a, b) => {
5197
+ if (a === 0 || b === 0) return 0;
5198
+ return GF_EXP[GF_LOG[a] + GF_LOG[b]];
5199
+ };
5200
+ const genPoly = [1];
5201
+ for (let i = 0; i < eccCount; i++) {
5202
+ const newPoly = new Array(genPoly.length + 1).fill(0);
5203
+ for (let j = 0; j < genPoly.length; j++) {
5204
+ newPoly[j] ^= genPoly[j];
5205
+ newPoly[j + 1] ^= gfMul(genPoly[j], GF_EXP[i]);
5206
+ }
5207
+ genPoly = newPoly;
5208
+ }
5209
+ const ecc = new Array(eccCount).fill(0);
5210
+ for (const byte of data) {
5211
+ const factor = byte ^ ecc[0];
5212
+ ecc.shift();
5213
+ ecc.push(0);
5214
+ for (let i = 0; i < ecc.length; i++) {
5215
+ ecc[i] ^= gfMul(genPoly[i], factor);
5216
+ }
5217
+ }
5218
+ return ecc;
5219
+ }
5220
+ // 填充数据到矩阵
5221
+ static fillData(modules, codewords, size) {
5222
+ for (let row = 0; row < size; row++) {
5223
+ for (let col = 0; col < size; col++) {
5224
+ if (modules[row][col] !== 0) {
5225
+ modules[row][col] = -1;
5226
+ }
5227
+ }
5196
5228
  }
5197
- },
5198
- addFormatInfo(matrix2, size) {
5199
5229
  for (let i = 0; i < 9; i++) {
5200
- if (matrix2[8] && matrix2[8][i] === -1) matrix2[8][i] = 0;
5201
- if (matrix2[i] && matrix2[i][8] === -1) matrix2[i][8] = 0;
5230
+ if (modules[8][i] === 0) modules[8][i] = -1;
5231
+ if (modules[i][8] === 0) modules[i][8] = -1;
5202
5232
  }
5203
5233
  for (let i = 0; i < 8; i++) {
5204
- if (matrix2[8] && matrix2[8][size - 1 - i] === -1) matrix2[8][size - 1 - i] = 0;
5205
- if (matrix2[size - 1 - i] && matrix2[size - 1 - i][8] === -1) matrix2[size - 1 - i][8] = 0;
5234
+ if (modules[8][size - 1 - i] === 0) modules[8][size - 1 - i] = -1;
5235
+ if (modules[size - 1 - i][8] === 0) modules[size - 1 - i][8] = -1;
5206
5236
  }
5207
- },
5208
- fillData(matrix2, data, version, size) {
5209
- const bytes = this.encodeData(data);
5210
- let bitIndex = 0;
5237
+ let bitIdx = 0;
5211
5238
  let upward = true;
5212
- for (let col = size - 1; col >= 1; col -= 2) {
5239
+ for (let col = size - 1; col >= 0; col -= 2) {
5213
5240
  if (col === 6) col = 5;
5214
5241
  for (let row = upward ? size - 1 : 0; upward ? row >= 0 : row < size; upward ? row-- : row++) {
5215
5242
  for (let c = 0; c < 2; c++) {
5216
- const currentCol = col - c;
5217
- if (matrix2[row] && matrix2[row][currentCol] === -1) {
5218
- const bit = bitIndex < bytes.length * 8 ? bytes[Math.floor(bitIndex / 8)] >> 7 - bitIndex % 8 & 1 : bitIndex % 2 === 0 ? 1 : 0;
5219
- matrix2[row][currentCol] = bit;
5220
- bitIndex++;
5243
+ const tc = col - c;
5244
+ if (tc >= 0 && modules[row][tc] === 0) {
5245
+ let bit = 0;
5246
+ if (bitIdx < codewords.length * 8) {
5247
+ bit = codewords[Math.floor(bitIdx / 8)] >> 7 - bitIdx % 8 & 1;
5248
+ }
5249
+ modules[row][tc] = bit;
5250
+ bitIdx++;
5221
5251
  }
5222
5252
  }
5223
5253
  }
5224
5254
  upward = !upward;
5225
5255
  }
5226
- },
5227
- encodeData(data) {
5228
- const bytes = [];
5229
- bytes.push(64);
5230
- const len = data.length;
5231
- if (len < 256) {
5232
- bytes.push(len);
5256
+ }
5257
+ // 寻找最佳掩码
5258
+ static findBestMask(modules, size) {
5259
+ let bestMask = 0;
5260
+ let bestScore = Infinity;
5261
+ for (let mask = 0; mask < 8; mask++) {
5262
+ const testModules = modules.map((row) => [...row]);
5263
+ this.applyMask(testModules, size, mask);
5264
+ const score = this.evaluateMask(testModules, size);
5265
+ if (score < bestScore) {
5266
+ bestScore = score;
5267
+ bestMask = mask;
5268
+ }
5233
5269
  }
5234
- for (let i = 0; i < data.length; i++) {
5235
- bytes.push(data.charCodeAt(i));
5270
+ return bestMask;
5271
+ }
5272
+ // 应用掩码
5273
+ static applyMask(modules, size, mask) {
5274
+ for (let row = 0; row < size; row++) {
5275
+ for (let col = 0; col < size; col++) {
5276
+ if (modules[row][col] >= 0) {
5277
+ if (this.getMaskBit(row, col, mask)) {
5278
+ modules[row][col] = modules[row][col] === 1 ? 0 : 1;
5279
+ }
5280
+ }
5281
+ }
5236
5282
  }
5237
- bytes.push(0, 0, 0, 0);
5238
- return bytes;
5239
5283
  }
5240
- };
5241
- const generateQRCode = () => {
5242
- if (!props.value) {
5243
- matrix.value = [];
5244
- return;
5284
+ // 掩码函数
5285
+ static getMaskBit(row, col, mask) {
5286
+ switch (mask) {
5287
+ case 0:
5288
+ return (row + col) % 2 === 0;
5289
+ case 1:
5290
+ return row % 2 === 0;
5291
+ case 2:
5292
+ return col % 3 === 0;
5293
+ case 3:
5294
+ return (row + col) % 3 === 0;
5295
+ case 4:
5296
+ return (Math.floor(row / 2) + Math.floor(col / 3)) % 2 === 0;
5297
+ case 5:
5298
+ return row * col % 2 + row * col % 3 === 0;
5299
+ case 6:
5300
+ return (row * col % 2 + row * col % 3) % 2 === 0;
5301
+ case 7:
5302
+ return ((row + col) % 2 + row * col % 3) % 2 === 0;
5303
+ default:
5304
+ return false;
5305
+ }
5245
5306
  }
5246
- matrix.value = QRCode.generate(props.value, props.errorCorrectLevel);
5307
+ // 评估掩码质量
5308
+ static evaluateMask(modules, size) {
5309
+ let score = 0;
5310
+ for (let row = 0; row < size; row++) {
5311
+ let count = 1;
5312
+ for (let col = 1; col < size; col++) {
5313
+ if (modules[row][col] === modules[row][col - 1]) {
5314
+ count++;
5315
+ } else {
5316
+ if (count >= 5) score += count - 2;
5317
+ count = 1;
5318
+ }
5319
+ }
5320
+ if (count >= 5) score += count - 2;
5321
+ }
5322
+ for (let col = 0; col < size; col++) {
5323
+ let count = 1;
5324
+ for (let row = 1; row < size; row++) {
5325
+ if (modules[row][col] === modules[row - 1][col]) {
5326
+ count++;
5327
+ } else {
5328
+ if (count >= 5) score += count - 2;
5329
+ count = 1;
5330
+ }
5331
+ }
5332
+ if (count >= 5) score += count - 2;
5333
+ }
5334
+ return score;
5335
+ }
5336
+ // 添加格式信息
5337
+ static addFormatInfo(modules, size, ecl, mask) {
5338
+ const eclBits = this.ECC_LEVEL[ecl];
5339
+ const data = eclBits << 3 | mask;
5340
+ let rem = data;
5341
+ for (let i = 0; i < 10; i++) {
5342
+ rem = rem << 1 ^ (rem >> 14) * 1335;
5343
+ }
5344
+ const format = (data << 10 | rem) ^ 21522;
5345
+ const bits = [];
5346
+ for (let i = 14; i >= 0; i--) {
5347
+ bits.push(format >> i & 1);
5348
+ }
5349
+ for (let i = 0; i < 6; i++) modules[8][i] = bits[i];
5350
+ modules[8][7] = bits[6];
5351
+ modules[8][8] = bits[7];
5352
+ modules[7][8] = bits[8];
5353
+ for (let i = 9; i < 15; i++) modules[14 - i][8] = bits[i];
5354
+ for (let i = 0; i < 8; i++) modules[8][size - 1 - i] = bits[14 - i];
5355
+ for (let i = 8; i < 15; i++) modules[size - 15 + i][8] = bits[14 - i];
5356
+ }
5357
+ }
5358
+ // 纠错级别
5359
+ __publicField(QRCode, "ECC_LEVEL", { L: 1, M: 0, Q: 3, H: 2 });
5360
+ // 每个版本的纠错码字数(M级别)
5361
+ __publicField(QRCode, "ECC_CODEWORDS", [
5362
+ 0,
5363
+ 10,
5364
+ 16,
5365
+ 22,
5366
+ 28,
5367
+ 36,
5368
+ 44,
5369
+ 52,
5370
+ 64,
5371
+ 72,
5372
+ 80,
5373
+ 96,
5374
+ 108,
5375
+ 120,
5376
+ 132,
5377
+ 144,
5378
+ 168,
5379
+ 180,
5380
+ 196,
5381
+ 216,
5382
+ 240,
5383
+ 260,
5384
+ 288,
5385
+ 320,
5386
+ 344,
5387
+ 376,
5388
+ 412,
5389
+ 452,
5390
+ 492,
5391
+ 536
5392
+ ]);
5393
+ // 每个版本的总码字数
5394
+ __publicField(QRCode, "TOTAL_CODEWORDS", [
5395
+ 0,
5396
+ 26,
5397
+ 44,
5398
+ 70,
5399
+ 100,
5400
+ 134,
5401
+ 172,
5402
+ 196,
5403
+ 242,
5404
+ 292,
5405
+ 346,
5406
+ 404,
5407
+ 466,
5408
+ 532,
5409
+ 581,
5410
+ 625,
5411
+ 733,
5412
+ 815,
5413
+ 901,
5414
+ 993,
5415
+ 1079,
5416
+ 1157,
5417
+ 1253,
5418
+ 1353,
5419
+ 1453,
5420
+ 1553,
5421
+ 1673,
5422
+ 1793,
5423
+ 1913,
5424
+ 2033
5425
+ ]);
5426
+ // 每个版本的容量(字节模式,M级别)
5427
+ __publicField(QRCode, "CAPACITY", [
5428
+ 0,
5429
+ 16,
5430
+ 28,
5431
+ 44,
5432
+ 64,
5433
+ 86,
5434
+ 108,
5435
+ 124,
5436
+ 154,
5437
+ 186,
5438
+ 216,
5439
+ 252,
5440
+ 290,
5441
+ 334,
5442
+ 365,
5443
+ 415,
5444
+ 453,
5445
+ 507,
5446
+ 563,
5447
+ 623,
5448
+ 669,
5449
+ 719,
5450
+ 783,
5451
+ 843,
5452
+ 909,
5453
+ 969,
5454
+ 1047,
5455
+ 1119,
5456
+ 1193,
5457
+ 1273
5458
+ ]);
5459
+ const drawQRCode = () => {
5460
+ if (!props.value) return;
5461
+ vue.nextTick(() => {
5462
+ const result = QRCode.generate(props.value, props.errorCorrectLevel);
5463
+ const cellSize = props.size / result.size;
5464
+ const ctx = uni.createCanvasContext(canvasId.value);
5465
+ ctx.setFillStyle(props.bgColor);
5466
+ ctx.fillRect(0, 0, props.size, props.size);
5467
+ ctx.setFillStyle(props.color);
5468
+ for (let row = 0; row < result.size; row++) {
5469
+ for (let col = 0; col < result.size; col++) {
5470
+ if (result.modules[row][col] === 1) {
5471
+ ctx.fillRect(col * cellSize, row * cellSize, cellSize, cellSize);
5472
+ }
5473
+ }
5474
+ }
5475
+ ctx.draw();
5476
+ });
5247
5477
  };
5248
- vue.watch(() => props.value, generateQRCode);
5249
- vue.watch(() => props.errorCorrectLevel, generateQRCode);
5478
+ vue.watch(() => props.value, drawQRCode);
5479
+ vue.watch(() => props.size, drawQRCode);
5480
+ vue.watch(() => props.color, drawQRCode);
5481
+ vue.watch(() => props.bgColor, drawQRCode);
5250
5482
  vue.onMounted(() => {
5251
- generateQRCode();
5483
+ drawQRCode();
5252
5484
  });
5253
5485
  return (_ctx, _cache) => {
5254
- return vue.openBlock(), vue.createElementBlock("view", {
5255
- class: "u-qrcode",
5256
- style: vue.normalizeStyle({ width: `${__props.size}px`, height: `${__props.size}px` })
5257
- }, [
5258
- matrix.value.length > 0 ? (vue.openBlock(), vue.createElementBlock("view", {
5486
+ return vue.openBlock(), vue.createElementBlock("view", _hoisted_1$1, [
5487
+ canvasId.value ? (vue.openBlock(), vue.createElementBlock("canvas", {
5259
5488
  key: 0,
5260
- class: "u-qrcode__matrix",
5261
- style: vue.normalizeStyle(matrixStyle.value)
5262
- }, [
5263
- (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(matrix.value, (row, rowIndex) => {
5264
- return vue.openBlock(), vue.createElementBlock("view", {
5265
- key: rowIndex,
5266
- class: "u-qrcode__row",
5267
- style: vue.normalizeStyle({ height: `${cellSize.value}px` })
5268
- }, [
5269
- (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(row, (cell, colIndex) => {
5270
- return vue.openBlock(), vue.createElementBlock("view", {
5271
- key: colIndex,
5272
- class: "u-qrcode__cell",
5273
- style: vue.normalizeStyle({
5274
- width: `${cellSize.value}px`,
5275
- height: `${cellSize.value}px`,
5276
- backgroundColor: cell === 1 ? __props.color : __props.bgColor
5277
- })
5278
- }, null, 4);
5279
- }), 128))
5280
- ], 4);
5281
- }), 128))
5282
- ], 4)) : vue.createCommentVNode("", true)
5283
- ], 4);
5489
+ "canvas-id": canvasId.value,
5490
+ id: canvasId.value,
5491
+ class: "u-qrcode__canvas",
5492
+ style: vue.normalizeStyle({ width: `${__props.size}px`, height: `${__props.size}px` })
5493
+ }, null, 12, _hoisted_2$1)) : vue.createCommentVNode("", true)
5494
+ ]);
5284
5495
  };
5285
5496
  }
5286
5497
  });
5287
- const uQrcode = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-ba96b937"]]);
5498
+ const uQrcode = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-ff93204c"]]);
5288
5499
  const _hoisted_1 = { class: "u-barcode" };
5289
5500
  const _hoisted_2 = ["canvas-id"];
5290
5501
  const _hoisted_3 = ["src"];