@atooyu/uxto-ui 1.1.26 → 1.1.27
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 +419 -247
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +419 -247
- package/dist/index.mjs.map +1 -1
- package/dist/style.css +4 -4
- package/package.json +1 -1
- package/src/components/u-qrcode/u-qrcode.vue +304 -103
package/dist/index.js
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
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$
|
|
7
|
+
const _hoisted_1$I = ["disabled", "hover-class"];
|
|
5
8
|
const _hoisted_2$w = {
|
|
6
9
|
key: 0,
|
|
7
10
|
class: "u-button__loading"
|
|
@@ -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$
|
|
88
|
+
], 14, _hoisted_1$I);
|
|
86
89
|
};
|
|
87
90
|
}
|
|
88
91
|
});
|
|
@@ -94,7 +97,7 @@ 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$
|
|
100
|
+
const _hoisted_1$H = {
|
|
98
101
|
key: 0,
|
|
99
102
|
class: "u-input__prefix"
|
|
100
103
|
};
|
|
@@ -163,7 +166,7 @@ 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$
|
|
169
|
+
_ctx.$slots.prefix || __props.prefixIcon ? (vue.openBlock(), vue.createElementBlock("view", _hoisted_1$H, [
|
|
167
170
|
vue.renderSlot(_ctx.$slots, "prefix", {}, () => [
|
|
168
171
|
vue.createElementVNode("text", _hoisted_2$v, vue.toDisplayString(__props.prefixIcon), 1)
|
|
169
172
|
], true)
|
|
@@ -204,7 +207,7 @@ 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$
|
|
210
|
+
const _hoisted_1$G = ["hover-class"];
|
|
208
211
|
const _hoisted_2$u = {
|
|
209
212
|
key: 0,
|
|
210
213
|
class: "u-cell__icon"
|
|
@@ -293,12 +296,12 @@ 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$
|
|
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$
|
|
304
|
+
const _hoisted_1$F = { class: "u-cell-group" };
|
|
302
305
|
const _hoisted_2$t = {
|
|
303
306
|
key: 0,
|
|
304
307
|
class: "u-cell-group__title"
|
|
@@ -318,7 +321,7 @@ 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$
|
|
324
|
+
return vue.openBlock(), vue.createElementBlock("view", _hoisted_1$F, [
|
|
322
325
|
__props.title || _ctx.$slots.title ? (vue.openBlock(), vue.createElementBlock("view", _hoisted_2$t, [
|
|
323
326
|
vue.renderSlot(_ctx.$slots, "title", {}, () => [
|
|
324
327
|
vue.createTextVNode(vue.toDisplayString(__props.title), 1)
|
|
@@ -332,7 +335,7 @@ 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$
|
|
338
|
+
const _hoisted_1$E = {
|
|
336
339
|
key: 0,
|
|
337
340
|
class: "u-modal__header"
|
|
338
341
|
};
|
|
@@ -386,7 +389,7 @@ 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$
|
|
392
|
+
__props.title ? (vue.openBlock(), vue.createElementBlock("view", _hoisted_1$E, [
|
|
390
393
|
vue.createElementVNode("text", _hoisted_2$s, vue.toDisplayString(__props.title), 1)
|
|
391
394
|
])) : vue.createCommentVNode("", true),
|
|
392
395
|
vue.createElementVNode("view", _hoisted_3$m, [
|
|
@@ -628,7 +631,7 @@ function getIconNames() {
|
|
|
628
631
|
function addIcon(name, svg) {
|
|
629
632
|
icons[name] = svg;
|
|
630
633
|
}
|
|
631
|
-
const _hoisted_1$
|
|
634
|
+
const _hoisted_1$D = ["src"];
|
|
632
635
|
const _hoisted_2$r = {
|
|
633
636
|
key: 1,
|
|
634
637
|
class: "u-icon__inner"
|
|
@@ -662,8 +665,8 @@ const _sfc_main$I = /* @__PURE__ */ vue.defineComponent({
|
|
|
662
665
|
return getIcon(props.name) || "";
|
|
663
666
|
});
|
|
664
667
|
const sizePx = vue.computed(() => {
|
|
665
|
-
const
|
|
666
|
-
return
|
|
668
|
+
const size2 = typeof props.size === "number" ? props.size : parseInt(props.size);
|
|
669
|
+
return size2 + "px";
|
|
667
670
|
});
|
|
668
671
|
const colorToFilter = (color) => {
|
|
669
672
|
const colorMap = {
|
|
@@ -687,11 +690,11 @@ const _sfc_main$I = /* @__PURE__ */ vue.defineComponent({
|
|
|
687
690
|
return `invert(1) sepia(1) saturate(10000%) hue-rotate(${hue}deg)`;
|
|
688
691
|
};
|
|
689
692
|
const iconStyle = vue.computed(() => {
|
|
690
|
-
const
|
|
693
|
+
const size2 = typeof props.size === "number" ? props.size : parseInt(props.size);
|
|
691
694
|
const style = {
|
|
692
|
-
fontSize:
|
|
693
|
-
width:
|
|
694
|
-
height:
|
|
695
|
+
fontSize: size2 + "px",
|
|
696
|
+
width: size2 + "px",
|
|
697
|
+
height: size2 + "px"
|
|
695
698
|
};
|
|
696
699
|
if (props.color && isSvgIcon.value) {
|
|
697
700
|
style.filter = colorToFilter(props.color);
|
|
@@ -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$
|
|
725
|
+
}, null, 12, _hoisted_1$D)) : (vue.openBlock(), vue.createElementBlock("text", _hoisted_2$r, 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$
|
|
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$
|
|
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,7 +895,7 @@ 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$
|
|
898
|
+
const _hoisted_1$B = ["src", "mode", "lazy-load", "fade"];
|
|
896
899
|
const _hoisted_2$q = {
|
|
897
900
|
key: 0,
|
|
898
901
|
class: "u-image__loading"
|
|
@@ -946,7 +949,7 @@ 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$
|
|
952
|
+
}, null, 40, _hoisted_1$B),
|
|
950
953
|
__props.loading && !loaded.value ? (vue.openBlock(), vue.createElementBlock("view", _hoisted_2$q, [
|
|
951
954
|
vue.renderSlot(_ctx.$slots, "loading", {}, () => [
|
|
952
955
|
vue.createVNode(_component_u_loading, { size: 20 })
|
|
@@ -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$
|
|
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$
|
|
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,7 +998,7 @@ 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$
|
|
1001
|
+
const _hoisted_1$z = {
|
|
999
1002
|
key: 0,
|
|
1000
1003
|
class: "u-notice-bar__left-icon"
|
|
1001
1004
|
};
|
|
@@ -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$
|
|
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)
|
|
@@ -1066,7 +1069,7 @@ 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$
|
|
1072
|
+
const _hoisted_1$y = {
|
|
1070
1073
|
key: 0,
|
|
1071
1074
|
class: "u-layout__header"
|
|
1072
1075
|
};
|
|
@@ -1091,7 +1094,7 @@ 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$
|
|
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
1100
|
vue.createElementVNode("view", _hoisted_2$o, [
|
|
@@ -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$
|
|
1111
|
+
const _hoisted_1$x = {
|
|
1109
1112
|
key: 0,
|
|
1110
1113
|
class: "u-badge__text"
|
|
1111
1114
|
};
|
|
@@ -1161,14 +1164,14 @@ 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$
|
|
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$
|
|
1174
|
+
const _hoisted_1$w = {
|
|
1172
1175
|
key: 0,
|
|
1173
1176
|
class: "u-loading-page"
|
|
1174
1177
|
};
|
|
@@ -1191,7 +1194,7 @@ 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$
|
|
1197
|
+
return __props.visible ? (vue.openBlock(), vue.createElementBlock("view", _hoisted_1$w, [
|
|
1195
1198
|
vue.createElementVNode("view", _hoisted_2$n, [
|
|
1196
1199
|
vue.createElementVNode("view", {
|
|
1197
1200
|
class: "u-loading-page__spinner",
|
|
@@ -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$
|
|
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$
|
|
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,7 +1340,7 @@ 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$
|
|
1343
|
+
const _hoisted_1$u = { class: "u-keyboard__header" };
|
|
1341
1344
|
const _hoisted_2$m = { class: "u-keyboard__title" };
|
|
1342
1345
|
const _hoisted_3$i = ["onClick"];
|
|
1343
1346
|
const __default__$x = {
|
|
@@ -1469,7 +1472,7 @@ 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$
|
|
1475
|
+
vue.createElementVNode("view", _hoisted_1$u, [
|
|
1473
1476
|
vue.createElementVNode("text", _hoisted_2$m, vue.toDisplayString(__props.title), 1),
|
|
1474
1477
|
vue.createElementVNode("text", {
|
|
1475
1478
|
class: "u-keyboard__close",
|
|
@@ -1498,7 +1501,7 @@ 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$
|
|
1504
|
+
const _hoisted_1$t = { class: "u-picker__toolbar" };
|
|
1502
1505
|
const _hoisted_2$l = { class: "u-picker__title" };
|
|
1503
1506
|
const _hoisted_3$h = {
|
|
1504
1507
|
key: 0,
|
|
@@ -1596,7 +1599,7 @@ 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$
|
|
1602
|
+
vue.createElementVNode("view", _hoisted_1$t, [
|
|
1600
1603
|
vue.createElementVNode("text", {
|
|
1601
1604
|
class: "u-picker__action",
|
|
1602
1605
|
onClick: handleCancel
|
|
@@ -1641,7 +1644,7 @@ 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$
|
|
1647
|
+
const _hoisted_1$s = { class: "u-datetime-picker__toolbar" };
|
|
1645
1648
|
const _hoisted_2$k = { class: "u-datetime-picker__title" };
|
|
1646
1649
|
const __default__$v = {
|
|
1647
1650
|
options: {
|
|
@@ -1870,7 +1873,7 @@ 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$
|
|
1876
|
+
vue.createElementVNode("view", _hoisted_1$s, [
|
|
1874
1877
|
vue.createElementVNode("text", {
|
|
1875
1878
|
class: "u-datetime-picker__action",
|
|
1876
1879
|
onClick: handleCancel
|
|
@@ -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$
|
|
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$
|
|
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$
|
|
2031
|
+
const _hoisted_1$q = { class: "u-grid" };
|
|
2029
2032
|
const __default__$t = {
|
|
2030
2033
|
options: {
|
|
2031
2034
|
virtualHost: true,
|
|
@@ -2062,14 +2065,14 @@ 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$
|
|
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$
|
|
2075
|
+
const _hoisted_1$p = {
|
|
2073
2076
|
key: 0,
|
|
2074
2077
|
class: "u-grid-item__icon"
|
|
2075
2078
|
};
|
|
@@ -2142,7 +2145,7 @@ 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$
|
|
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,
|
|
@@ -2165,7 +2168,7 @@ 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$
|
|
2171
|
+
const _hoisted_1$o = { class: "u-swiper" };
|
|
2169
2172
|
const _hoisted_2$i = {
|
|
2170
2173
|
key: 0,
|
|
2171
2174
|
class: "u-swiper__loading"
|
|
@@ -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$
|
|
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 }),
|
|
@@ -2380,7 +2383,7 @@ 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$
|
|
2386
|
+
const _hoisted_1$n = {
|
|
2384
2387
|
key: 0,
|
|
2385
2388
|
class: "u-search__icon"
|
|
2386
2389
|
};
|
|
@@ -2466,7 +2469,7 @@ 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$
|
|
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
2475
|
vue.createElementVNode("view", _hoisted_2$h, [
|
|
@@ -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$
|
|
2516
|
+
const _hoisted_1$m = ["type", "value", "disabled"];
|
|
2514
2517
|
const __default__$o = {
|
|
2515
2518
|
options: {
|
|
2516
2519
|
virtualHost: true,
|
|
@@ -2550,8 +2553,8 @@ const _sfc_main$o = /* @__PURE__ */ vue.defineComponent({
|
|
|
2550
2553
|
return currentValue.value;
|
|
2551
2554
|
});
|
|
2552
2555
|
const btnSize = vue.computed(() => {
|
|
2553
|
-
const
|
|
2554
|
-
return typeof
|
|
2556
|
+
const size2 = props.buttonSize;
|
|
2557
|
+
return typeof size2 === "number" ? `${size2}px` : size2;
|
|
2555
2558
|
});
|
|
2556
2559
|
const iptWidth = vue.computed(() => {
|
|
2557
2560
|
const width = props.inputWidth;
|
|
@@ -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$
|
|
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,7 +2679,7 @@ 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$
|
|
2682
|
+
const _hoisted_1$l = { class: "u-upload" };
|
|
2680
2683
|
const _hoisted_2$g = { class: "u-upload__list" };
|
|
2681
2684
|
const _hoisted_3$d = ["src", "onClick"];
|
|
2682
2685
|
const _hoisted_4$9 = {
|
|
@@ -2807,7 +2810,7 @@ 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$
|
|
2813
|
+
return vue.openBlock(), vue.createElementBlock("view", _hoisted_1$l, [
|
|
2811
2814
|
vue.createElementVNode("view", _hoisted_2$g, [
|
|
2812
2815
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(fileList.value, (file, index) => {
|
|
2813
2816
|
return vue.openBlock(), vue.createElementBlock("view", {
|
|
@@ -2879,7 +2882,7 @@ 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$
|
|
2885
|
+
const _hoisted_1$k = ["value", "placeholder", "placeholder-style", "disabled", "maxlength", "focus", "auto-height", "fixed", "cursor-spacing", "show-confirm-bar", "adjust-position"];
|
|
2883
2886
|
const _hoisted_2$f = {
|
|
2884
2887
|
key: 0,
|
|
2885
2888
|
class: "u-textarea__limit"
|
|
@@ -2971,7 +2974,7 @@ const _sfc_main$m = /* @__PURE__ */ vue.defineComponent({
|
|
|
2971
2974
|
onBlur: handleBlur,
|
|
2972
2975
|
onConfirm: handleConfirm,
|
|
2973
2976
|
onLinechange: handleLineChange
|
|
2974
|
-
}, null, 44, _hoisted_1$
|
|
2977
|
+
}, null, 44, _hoisted_1$k),
|
|
2975
2978
|
__props.showWordLimit && __props.maxlength ? (vue.openBlock(), vue.createElementBlock("view", _hoisted_2$f, [
|
|
2976
2979
|
vue.createElementVNode("text", _hoisted_3$c, vue.toDisplayString(currentLength.value) + "/" + vue.toDisplayString(__props.maxlength), 1)
|
|
2977
2980
|
])) : vue.createCommentVNode("", true)
|
|
@@ -2980,7 +2983,7 @@ 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$
|
|
2986
|
+
const _hoisted_1$j = {
|
|
2984
2987
|
key: 0,
|
|
2985
2988
|
class: "u-slider__min"
|
|
2986
2989
|
};
|
|
@@ -3050,8 +3053,8 @@ const _sfc_main$l = /* @__PURE__ */ vue.defineComponent({
|
|
|
3050
3053
|
return typeof height === "number" ? `${height}px` : height;
|
|
3051
3054
|
});
|
|
3052
3055
|
const buttonSizeStyle = vue.computed(() => {
|
|
3053
|
-
const
|
|
3054
|
-
return typeof
|
|
3056
|
+
const size2 = props.buttonSize;
|
|
3057
|
+
return typeof size2 === "number" ? `${size2}px` : size2;
|
|
3055
3058
|
});
|
|
3056
3059
|
const trackStyle = vue.computed(() => ({
|
|
3057
3060
|
height: barHeightStyle.value,
|
|
@@ -3229,7 +3232,7 @@ 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$
|
|
3235
|
+
__props.showMinMax ? (vue.openBlock(), vue.createElementBlock("view", _hoisted_1$j, [
|
|
3233
3236
|
vue.createElementVNode("text", _hoisted_2$e, vue.toDisplayString(__props.min), 1)
|
|
3234
3237
|
])) : vue.createCommentVNode("", true),
|
|
3235
3238
|
vue.createElementVNode("view", {
|
|
@@ -3299,7 +3302,7 @@ 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$
|
|
3305
|
+
const _hoisted_1$i = { class: "u-list" };
|
|
3303
3306
|
const _hoisted_2$d = {
|
|
3304
3307
|
key: 0,
|
|
3305
3308
|
class: "u-list__header"
|
|
@@ -3350,7 +3353,7 @@ 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$
|
|
3356
|
+
return vue.openBlock(), vue.createElementBlock("view", _hoisted_1$i, [
|
|
3354
3357
|
_ctx.$slots.header || __props.header ? (vue.openBlock(), vue.createElementBlock("view", _hoisted_2$d, [
|
|
3355
3358
|
vue.renderSlot(_ctx.$slots, "header", {}, () => [
|
|
3356
3359
|
vue.createTextVNode(vue.toDisplayString(__props.header), 1)
|
|
@@ -3383,7 +3386,7 @@ 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$
|
|
3389
|
+
const _hoisted_1$h = {
|
|
3387
3390
|
key: 0,
|
|
3388
3391
|
class: "u-list-item__icon"
|
|
3389
3392
|
};
|
|
@@ -3457,7 +3460,7 @@ 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$
|
|
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,
|
|
@@ -3496,7 +3499,7 @@ 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$
|
|
3502
|
+
const _hoisted_1$g = {
|
|
3500
3503
|
key: 0,
|
|
3501
3504
|
class: "u-line-progress__text u-line-progress__text--inside"
|
|
3502
3505
|
};
|
|
@@ -3569,7 +3572,7 @@ 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$
|
|
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
3578
|
__props.showText && !__props.textInside ? (vue.openBlock(), vue.createElementBlock("text", _hoisted_2$b, vue.toDisplayString(textContent.value), 1)) : vue.createCommentVNode("", true)
|
|
@@ -3578,7 +3581,7 @@ const _sfc_main$i = /* @__PURE__ */ vue.defineComponent({
|
|
|
3578
3581
|
}
|
|
3579
3582
|
});
|
|
3580
3583
|
const uLineProgress = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["__scopeId", "data-v-99121563"]]);
|
|
3581
|
-
const _hoisted_1$
|
|
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$
|
|
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,7 +3719,7 @@ 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$
|
|
3722
|
+
const _hoisted_1$e = { class: "u-tooltip__content" };
|
|
3720
3723
|
const _hoisted_2$a = {
|
|
3721
3724
|
key: 0,
|
|
3722
3725
|
class: "u-tooltip__actions"
|
|
@@ -3894,7 +3897,7 @@ 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$
|
|
3900
|
+
vue.createElementVNode("view", _hoisted_1$e, [
|
|
3898
3901
|
__props.actions.length ? (vue.openBlock(), vue.createElementBlock("view", _hoisted_2$a, [
|
|
3899
3902
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(__props.actions, (action, index) => {
|
|
3900
3903
|
return vue.openBlock(), vue.createElementBlock("view", {
|
|
@@ -3915,7 +3918,7 @@ 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$
|
|
3921
|
+
const _hoisted_1$d = ["src"];
|
|
3919
3922
|
const _hoisted_2$9 = {
|
|
3920
3923
|
key: 1,
|
|
3921
3924
|
class: "u-avatar__text"
|
|
@@ -3982,9 +3985,9 @@ const _sfc_main$f = /* @__PURE__ */ vue.defineComponent({
|
|
|
3982
3985
|
]);
|
|
3983
3986
|
const avatarStyle = vue.computed(() => {
|
|
3984
3987
|
const style = {};
|
|
3985
|
-
const
|
|
3986
|
-
style.width = `${
|
|
3987
|
-
style.height = `${
|
|
3988
|
+
const size2 = avatarSize.value;
|
|
3989
|
+
style.width = `${size2}px`;
|
|
3990
|
+
style.height = `${size2}px`;
|
|
3988
3991
|
if (props.bgColor) {
|
|
3989
3992
|
style.backgroundColor = props.bgColor;
|
|
3990
3993
|
}
|
|
@@ -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$
|
|
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))
|
|
4018
4021
|
], true),
|
|
4019
4022
|
__props.badge && !badgeSlot.value ? (vue.openBlock(), vue.createElementBlock("view", {
|
|
4020
4023
|
key: 0,
|
|
@@ -4028,7 +4031,7 @@ 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$
|
|
4034
|
+
const _hoisted_1$c = { class: "u-empty__image" };
|
|
4032
4035
|
const _hoisted_2$8 = ["src"];
|
|
4033
4036
|
const _hoisted_3$6 = {
|
|
4034
4037
|
key: 1,
|
|
@@ -4061,7 +4064,7 @@ 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$
|
|
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,
|
|
@@ -4086,7 +4089,7 @@ 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$
|
|
4092
|
+
const _hoisted_1$b = {
|
|
4090
4093
|
key: 0,
|
|
4091
4094
|
class: "u-checkbox__check"
|
|
4092
4095
|
};
|
|
@@ -4169,7 +4172,7 @@ 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$
|
|
4175
|
+
checked.value ? (vue.openBlock(), vue.createElementBlock("text", _hoisted_1$b, "✓")) : vue.createCommentVNode("", true)
|
|
4173
4176
|
], 6),
|
|
4174
4177
|
__props.label || _ctx.$slots.default ? (vue.openBlock(), vue.createElementBlock("view", _hoisted_2$7, [
|
|
4175
4178
|
vue.renderSlot(_ctx.$slots, "default", {}, () => [
|
|
@@ -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$
|
|
4187
|
+
const _hoisted_1$a = { class: "u-checkbox-group" };
|
|
4185
4188
|
const __default__$c = {
|
|
4186
4189
|
options: {
|
|
4187
4190
|
virtualHost: true,
|
|
@@ -4224,14 +4227,14 @@ 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$
|
|
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$
|
|
4237
|
+
const _hoisted_1$9 = {
|
|
4235
4238
|
key: 0,
|
|
4236
4239
|
class: "u-radio__dot"
|
|
4237
4240
|
};
|
|
@@ -4311,7 +4314,7 @@ 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$
|
|
4317
|
+
checked.value ? (vue.openBlock(), vue.createElementBlock("view", _hoisted_1$9)) : vue.createCommentVNode("", true)
|
|
4315
4318
|
], 6),
|
|
4316
4319
|
__props.label || _ctx.$slots.default ? (vue.openBlock(), vue.createElementBlock("view", _hoisted_2$6, [
|
|
4317
4320
|
vue.renderSlot(_ctx.$slots, "default", {}, () => [
|
|
@@ -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$
|
|
4329
|
+
const _hoisted_1$8 = { class: "u-radio-group" };
|
|
4327
4330
|
const __default__$a = {
|
|
4328
4331
|
options: {
|
|
4329
4332
|
virtualHost: true,
|
|
@@ -4357,14 +4360,14 @@ 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$
|
|
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$
|
|
4370
|
+
const _hoisted_1$7 = { class: "u-toast__content" };
|
|
4368
4371
|
const _hoisted_2$5 = {
|
|
4369
4372
|
key: 0,
|
|
4370
4373
|
class: "u-toast__loading"
|
|
@@ -4448,7 +4451,7 @@ 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$
|
|
4454
|
+
vue.createElementVNode("view", _hoisted_1$7, [
|
|
4452
4455
|
__props.type === "loading" ? (vue.openBlock(), vue.createElementBlock("view", _hoisted_2$5, [..._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),
|
|
@@ -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$
|
|
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$
|
|
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,7 +4519,7 @@ 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$
|
|
4522
|
+
const _hoisted_1$5 = { class: "u-code-input" };
|
|
4520
4523
|
const _hoisted_2$4 = { class: "u-code-input__wrapper" };
|
|
4521
4524
|
const _hoisted_3$4 = {
|
|
4522
4525
|
key: 0,
|
|
@@ -4615,7 +4618,7 @@ 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$
|
|
4621
|
+
return vue.openBlock(), vue.createElementBlock("view", _hoisted_1$5, [
|
|
4619
4622
|
vue.createElementVNode("view", _hoisted_2$4, [
|
|
4620
4623
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(__props.length, (i) => {
|
|
4621
4624
|
return vue.openBlock(), vue.createElementBlock("view", {
|
|
@@ -4645,7 +4648,7 @@ 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$
|
|
4651
|
+
const _hoisted_1$4 = {
|
|
4649
4652
|
key: 0,
|
|
4650
4653
|
class: "u-skeleton__content"
|
|
4651
4654
|
};
|
|
@@ -4675,10 +4678,10 @@ const _sfc_main$6 = /* @__PURE__ */ vue.defineComponent({
|
|
|
4675
4678
|
setup(__props) {
|
|
4676
4679
|
const props = __props;
|
|
4677
4680
|
const avatarStyle = vue.computed(() => {
|
|
4678
|
-
const
|
|
4681
|
+
const size2 = typeof props.avatarSize === "number" ? `${props.avatarSize}px` : props.avatarSize;
|
|
4679
4682
|
return {
|
|
4680
|
-
width:
|
|
4681
|
-
height:
|
|
4683
|
+
width: size2,
|
|
4684
|
+
height: size2
|
|
4682
4685
|
};
|
|
4683
4686
|
});
|
|
4684
4687
|
const titleStyle = vue.computed(() => {
|
|
@@ -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$
|
|
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,
|
|
@@ -4876,7 +4879,7 @@ 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$
|
|
4882
|
+
const _hoisted_1$3 = { class: "u-read-more" };
|
|
4880
4883
|
const _hoisted_2$2 = { class: "u-read-more__toggle-text" };
|
|
4881
4884
|
const _hoisted_3$2 = { class: "u-read-more__toggle-icon" };
|
|
4882
4885
|
const __default__$3 = {
|
|
@@ -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$
|
|
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)
|
|
@@ -4945,7 +4948,7 @@ 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$
|
|
4951
|
+
const _hoisted_1$2 = { class: "u-tabbar" };
|
|
4949
4952
|
const _hoisted_2$1 = { 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" };
|
|
@@ -4977,7 +4980,7 @@ 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$
|
|
4983
|
+
return vue.openBlock(), vue.createElementBlock("view", _hoisted_1$2, [
|
|
4981
4984
|
vue.createElementVNode("view", _hoisted_2$1, [
|
|
4982
4985
|
vue.createElementVNode("view", {
|
|
4983
4986
|
class: vue.normalizeClass(["u-tabbar__tab-btn", { "u-tabbar__tab-btn--active": __props.modelValue === __props.leftTab.value }]),
|
|
@@ -5027,6 +5030,7 @@ 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" };
|
|
5030
5034
|
const __default__$1 = {
|
|
5031
5035
|
options: {
|
|
5032
5036
|
virtualHost: true,
|
|
@@ -5055,167 +5059,222 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
|
|
|
5055
5059
|
height: `${props.size}px`,
|
|
5056
5060
|
backgroundColor: props.bgColor
|
|
5057
5061
|
}));
|
|
5058
|
-
const
|
|
5059
|
-
|
|
5060
|
-
|
|
5061
|
-
|
|
5062
|
-
|
|
5063
|
-
|
|
5064
|
-
|
|
5065
|
-
|
|
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
|
-
},
|
|
5108
|
-
// 获取版本
|
|
5109
|
-
getVersion(length, ecl) {
|
|
5062
|
+
const cellStyle = (cell) => ({
|
|
5063
|
+
width: `${cellSize.value}px`,
|
|
5064
|
+
height: `${cellSize.value}px`,
|
|
5065
|
+
backgroundColor: cell === 1 ? props.color : props.bgColor
|
|
5066
|
+
});
|
|
5067
|
+
class QRCodeGenerator {
|
|
5068
|
+
// 根据数据长度获取版本
|
|
5069
|
+
static getVersion(dataLength) {
|
|
5110
5070
|
for (let v = 1; v <= 40; v++) {
|
|
5111
|
-
if (this.
|
|
5071
|
+
if (this.CAPACITY[v] >= dataLength) return v;
|
|
5112
5072
|
}
|
|
5113
5073
|
return 40;
|
|
5114
|
-
}
|
|
5074
|
+
}
|
|
5115
5075
|
// 生成二维码矩阵
|
|
5116
|
-
generate(data, ecl) {
|
|
5117
|
-
const
|
|
5118
|
-
const
|
|
5119
|
-
const
|
|
5120
|
-
|
|
5121
|
-
|
|
5122
|
-
result[i] = new Array(size).fill(-1);
|
|
5076
|
+
static generate(data, ecl) {
|
|
5077
|
+
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);
|
|
5123
5082
|
}
|
|
5124
|
-
this.addFinderPattern(
|
|
5125
|
-
this.addFinderPattern(
|
|
5126
|
-
this.addFinderPattern(
|
|
5127
|
-
this.addSeparator(
|
|
5128
|
-
|
|
5129
|
-
|
|
5130
|
-
|
|
5131
|
-
this.
|
|
5132
|
-
|
|
5133
|
-
|
|
5134
|
-
|
|
5135
|
-
|
|
5136
|
-
|
|
5137
|
-
|
|
5138
|
-
|
|
5139
|
-
|
|
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);
|
|
5087
|
+
if (version >= 2) {
|
|
5088
|
+
this.addAlignmentPatterns(matrix2, version);
|
|
5089
|
+
}
|
|
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;
|
|
5140
5114
|
} else {
|
|
5141
|
-
matrix2[
|
|
5115
|
+
matrix2[tr][tc] = 0;
|
|
5142
5116
|
}
|
|
5143
5117
|
}
|
|
5144
5118
|
}
|
|
5145
5119
|
}
|
|
5146
|
-
}
|
|
5147
|
-
|
|
5148
|
-
|
|
5149
|
-
|
|
5150
|
-
|
|
5151
|
-
|
|
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;
|
|
5155
|
-
}
|
|
5156
|
-
},
|
|
5157
|
-
addAlignmentPattern(matrix2, version) {
|
|
5158
|
-
if (version < 2) return;
|
|
5120
|
+
}
|
|
5121
|
+
// 添加分隔符
|
|
5122
|
+
static addSeparator(matrix2, size2) {
|
|
5123
|
+
}
|
|
5124
|
+
// 添加定位图案
|
|
5125
|
+
static addAlignmentPatterns(matrix2, version) {
|
|
5159
5126
|
const positions = this.getAlignmentPositions(version);
|
|
5160
5127
|
for (const row of positions) {
|
|
5161
5128
|
for (const col of positions) {
|
|
5129
|
+
if (row < 9 && col < 9 || row < 9 && col > size - 9 || row > size - 9 && col < 9) {
|
|
5130
|
+
continue;
|
|
5131
|
+
}
|
|
5162
5132
|
if (matrix2[row] && matrix2[row][col] === -1) {
|
|
5163
|
-
this.
|
|
5133
|
+
this.addAlignmentPattern(matrix2, row, col);
|
|
5164
5134
|
}
|
|
5165
5135
|
}
|
|
5166
5136
|
}
|
|
5167
|
-
}
|
|
5168
|
-
|
|
5137
|
+
}
|
|
5138
|
+
// 获取定位图案位置
|
|
5139
|
+
static getAlignmentPositions(version) {
|
|
5169
5140
|
if (version === 1) return [];
|
|
5170
5141
|
const intervals = Math.floor(version / 7) + 1;
|
|
5171
|
-
const
|
|
5172
|
-
const step = Math.ceil((
|
|
5142
|
+
const size2 = version * 4 + 17;
|
|
5143
|
+
const step = Math.ceil((size2 - 13) / intervals);
|
|
5173
5144
|
const positions = [6];
|
|
5174
5145
|
for (let i = 1; i <= intervals; i++) {
|
|
5175
|
-
positions.push(
|
|
5146
|
+
positions.push(size2 - 7 - (intervals - i) * step);
|
|
5176
5147
|
}
|
|
5177
|
-
return
|
|
5178
|
-
}
|
|
5179
|
-
|
|
5148
|
+
return positions.sort((a, b) => a - b);
|
|
5149
|
+
}
|
|
5150
|
+
// 添加单个定位图案(5x5)
|
|
5151
|
+
static addAlignmentPattern(matrix2, row, col) {
|
|
5180
5152
|
for (let r = -2; r <= 2; r++) {
|
|
5181
5153
|
for (let c = -2; c <= 2; c++) {
|
|
5182
|
-
|
|
5154
|
+
const tr = row + r;
|
|
5155
|
+
const tc = col + c;
|
|
5156
|
+
if (tr >= 0 && tr < matrix2.length && tc >= 0 && tc < matrix2.length) {
|
|
5183
5157
|
if (Math.abs(r) === 2 || Math.abs(c) === 2 || r === 0 && c === 0) {
|
|
5184
|
-
matrix2[
|
|
5158
|
+
matrix2[tr][tc] = 1;
|
|
5185
5159
|
} else {
|
|
5186
|
-
matrix2[
|
|
5160
|
+
matrix2[tr][tc] = 0;
|
|
5187
5161
|
}
|
|
5188
5162
|
}
|
|
5189
5163
|
}
|
|
5190
5164
|
}
|
|
5191
|
-
}
|
|
5192
|
-
|
|
5193
|
-
|
|
5194
|
-
|
|
5195
|
-
if (matrix2[
|
|
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
|
+
}
|
|
5196
5175
|
}
|
|
5197
|
-
}
|
|
5198
|
-
|
|
5176
|
+
}
|
|
5177
|
+
// 保留格式信息区域
|
|
5178
|
+
static reserveFormatArea(matrix2, size2) {
|
|
5199
5179
|
for (let i = 0; i < 9; i++) {
|
|
5200
5180
|
if (matrix2[8] && matrix2[8][i] === -1) matrix2[8][i] = 0;
|
|
5201
5181
|
if (matrix2[i] && matrix2[i][8] === -1) matrix2[i][8] = 0;
|
|
5202
5182
|
}
|
|
5203
5183
|
for (let i = 0; i < 8; i++) {
|
|
5204
|
-
if (matrix2[8] && matrix2[8][
|
|
5205
|
-
if (matrix2[
|
|
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;
|
|
5206
5186
|
}
|
|
5207
|
-
}
|
|
5208
|
-
|
|
5209
|
-
|
|
5187
|
+
}
|
|
5188
|
+
// 编码数据
|
|
5189
|
+
static encodeData(data, version, ecl) {
|
|
5190
|
+
const bits = [];
|
|
5191
|
+
bits.push(0, 1, 0, 0);
|
|
5192
|
+
const cciBits = version <= 9 ? 8 : 16;
|
|
5193
|
+
const len = data.length;
|
|
5194
|
+
for (let i = cciBits - 1; i >= 0; i--) {
|
|
5195
|
+
bits.push(len >> i & 1);
|
|
5196
|
+
}
|
|
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);
|
|
5201
|
+
}
|
|
5202
|
+
}
|
|
5203
|
+
const terminatorLength = Math.min(4, this.getDataCapacity(version) * 8 - bits.length);
|
|
5204
|
+
for (let i = 0; i < terminatorLength; i++) {
|
|
5205
|
+
bits.push(0);
|
|
5206
|
+
}
|
|
5207
|
+
while (bits.length % 8 !== 0) {
|
|
5208
|
+
bits.push(0);
|
|
5209
|
+
}
|
|
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);
|
|
5214
|
+
}
|
|
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];
|
|
5220
|
+
}
|
|
5221
|
+
bytes.push(byte);
|
|
5222
|
+
}
|
|
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) {
|
|
5210
5266
|
let bitIndex = 0;
|
|
5211
5267
|
let upward = true;
|
|
5212
|
-
for (let col =
|
|
5268
|
+
for (let col = size2 - 1; col >= 1; col -= 2) {
|
|
5213
5269
|
if (col === 6) col = 5;
|
|
5214
|
-
for (let row = upward ?
|
|
5270
|
+
for (let row = upward ? size2 - 1 : 0; upward ? row >= 0 : row < size2; upward ? row-- : row++) {
|
|
5215
5271
|
for (let c = 0; c < 2; c++) {
|
|
5216
5272
|
const currentCol = col - c;
|
|
5217
5273
|
if (matrix2[row] && matrix2[row][currentCol] === -1) {
|
|
5218
|
-
|
|
5274
|
+
let bit = 0;
|
|
5275
|
+
if (bitIndex < data.length * 8) {
|
|
5276
|
+
bit = data[Math.floor(bitIndex / 8)] >> 7 - bitIndex % 8 & 1;
|
|
5277
|
+
}
|
|
5219
5278
|
matrix2[row][currentCol] = bit;
|
|
5220
5279
|
bitIndex++;
|
|
5221
5280
|
}
|
|
@@ -5223,27 +5282,148 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
|
|
|
5223
5282
|
}
|
|
5224
5283
|
upward = !upward;
|
|
5225
5284
|
}
|
|
5226
|
-
}
|
|
5227
|
-
|
|
5228
|
-
|
|
5229
|
-
|
|
5230
|
-
|
|
5231
|
-
|
|
5232
|
-
|
|
5285
|
+
}
|
|
5286
|
+
// 应用掩码
|
|
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;
|
|
5293
|
+
}
|
|
5294
|
+
}
|
|
5295
|
+
}
|
|
5233
5296
|
}
|
|
5234
|
-
|
|
5235
|
-
|
|
5297
|
+
}
|
|
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;
|
|
5236
5328
|
}
|
|
5237
|
-
bytes.push(0, 0, 0, 0);
|
|
5238
|
-
return bytes;
|
|
5239
5329
|
}
|
|
5240
|
-
|
|
5330
|
+
// 添加格式信息
|
|
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];
|
|
5355
|
+
}
|
|
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
|
+
}
|
|
5371
|
+
}
|
|
5372
|
+
return data << 10 | d;
|
|
5373
|
+
}
|
|
5374
|
+
}
|
|
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", [
|
|
5384
|
+
0,
|
|
5385
|
+
17,
|
|
5386
|
+
32,
|
|
5387
|
+
53,
|
|
5388
|
+
78,
|
|
5389
|
+
106,
|
|
5390
|
+
134,
|
|
5391
|
+
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
|
|
5415
|
+
]);
|
|
5241
5416
|
const generateQRCode = () => {
|
|
5242
5417
|
if (!props.value) {
|
|
5243
5418
|
matrix.value = [];
|
|
5244
5419
|
return;
|
|
5245
5420
|
}
|
|
5246
|
-
|
|
5421
|
+
try {
|
|
5422
|
+
matrix.value = QRCodeGenerator.generate(props.value, props.errorCorrectLevel);
|
|
5423
|
+
} catch (e) {
|
|
5424
|
+
console.error("QR Code generation failed:", e);
|
|
5425
|
+
matrix.value = [];
|
|
5426
|
+
}
|
|
5247
5427
|
};
|
|
5248
5428
|
vue.watch(() => props.value, generateQRCode);
|
|
5249
5429
|
vue.watch(() => props.errorCorrectLevel, generateQRCode);
|
|
@@ -5251,10 +5431,7 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
|
|
|
5251
5431
|
generateQRCode();
|
|
5252
5432
|
});
|
|
5253
5433
|
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
|
-
}, [
|
|
5434
|
+
return vue.openBlock(), vue.createElementBlock("view", _hoisted_1$1, [
|
|
5258
5435
|
matrix.value.length > 0 ? (vue.openBlock(), vue.createElementBlock("view", {
|
|
5259
5436
|
key: 0,
|
|
5260
5437
|
class: "u-qrcode__matrix",
|
|
@@ -5263,28 +5440,23 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
|
|
|
5263
5440
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(matrix.value, (row, rowIndex) => {
|
|
5264
5441
|
return vue.openBlock(), vue.createElementBlock("view", {
|
|
5265
5442
|
key: rowIndex,
|
|
5266
|
-
class: "u-qrcode__row"
|
|
5267
|
-
style: vue.normalizeStyle({ height: `${cellSize.value}px` })
|
|
5443
|
+
class: "u-qrcode__row"
|
|
5268
5444
|
}, [
|
|
5269
5445
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(row, (cell, colIndex) => {
|
|
5270
5446
|
return vue.openBlock(), vue.createElementBlock("view", {
|
|
5271
5447
|
key: colIndex,
|
|
5272
5448
|
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
|
-
})
|
|
5449
|
+
style: vue.normalizeStyle(cellStyle(cell))
|
|
5278
5450
|
}, null, 4);
|
|
5279
5451
|
}), 128))
|
|
5280
|
-
]
|
|
5452
|
+
]);
|
|
5281
5453
|
}), 128))
|
|
5282
5454
|
], 4)) : vue.createCommentVNode("", true)
|
|
5283
|
-
]
|
|
5455
|
+
]);
|
|
5284
5456
|
};
|
|
5285
5457
|
}
|
|
5286
5458
|
});
|
|
5287
|
-
const uQrcode = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-
|
|
5459
|
+
const uQrcode = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-3f660ab3"]]);
|
|
5288
5460
|
const _hoisted_1 = { class: "u-barcode" };
|
|
5289
5461
|
const _hoisted_2 = ["canvas-id"];
|
|
5290
5462
|
const _hoisted_3 = ["src"];
|