@hlw-uni/mp-vue 1.1.1 → 1.1.3
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/README.md +82 -0
- package/dist/index.js +185 -172
- package/dist/index.mjs +186 -173
- package/dist/style.css +87 -59
- package/package.json +1 -1
- package/src/components/hlw-modal/index.vue +14 -34
- package/src/components/hlw-page/index.vue +5 -1
- package/src/components/hlw-popup/index.vue +40 -17
- package/src/components/hlw-tag/index.vue +27 -3
package/dist/index.js
CHANGED
|
@@ -33,12 +33,12 @@
|
|
|
33
33
|
};
|
|
34
34
|
}
|
|
35
35
|
});
|
|
36
|
-
const _hoisted_1$
|
|
36
|
+
const _hoisted_1$g = ["src"];
|
|
37
37
|
const _hoisted_2$d = {
|
|
38
38
|
key: 1,
|
|
39
39
|
class: "hlw-avatar__placeholder"
|
|
40
40
|
};
|
|
41
|
-
const _hoisted_3$
|
|
41
|
+
const _hoisted_3$7 = { class: "hlw-avatar__initial" };
|
|
42
42
|
const _sfc_main$g = /* @__PURE__ */ vue.defineComponent({
|
|
43
43
|
__name: "index",
|
|
44
44
|
props: {
|
|
@@ -64,8 +64,8 @@
|
|
|
64
64
|
src: __props.src,
|
|
65
65
|
mode: "aspectFill",
|
|
66
66
|
onError: _cache[0] || (_cache[0] = ($event) => loadError.value = true)
|
|
67
|
-
}, null, 40, _hoisted_1$
|
|
68
|
-
vue.createElementVNode("text", _hoisted_3$
|
|
67
|
+
}, null, 40, _hoisted_1$g)) : (vue.openBlock(), vue.createElementBlock("view", _hoisted_2$d, [
|
|
68
|
+
vue.createElementVNode("text", _hoisted_3$7, vue.toDisplayString(initial.value), 1)
|
|
69
69
|
]))
|
|
70
70
|
], 2);
|
|
71
71
|
};
|
|
@@ -79,7 +79,7 @@
|
|
|
79
79
|
return target;
|
|
80
80
|
};
|
|
81
81
|
const index$g = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["__scopeId", "data-v-19006b2d"]]);
|
|
82
|
-
const _hoisted_1$
|
|
82
|
+
const _hoisted_1$f = ["disabled", "open-type"];
|
|
83
83
|
const _hoisted_2$c = {
|
|
84
84
|
key: 0,
|
|
85
85
|
class: "hlw-btn-spinner"
|
|
@@ -114,17 +114,17 @@
|
|
|
114
114
|
class: vue.normalizeClass([__props.icon, "hlw-btn-icon"])
|
|
115
115
|
}, null, 2)) : vue.createCommentVNode("", true),
|
|
116
116
|
vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
117
|
-
], 42, _hoisted_1$
|
|
117
|
+
], 42, _hoisted_1$f);
|
|
118
118
|
};
|
|
119
119
|
}
|
|
120
120
|
});
|
|
121
121
|
const index$f = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["__scopeId", "data-v-19a9c118"]]);
|
|
122
|
-
const _hoisted_1$
|
|
122
|
+
const _hoisted_1$e = {
|
|
123
123
|
key: 0,
|
|
124
124
|
class: "hlw-card-header"
|
|
125
125
|
};
|
|
126
126
|
const _hoisted_2$b = { class: "hlw-card-header-inner" };
|
|
127
|
-
const _hoisted_3$
|
|
127
|
+
const _hoisted_3$6 = { class: "hlw-card-header-left" };
|
|
128
128
|
const _hoisted_4$4 = {
|
|
129
129
|
key: 0,
|
|
130
130
|
class: "hlw-card-title"
|
|
@@ -182,10 +182,10 @@
|
|
|
182
182
|
__props.border ? "hlw-card--bordered" : ""
|
|
183
183
|
]])
|
|
184
184
|
}, [
|
|
185
|
-
hasHeader.value ? (vue.openBlock(), vue.createElementBlock("view", _hoisted_1$
|
|
185
|
+
hasHeader.value ? (vue.openBlock(), vue.createElementBlock("view", _hoisted_1$e, [
|
|
186
186
|
vue.renderSlot(_ctx.$slots, "header", {}, () => [
|
|
187
187
|
vue.createElementVNode("view", _hoisted_2$b, [
|
|
188
|
-
vue.createElementVNode("view", _hoisted_3$
|
|
188
|
+
vue.createElementVNode("view", _hoisted_3$6, [
|
|
189
189
|
vue.renderSlot(_ctx.$slots, "header-left", {}, () => [
|
|
190
190
|
__props.title ? (vue.openBlock(), vue.createElementBlock("text", _hoisted_4$4, vue.toDisplayString(__props.title), 1)) : vue.createCommentVNode("", true)
|
|
191
191
|
], true)
|
|
@@ -221,12 +221,12 @@
|
|
|
221
221
|
}
|
|
222
222
|
});
|
|
223
223
|
const index$e = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["__scopeId", "data-v-cf55252e"]]);
|
|
224
|
-
const _hoisted_1$
|
|
224
|
+
const _hoisted_1$d = {
|
|
225
225
|
key: 0,
|
|
226
226
|
class: "hlw-cell-icon"
|
|
227
227
|
};
|
|
228
228
|
const _hoisted_2$a = { class: "hlw-cell-body" };
|
|
229
|
-
const _hoisted_3$
|
|
229
|
+
const _hoisted_3$5 = { class: "hlw-cell-title" };
|
|
230
230
|
const _hoisted_4$3 = {
|
|
231
231
|
key: 0,
|
|
232
232
|
class: "hlw-cell-label"
|
|
@@ -270,7 +270,7 @@
|
|
|
270
270
|
"hover-class": "hlw-cell--hover"
|
|
271
271
|
}, {
|
|
272
272
|
default: vue.withCtx(() => [
|
|
273
|
-
__props.icon || _ctx.$slots.icon ? (vue.openBlock(), vue.createElementBlock("view", _hoisted_1$
|
|
273
|
+
__props.icon || _ctx.$slots.icon ? (vue.openBlock(), vue.createElementBlock("view", _hoisted_1$d, [
|
|
274
274
|
vue.renderSlot(_ctx.$slots, "icon", {}, () => [
|
|
275
275
|
vue.createElementVNode("view", {
|
|
276
276
|
class: vue.normalizeClass(__props.icon)
|
|
@@ -278,7 +278,7 @@
|
|
|
278
278
|
], true)
|
|
279
279
|
])) : vue.createCommentVNode("", true),
|
|
280
280
|
vue.createElementVNode("view", _hoisted_2$a, [
|
|
281
|
-
vue.createElementVNode("view", _hoisted_3$
|
|
281
|
+
vue.createElementVNode("view", _hoisted_3$5, [
|
|
282
282
|
vue.renderSlot(_ctx.$slots, "title", {}, () => [
|
|
283
283
|
vue.createTextVNode(vue.toDisplayString(__props.title), 1)
|
|
284
284
|
], true),
|
|
@@ -326,7 +326,7 @@
|
|
|
326
326
|
}
|
|
327
327
|
});
|
|
328
328
|
const index$d = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["__scopeId", "data-v-996053be"]]);
|
|
329
|
-
const _hoisted_1$
|
|
329
|
+
const _hoisted_1$c = {
|
|
330
330
|
key: 0,
|
|
331
331
|
class: "hlw-divider-text"
|
|
332
332
|
};
|
|
@@ -343,7 +343,7 @@
|
|
|
343
343
|
class: vue.normalizeClass(["hlw-divider", [`hlw-divider--${__props.position}`, { "hlw-divider--dashed": __props.dashed }]])
|
|
344
344
|
}, [
|
|
345
345
|
_cache[0] || (_cache[0] = vue.createElementVNode("view", { class: "hlw-divider-line" }, null, -1)),
|
|
346
|
-
__props.text || _ctx.$slots.default ? (vue.openBlock(), vue.createElementBlock("view", _hoisted_1$
|
|
346
|
+
__props.text || _ctx.$slots.default ? (vue.openBlock(), vue.createElementBlock("view", _hoisted_1$c, [
|
|
347
347
|
vue.renderSlot(_ctx.$slots, "default", {}, () => [
|
|
348
348
|
vue.createTextVNode(vue.toDisplayString(__props.text), 1)
|
|
349
349
|
], true)
|
|
@@ -354,9 +354,9 @@
|
|
|
354
354
|
}
|
|
355
355
|
});
|
|
356
356
|
const index$c = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["__scopeId", "data-v-beaa0298"]]);
|
|
357
|
-
const _hoisted_1$
|
|
357
|
+
const _hoisted_1$b = { class: "hlw-empty" };
|
|
358
358
|
const _hoisted_2$9 = ["src"];
|
|
359
|
-
const _hoisted_3$
|
|
359
|
+
const _hoisted_3$4 = {
|
|
360
360
|
key: 1,
|
|
361
361
|
class: "hlw-empty__icon i-fa6-solid-box-open"
|
|
362
362
|
};
|
|
@@ -369,13 +369,13 @@
|
|
|
369
369
|
},
|
|
370
370
|
setup(__props) {
|
|
371
371
|
return (_ctx, _cache) => {
|
|
372
|
-
return vue.openBlock(), vue.createElementBlock("view", _hoisted_1$
|
|
372
|
+
return vue.openBlock(), vue.createElementBlock("view", _hoisted_1$b, [
|
|
373
373
|
__props.image ? (vue.openBlock(), vue.createElementBlock("image", {
|
|
374
374
|
key: 0,
|
|
375
375
|
class: "hlw-empty__image",
|
|
376
376
|
src: __props.image,
|
|
377
377
|
mode: "aspectFit"
|
|
378
|
-
}, null, 8, _hoisted_2$9)) : (vue.openBlock(), vue.createElementBlock("view", _hoisted_3$
|
|
378
|
+
}, null, 8, _hoisted_2$9)) : (vue.openBlock(), vue.createElementBlock("view", _hoisted_3$4)),
|
|
379
379
|
vue.createElementVNode("text", _hoisted_4$2, vue.toDisplayString(__props.text || "暂无数据"), 1),
|
|
380
380
|
vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
381
381
|
]);
|
|
@@ -383,7 +383,7 @@
|
|
|
383
383
|
}
|
|
384
384
|
});
|
|
385
385
|
const index$b = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["__scopeId", "data-v-94fefc47"]]);
|
|
386
|
-
const _hoisted_1$
|
|
386
|
+
const _hoisted_1$a = {
|
|
387
387
|
key: 0,
|
|
388
388
|
class: "header-placeholder"
|
|
389
389
|
};
|
|
@@ -478,7 +478,7 @@
|
|
|
478
478
|
}, vue.toDisplayString(props.title), 5)
|
|
479
479
|
], true)
|
|
480
480
|
], 2),
|
|
481
|
-
props.titleAlign === "center" ? (vue.openBlock(), vue.createElementBlock("view", _hoisted_1$
|
|
481
|
+
props.titleAlign === "center" ? (vue.openBlock(), vue.createElementBlock("view", _hoisted_1$a)) : vue.createCommentVNode("", true)
|
|
482
482
|
], 64)) : vue.renderSlot(_ctx.$slots, "default", { key: 1 }, () => [
|
|
483
483
|
props.title ? (vue.openBlock(), vue.createElementBlock("view", _hoisted_2$8, [
|
|
484
484
|
vue.createElementVNode("text", {
|
|
@@ -493,7 +493,7 @@
|
|
|
493
493
|
}
|
|
494
494
|
});
|
|
495
495
|
const index$a = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["__scopeId", "data-v-b85e90ac"]]);
|
|
496
|
-
const _hoisted_1$
|
|
496
|
+
const _hoisted_1$9 = { class: "hlw-loading" };
|
|
497
497
|
const _hoisted_2$7 = {
|
|
498
498
|
key: 0,
|
|
499
499
|
class: "hlw-loading__text"
|
|
@@ -505,7 +505,7 @@
|
|
|
505
505
|
},
|
|
506
506
|
setup(__props) {
|
|
507
507
|
return (_ctx, _cache) => {
|
|
508
|
-
return vue.openBlock(), vue.createElementBlock("view", _hoisted_1$
|
|
508
|
+
return vue.openBlock(), vue.createElementBlock("view", _hoisted_1$9, [
|
|
509
509
|
_cache[0] || (_cache[0] = vue.createElementVNode("view", { class: "hlw-loading__spinner" }, null, -1)),
|
|
510
510
|
__props.text ? (vue.openBlock(), vue.createElementBlock("text", _hoisted_2$7, vue.toDisplayString(__props.text), 1)) : vue.createCommentVNode("", true)
|
|
511
511
|
]);
|
|
@@ -513,7 +513,7 @@
|
|
|
513
513
|
}
|
|
514
514
|
});
|
|
515
515
|
const index$9 = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["__scopeId", "data-v-fd9272d5"]]);
|
|
516
|
-
const _hoisted_1$
|
|
516
|
+
const _hoisted_1$8 = {
|
|
517
517
|
key: 0,
|
|
518
518
|
class: "hlw-menu-title"
|
|
519
519
|
};
|
|
@@ -521,7 +521,7 @@
|
|
|
521
521
|
key: 1,
|
|
522
522
|
class: "hlw-menu-title-divider"
|
|
523
523
|
};
|
|
524
|
-
const _hoisted_3$
|
|
524
|
+
const _hoisted_3$3 = { class: "hlw-menu-left" };
|
|
525
525
|
const _hoisted_4$1 = { class: "hlw-menu-label" };
|
|
526
526
|
const _hoisted_5 = { class: "hlw-menu-right" };
|
|
527
527
|
const _hoisted_6 = {
|
|
@@ -571,7 +571,7 @@
|
|
|
571
571
|
return vue.openBlock(), vue.createElementBlock("view", {
|
|
572
572
|
class: vue.normalizeClass(["hlw-menu", { "hlw-menu--no-border": !props.border }])
|
|
573
573
|
}, [
|
|
574
|
-
props.title ? (vue.openBlock(), vue.createElementBlock("view", _hoisted_1$
|
|
574
|
+
props.title ? (vue.openBlock(), vue.createElementBlock("view", _hoisted_1$8, [
|
|
575
575
|
vue.createElementVNode("text", null, vue.toDisplayString(props.title), 1)
|
|
576
576
|
])) : vue.createCommentVNode("", true),
|
|
577
577
|
props.title ? (vue.openBlock(), vue.createElementBlock("view", _hoisted_2$6)) : vue.createCommentVNode("", true),
|
|
@@ -584,7 +584,7 @@
|
|
|
584
584
|
"hover-class": "hlw-menu-item--active"
|
|
585
585
|
}, {
|
|
586
586
|
default: vue.withCtx(() => [
|
|
587
|
-
vue.createElementVNode("view", _hoisted_3$
|
|
587
|
+
vue.createElementVNode("view", _hoisted_3$3, [
|
|
588
588
|
vue.createElementVNode("view", {
|
|
589
589
|
class: vue.normalizeClass(["hlw-menu-icon", `hlw-menu-icon--${item.iconTheme || "slate"}`])
|
|
590
590
|
}, [
|
|
@@ -691,12 +691,12 @@
|
|
|
691
691
|
}
|
|
692
692
|
});
|
|
693
693
|
const index$8 = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["__scopeId", "data-v-2d7cd322"]]);
|
|
694
|
-
const _hoisted_1$
|
|
694
|
+
const _hoisted_1$7 = {
|
|
695
695
|
key: 0,
|
|
696
696
|
class: "hlw-modal-title"
|
|
697
697
|
};
|
|
698
698
|
const _hoisted_2$5 = { class: "hlw-modal-body" };
|
|
699
|
-
const _hoisted_3$
|
|
699
|
+
const _hoisted_3$2 = { class: "hlw-modal-footer" };
|
|
700
700
|
const _sfc_main$7 = /* @__PURE__ */ vue.defineComponent({
|
|
701
701
|
__name: "index",
|
|
702
702
|
props: {
|
|
@@ -709,11 +709,14 @@
|
|
|
709
709
|
},
|
|
710
710
|
emits: ["update:show", "confirm", "cancel"],
|
|
711
711
|
setup(__props, { emit: __emit }) {
|
|
712
|
+
const props = __props;
|
|
712
713
|
const emit = __emit;
|
|
713
714
|
function close() {
|
|
714
715
|
emit("update:show", false);
|
|
715
716
|
}
|
|
716
717
|
function onMask() {
|
|
718
|
+
if (!props.closeOnMask)
|
|
719
|
+
return;
|
|
717
720
|
close();
|
|
718
721
|
}
|
|
719
722
|
function onConfirm() {
|
|
@@ -731,37 +734,39 @@
|
|
|
731
734
|
onTap: vue.withModifiers(onMask, ["self"])
|
|
732
735
|
}, [
|
|
733
736
|
vue.createElementVNode("view", {
|
|
734
|
-
class: vue.normalizeClass(["hlw-modal", { "hlw-modal--show": __props.show }])
|
|
737
|
+
class: vue.normalizeClass(["hlw-modal", { "hlw-modal--show": __props.show }]),
|
|
738
|
+
onTap: _cache[0] || (_cache[0] = vue.withModifiers(() => {
|
|
739
|
+
}, ["stop"]))
|
|
735
740
|
}, [
|
|
736
|
-
__props.title ? (vue.openBlock(), vue.createElementBlock("view", _hoisted_1$
|
|
741
|
+
__props.title ? (vue.openBlock(), vue.createElementBlock("view", _hoisted_1$7, vue.toDisplayString(__props.title), 1)) : vue.createCommentVNode("", true),
|
|
737
742
|
vue.createElementVNode("view", _hoisted_2$5, [
|
|
738
743
|
vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
739
744
|
]),
|
|
740
745
|
vue.renderSlot(_ctx.$slots, "footer", {}, () => [
|
|
741
|
-
vue.createElementVNode("view", _hoisted_3$
|
|
746
|
+
vue.createElementVNode("view", _hoisted_3$2, [
|
|
742
747
|
__props.showCancel ? (vue.openBlock(), vue.createElementBlock("view", {
|
|
743
748
|
key: 0,
|
|
744
749
|
class: "hlw-modal-btn hlw-modal-btn--cancel",
|
|
745
|
-
onTap: onCancel
|
|
750
|
+
onTap: vue.withModifiers(onCancel, ["stop"])
|
|
746
751
|
}, vue.toDisplayString(__props.cancelText), 33)) : vue.createCommentVNode("", true),
|
|
747
752
|
vue.createElementVNode("view", {
|
|
748
753
|
class: "hlw-modal-btn hlw-modal-btn--confirm",
|
|
749
|
-
onTap: onConfirm
|
|
754
|
+
onTap: vue.withModifiers(onConfirm, ["stop"])
|
|
750
755
|
}, vue.toDisplayString(__props.confirmText), 33)
|
|
751
756
|
])
|
|
752
757
|
], true)
|
|
753
|
-
],
|
|
758
|
+
], 34)
|
|
754
759
|
], 32)) : vue.createCommentVNode("", true);
|
|
755
760
|
};
|
|
756
761
|
}
|
|
757
762
|
});
|
|
758
|
-
const index$7 = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["__scopeId", "data-v-
|
|
759
|
-
const _hoisted_1$
|
|
763
|
+
const index$7 = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["__scopeId", "data-v-91d9e108"]]);
|
|
764
|
+
const _hoisted_1$6 = {
|
|
760
765
|
key: 1,
|
|
761
766
|
class: "hlw-notice-left-icon i-fa6-solid-bullhorn"
|
|
762
767
|
};
|
|
763
768
|
const _hoisted_2$4 = { class: "hlw-notice-text" };
|
|
764
|
-
const _hoisted_3$
|
|
769
|
+
const _hoisted_3$1 = {
|
|
765
770
|
key: 1,
|
|
766
771
|
class: "hlw-notice-text hlw-notice-text--ellipsis"
|
|
767
772
|
};
|
|
@@ -794,7 +799,7 @@
|
|
|
794
799
|
__props.leftIcon ? (vue.openBlock(), vue.createElementBlock("view", {
|
|
795
800
|
key: 0,
|
|
796
801
|
class: vue.normalizeClass([__props.leftIcon, "hlw-notice-left-icon"])
|
|
797
|
-
}, null, 2)) : (vue.openBlock(), vue.createElementBlock("view", _hoisted_1$
|
|
802
|
+
}, null, 2)) : (vue.openBlock(), vue.createElementBlock("view", _hoisted_1$6)),
|
|
798
803
|
vue.createElementVNode("view", {
|
|
799
804
|
class: "hlw-notice-wrap",
|
|
800
805
|
onTap: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("click"))
|
|
@@ -805,7 +810,7 @@
|
|
|
805
810
|
style: vue.normalizeStyle(animStyle.value)
|
|
806
811
|
}, [
|
|
807
812
|
vue.createElementVNode("text", _hoisted_2$4, vue.toDisplayString(__props.text), 1)
|
|
808
|
-
], 4)) : (vue.openBlock(), vue.createElementBlock("text", _hoisted_3$
|
|
813
|
+
], 4)) : (vue.openBlock(), vue.createElementBlock("text", _hoisted_3$1, vue.toDisplayString(__props.text), 1))
|
|
809
814
|
], 32),
|
|
810
815
|
__props.closable ? (vue.openBlock(), vue.createElementBlock("view", {
|
|
811
816
|
key: 2,
|
|
@@ -817,9 +822,111 @@
|
|
|
817
822
|
}
|
|
818
823
|
});
|
|
819
824
|
const index$6 = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__scopeId", "data-v-7a758299"]]);
|
|
820
|
-
const
|
|
821
|
-
const
|
|
822
|
-
|
|
825
|
+
const FONT_SCALE_KEY = "hlw_font_scale";
|
|
826
|
+
const FONT_PRESETS = {
|
|
827
|
+
small: {
|
|
828
|
+
label: "小字体",
|
|
829
|
+
vars: {
|
|
830
|
+
"--font-xs": "16rpx",
|
|
831
|
+
"--font-sm": "20rpx",
|
|
832
|
+
"--font-base": "24rpx",
|
|
833
|
+
"--font-md": "28rpx",
|
|
834
|
+
"--font-lg": "32rpx",
|
|
835
|
+
"--font-xl": "36rpx"
|
|
836
|
+
}
|
|
837
|
+
},
|
|
838
|
+
normal: {
|
|
839
|
+
label: "标准",
|
|
840
|
+
vars: {
|
|
841
|
+
"--font-xs": "20rpx",
|
|
842
|
+
"--font-sm": "24rpx",
|
|
843
|
+
"--font-base": "28rpx",
|
|
844
|
+
"--font-md": "32rpx",
|
|
845
|
+
"--font-lg": "36rpx",
|
|
846
|
+
"--font-xl": "40rpx"
|
|
847
|
+
}
|
|
848
|
+
},
|
|
849
|
+
large: {
|
|
850
|
+
label: "大字体",
|
|
851
|
+
vars: {
|
|
852
|
+
"--font-xs": "24rpx",
|
|
853
|
+
"--font-sm": "30rpx",
|
|
854
|
+
"--font-base": "34rpx",
|
|
855
|
+
"--font-md": "40rpx",
|
|
856
|
+
"--font-lg": "46rpx",
|
|
857
|
+
"--font-xl": "52rpx"
|
|
858
|
+
}
|
|
859
|
+
},
|
|
860
|
+
xlarge: {
|
|
861
|
+
label: "超大字体",
|
|
862
|
+
vars: {
|
|
863
|
+
"--font-xs": "28rpx",
|
|
864
|
+
"--font-sm": "36rpx",
|
|
865
|
+
"--font-base": "42rpx",
|
|
866
|
+
"--font-md": "48rpx",
|
|
867
|
+
"--font-lg": "56rpx",
|
|
868
|
+
"--font-xl": "64rpx"
|
|
869
|
+
}
|
|
870
|
+
}
|
|
871
|
+
};
|
|
872
|
+
function getCurrentFontScale() {
|
|
873
|
+
try {
|
|
874
|
+
const v = uni.getStorageSync(FONT_SCALE_KEY);
|
|
875
|
+
if (v === "small" || v === "large" || v === "xlarge")
|
|
876
|
+
return v;
|
|
877
|
+
} catch {
|
|
878
|
+
}
|
|
879
|
+
return "normal";
|
|
880
|
+
}
|
|
881
|
+
function getCurrentFontVars() {
|
|
882
|
+
return FONT_PRESETS[getCurrentFontScale()].vars;
|
|
883
|
+
}
|
|
884
|
+
const { hexToRgba, darkenHex } = mpCore.useColor();
|
|
885
|
+
const THEME_COLOR_KEY = "hlw_theme_color";
|
|
886
|
+
const DEFAULT_THEMES = [
|
|
887
|
+
{ label: "默认蓝", value: "#3b82f6" },
|
|
888
|
+
{ label: "活力橙", value: "#f97316" },
|
|
889
|
+
{ label: "翡翠绿", value: "#10b981" },
|
|
890
|
+
{ label: "玫瑰红", value: "#f43f5e" },
|
|
891
|
+
{ label: "紫罗兰", value: "#8b5cf6" },
|
|
892
|
+
{ label: "青石灰", value: "#64748b" }
|
|
893
|
+
];
|
|
894
|
+
function getCurrentThemeColor() {
|
|
895
|
+
try {
|
|
896
|
+
const v = uni.getStorageSync(THEME_COLOR_KEY);
|
|
897
|
+
if (v && typeof v === "string")
|
|
898
|
+
return v;
|
|
899
|
+
} catch {
|
|
900
|
+
}
|
|
901
|
+
return DEFAULT_THEMES[0].value;
|
|
902
|
+
}
|
|
903
|
+
function getCurrentThemeVars() {
|
|
904
|
+
const color = getCurrentThemeColor();
|
|
905
|
+
return {
|
|
906
|
+
"--primary-color": color,
|
|
907
|
+
"--primary-light": hexToRgba(color, 0.12),
|
|
908
|
+
"--primary-dark": darkenHex(color)
|
|
909
|
+
};
|
|
910
|
+
}
|
|
911
|
+
const { varsToStyle } = mpCore.useColor();
|
|
912
|
+
const THEME_CHANGE_EVENT = "hlw:theme-change";
|
|
913
|
+
function buildThemeStyle() {
|
|
914
|
+
return varsToStyle({
|
|
915
|
+
...getCurrentFontVars(),
|
|
916
|
+
...getCurrentThemeVars()
|
|
917
|
+
});
|
|
918
|
+
}
|
|
919
|
+
function useThemePageStyle() {
|
|
920
|
+
const themePageStyle = vue.ref(buildThemeStyle());
|
|
921
|
+
const onThemeChange = () => {
|
|
922
|
+
themePageStyle.value = buildThemeStyle();
|
|
923
|
+
};
|
|
924
|
+
vue.onMounted(() => uni.$on(THEME_CHANGE_EVENT, onThemeChange));
|
|
925
|
+
vue.onUnmounted(() => uni.$off(THEME_CHANGE_EVENT, onThemeChange));
|
|
926
|
+
return { themePageStyle };
|
|
927
|
+
}
|
|
928
|
+
const _hoisted_1$5 = { class: "hlw-page-header" };
|
|
929
|
+
const _hoisted_2$3 = { class: "hlw-page-footer" };
|
|
823
930
|
const _sfc_main$5 = /* @__PURE__ */ vue.defineComponent({
|
|
824
931
|
__name: "index",
|
|
825
932
|
props: {
|
|
@@ -829,11 +936,15 @@
|
|
|
829
936
|
},
|
|
830
937
|
setup(__props) {
|
|
831
938
|
const props = __props;
|
|
939
|
+
const { themePageStyle } = useThemePageStyle();
|
|
832
940
|
return (_ctx, _cache) => {
|
|
833
941
|
const _component_hlw_header = vue.resolveComponent("hlw-header");
|
|
834
942
|
const _component_scroll_view = vue.resolveComponent("scroll-view");
|
|
835
|
-
return vue.openBlock(), vue.createElementBlock("view",
|
|
836
|
-
|
|
943
|
+
return vue.openBlock(), vue.createElementBlock("view", {
|
|
944
|
+
class: "hlw-page",
|
|
945
|
+
style: vue.normalizeStyle(vue.unref(themePageStyle))
|
|
946
|
+
}, [
|
|
947
|
+
vue.createElementVNode("view", _hoisted_1$5, [
|
|
837
948
|
vue.renderSlot(_ctx.$slots, "header", {}, () => [
|
|
838
949
|
props.title || props.isBack ? (vue.openBlock(), vue.createBlock(_component_hlw_header, {
|
|
839
950
|
key: 0,
|
|
@@ -848,22 +959,23 @@
|
|
|
848
959
|
"scroll-y": true,
|
|
849
960
|
"enable-flex": true,
|
|
850
961
|
enhanced: true,
|
|
851
|
-
"show-scrollbar": false
|
|
962
|
+
"show-scrollbar": false,
|
|
963
|
+
style: vue.normalizeStyle(vue.unref(themePageStyle))
|
|
852
964
|
}, {
|
|
853
965
|
default: vue.withCtx(() => [
|
|
854
966
|
vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
855
967
|
]),
|
|
856
968
|
_: 3
|
|
857
|
-
}),
|
|
858
|
-
vue.createElementVNode("view",
|
|
969
|
+
}, 8, ["style"]),
|
|
970
|
+
vue.createElementVNode("view", _hoisted_2$3, [
|
|
859
971
|
vue.renderSlot(_ctx.$slots, "footer", {}, void 0, true)
|
|
860
972
|
])
|
|
861
|
-
]);
|
|
973
|
+
], 4);
|
|
862
974
|
};
|
|
863
975
|
}
|
|
864
976
|
});
|
|
865
|
-
const index$5 = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-
|
|
866
|
-
const _hoisted_1$
|
|
977
|
+
const index$5 = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-01bb7796"]]);
|
|
978
|
+
const _hoisted_1$4 = {
|
|
867
979
|
key: 0,
|
|
868
980
|
class: "hlw-popup-header"
|
|
869
981
|
};
|
|
@@ -885,16 +997,17 @@
|
|
|
885
997
|
emit("close");
|
|
886
998
|
}
|
|
887
999
|
return (_ctx, _cache) => {
|
|
888
|
-
return vue.openBlock(), vue.createElementBlock(vue.Fragment,
|
|
889
|
-
|
|
890
|
-
key: 0,
|
|
1000
|
+
return __props.show ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
|
|
1001
|
+
vue.createElementVNode("view", {
|
|
891
1002
|
class: "hlw-popup-mask",
|
|
892
1003
|
onTap: vue.withModifiers(onClose, ["self"])
|
|
893
|
-
}, null, 32)
|
|
1004
|
+
}, null, 32),
|
|
894
1005
|
vue.createElementVNode("view", {
|
|
895
|
-
class: vue.normalizeClass(["hlw-popup", [`hlw-popup--${__props.position}`, { "hlw-popup--
|
|
1006
|
+
class: vue.normalizeClass(["hlw-popup", [`hlw-popup--${__props.position}`, { "hlw-popup--round": __props.round }]]),
|
|
1007
|
+
onTap: _cache[0] || (_cache[0] = vue.withModifiers(() => {
|
|
1008
|
+
}, ["stop"]))
|
|
896
1009
|
}, [
|
|
897
|
-
__props.title || __props.closable ? (vue.openBlock(), vue.createElementBlock("view", _hoisted_1$
|
|
1010
|
+
__props.title || __props.closable ? (vue.openBlock(), vue.createElementBlock("view", _hoisted_1$4, [
|
|
898
1011
|
vue.createElementVNode("text", _hoisted_2$2, vue.toDisplayString(__props.title), 1),
|
|
899
1012
|
__props.closable ? (vue.openBlock(), vue.createElementBlock("view", {
|
|
900
1013
|
key: 0,
|
|
@@ -903,13 +1016,13 @@
|
|
|
903
1016
|
}, null, 32)) : vue.createCommentVNode("", true)
|
|
904
1017
|
])) : vue.createCommentVNode("", true),
|
|
905
1018
|
vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
906
|
-
],
|
|
907
|
-
], 64);
|
|
1019
|
+
], 34)
|
|
1020
|
+
], 64)) : vue.createCommentVNode("", true);
|
|
908
1021
|
};
|
|
909
1022
|
}
|
|
910
1023
|
});
|
|
911
|
-
const index$4 = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-
|
|
912
|
-
const _hoisted_1$
|
|
1024
|
+
const index$4 = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-be12aee0"]]);
|
|
1025
|
+
const _hoisted_1$3 = ["value", "placeholder", "disabled"];
|
|
913
1026
|
const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
|
|
914
1027
|
__name: "index",
|
|
915
1028
|
props: {
|
|
@@ -951,7 +1064,7 @@
|
|
|
951
1064
|
onConfirm: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("search", __props.modelValue)),
|
|
952
1065
|
onFocus: _cache[1] || (_cache[1] = ($event) => _ctx.$emit("focus")),
|
|
953
1066
|
onBlur: _cache[2] || (_cache[2] = ($event) => _ctx.$emit("blur"))
|
|
954
|
-
}, null, 40, _hoisted_1$
|
|
1067
|
+
}, null, 40, _hoisted_1$3),
|
|
955
1068
|
__props.clearable && __props.modelValue ? (vue.openBlock(), vue.createElementBlock("view", {
|
|
956
1069
|
key: 0,
|
|
957
1070
|
class: "hlw-search-clear i-fa6-solid-xmark",
|
|
@@ -963,7 +1076,7 @@
|
|
|
963
1076
|
}
|
|
964
1077
|
});
|
|
965
1078
|
const index$3 = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-4fe1bfab"]]);
|
|
966
|
-
const _hoisted_1$
|
|
1079
|
+
const _hoisted_1$2 = { class: "hlw-skeleton-content" };
|
|
967
1080
|
const _hoisted_2$1 = {
|
|
968
1081
|
key: 0,
|
|
969
1082
|
class: "hlw-skeleton-title"
|
|
@@ -988,7 +1101,7 @@
|
|
|
988
1101
|
key: 0,
|
|
989
1102
|
class: vue.normalizeClass(["hlw-skeleton-avatar", `hlw-skeleton-avatar--${__props.avatarSize}`])
|
|
990
1103
|
}, null, 2)) : vue.createCommentVNode("", true),
|
|
991
|
-
vue.createElementVNode("view", _hoisted_1$
|
|
1104
|
+
vue.createElementVNode("view", _hoisted_1$2, [
|
|
992
1105
|
__props.title ? (vue.openBlock(), vue.createElementBlock("view", _hoisted_2$1)) : vue.createCommentVNode("", true),
|
|
993
1106
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(__props.rows, (i) => {
|
|
994
1107
|
return vue.openBlock(), vue.createElementBlock("view", {
|
|
@@ -1003,7 +1116,7 @@
|
|
|
1003
1116
|
}
|
|
1004
1117
|
});
|
|
1005
1118
|
const index$2 = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-bc3155a2"]]);
|
|
1006
|
-
const _hoisted_1 = { class: "hlw-tabs-wrap" };
|
|
1119
|
+
const _hoisted_1$1 = { class: "hlw-tabs-wrap" };
|
|
1007
1120
|
const _hoisted_2 = ["onTap"];
|
|
1008
1121
|
const _hoisted_3 = { class: "hlw-tab-text" };
|
|
1009
1122
|
const _hoisted_4 = {
|
|
@@ -1034,7 +1147,7 @@
|
|
|
1034
1147
|
"show-scrollbar": false
|
|
1035
1148
|
}, {
|
|
1036
1149
|
default: vue.withCtx(() => [
|
|
1037
|
-
vue.createElementVNode("view", _hoisted_1, [
|
|
1150
|
+
vue.createElementVNode("view", _hoisted_1$1, [
|
|
1038
1151
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(__props.items, (item, index2) => {
|
|
1039
1152
|
return vue.openBlock(), vue.createElementBlock("view", {
|
|
1040
1153
|
key: index2,
|
|
@@ -1058,6 +1171,7 @@
|
|
|
1058
1171
|
}
|
|
1059
1172
|
});
|
|
1060
1173
|
const index$1 = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-5a47c034"]]);
|
|
1174
|
+
const _hoisted_1 = { class: "hlw-tag-text" };
|
|
1061
1175
|
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
1062
1176
|
__name: "index",
|
|
1063
1177
|
props: {
|
|
@@ -1082,7 +1196,9 @@
|
|
|
1082
1196
|
style: vue.normalizeStyle(customStyle.value),
|
|
1083
1197
|
onTap: _cache[1] || (_cache[1] = ($event) => _ctx.$emit("click"))
|
|
1084
1198
|
}, [
|
|
1085
|
-
vue.
|
|
1199
|
+
vue.createElementVNode("text", _hoisted_1, [
|
|
1200
|
+
vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
1201
|
+
]),
|
|
1086
1202
|
__props.closable ? (vue.openBlock(), vue.createElementBlock("view", {
|
|
1087
1203
|
key: 0,
|
|
1088
1204
|
class: "hlw-tag-close i-fa6-solid-xmark",
|
|
@@ -1092,110 +1208,7 @@
|
|
|
1092
1208
|
};
|
|
1093
1209
|
}
|
|
1094
1210
|
});
|
|
1095
|
-
const index = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
1096
|
-
const FONT_SCALE_KEY = "hlw_font_scale";
|
|
1097
|
-
const FONT_PRESETS = {
|
|
1098
|
-
small: {
|
|
1099
|
-
label: "小字体",
|
|
1100
|
-
vars: {
|
|
1101
|
-
"--font-xs": "16rpx",
|
|
1102
|
-
"--font-sm": "20rpx",
|
|
1103
|
-
"--font-base": "24rpx",
|
|
1104
|
-
"--font-md": "28rpx",
|
|
1105
|
-
"--font-lg": "32rpx",
|
|
1106
|
-
"--font-xl": "36rpx"
|
|
1107
|
-
}
|
|
1108
|
-
},
|
|
1109
|
-
normal: {
|
|
1110
|
-
label: "标准",
|
|
1111
|
-
vars: {
|
|
1112
|
-
"--font-xs": "20rpx",
|
|
1113
|
-
"--font-sm": "24rpx",
|
|
1114
|
-
"--font-base": "28rpx",
|
|
1115
|
-
"--font-md": "32rpx",
|
|
1116
|
-
"--font-lg": "36rpx",
|
|
1117
|
-
"--font-xl": "40rpx"
|
|
1118
|
-
}
|
|
1119
|
-
},
|
|
1120
|
-
large: {
|
|
1121
|
-
label: "大字体",
|
|
1122
|
-
vars: {
|
|
1123
|
-
"--font-xs": "24rpx",
|
|
1124
|
-
"--font-sm": "30rpx",
|
|
1125
|
-
"--font-base": "34rpx",
|
|
1126
|
-
"--font-md": "40rpx",
|
|
1127
|
-
"--font-lg": "46rpx",
|
|
1128
|
-
"--font-xl": "52rpx"
|
|
1129
|
-
}
|
|
1130
|
-
},
|
|
1131
|
-
xlarge: {
|
|
1132
|
-
label: "超大字体",
|
|
1133
|
-
vars: {
|
|
1134
|
-
"--font-xs": "28rpx",
|
|
1135
|
-
"--font-sm": "36rpx",
|
|
1136
|
-
"--font-base": "42rpx",
|
|
1137
|
-
"--font-md": "48rpx",
|
|
1138
|
-
"--font-lg": "56rpx",
|
|
1139
|
-
"--font-xl": "64rpx"
|
|
1140
|
-
}
|
|
1141
|
-
}
|
|
1142
|
-
};
|
|
1143
|
-
function getCurrentFontScale() {
|
|
1144
|
-
try {
|
|
1145
|
-
const v = uni.getStorageSync(FONT_SCALE_KEY);
|
|
1146
|
-
if (v === "small" || v === "large" || v === "xlarge")
|
|
1147
|
-
return v;
|
|
1148
|
-
} catch {
|
|
1149
|
-
}
|
|
1150
|
-
return "normal";
|
|
1151
|
-
}
|
|
1152
|
-
function getCurrentFontVars() {
|
|
1153
|
-
return FONT_PRESETS[getCurrentFontScale()].vars;
|
|
1154
|
-
}
|
|
1155
|
-
const { hexToRgba, darkenHex } = mpCore.useColor();
|
|
1156
|
-
const THEME_COLOR_KEY = "hlw_theme_color";
|
|
1157
|
-
const DEFAULT_THEMES = [
|
|
1158
|
-
{ label: "默认蓝", value: "#3b82f6" },
|
|
1159
|
-
{ label: "活力橙", value: "#f97316" },
|
|
1160
|
-
{ label: "翡翠绿", value: "#10b981" },
|
|
1161
|
-
{ label: "玫瑰红", value: "#f43f5e" },
|
|
1162
|
-
{ label: "紫罗兰", value: "#8b5cf6" },
|
|
1163
|
-
{ label: "青石灰", value: "#64748b" }
|
|
1164
|
-
];
|
|
1165
|
-
function getCurrentThemeColor() {
|
|
1166
|
-
try {
|
|
1167
|
-
const v = uni.getStorageSync(THEME_COLOR_KEY);
|
|
1168
|
-
if (v && typeof v === "string")
|
|
1169
|
-
return v;
|
|
1170
|
-
} catch {
|
|
1171
|
-
}
|
|
1172
|
-
return DEFAULT_THEMES[0].value;
|
|
1173
|
-
}
|
|
1174
|
-
function getCurrentThemeVars() {
|
|
1175
|
-
const color = getCurrentThemeColor();
|
|
1176
|
-
return {
|
|
1177
|
-
"--primary-color": color,
|
|
1178
|
-
"--primary-light": hexToRgba(color, 0.12),
|
|
1179
|
-
"--primary-dark": darkenHex(color)
|
|
1180
|
-
};
|
|
1181
|
-
}
|
|
1182
|
-
const { varsToStyle } = mpCore.useColor();
|
|
1183
|
-
const THEME_CHANGE_EVENT = "hlw:theme-change";
|
|
1184
|
-
function buildThemeStyle() {
|
|
1185
|
-
return varsToStyle({
|
|
1186
|
-
...getCurrentFontVars(),
|
|
1187
|
-
...getCurrentThemeVars()
|
|
1188
|
-
});
|
|
1189
|
-
}
|
|
1190
|
-
function useThemePageStyle() {
|
|
1191
|
-
const themePageStyle = vue.ref(buildThemeStyle());
|
|
1192
|
-
const onThemeChange = () => {
|
|
1193
|
-
themePageStyle.value = buildThemeStyle();
|
|
1194
|
-
};
|
|
1195
|
-
vue.onMounted(() => uni.$on(THEME_CHANGE_EVENT, onThemeChange));
|
|
1196
|
-
vue.onUnmounted(() => uni.$off(THEME_CHANGE_EVENT, onThemeChange));
|
|
1197
|
-
return { themePageStyle };
|
|
1198
|
-
}
|
|
1211
|
+
const index = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-a407a3ce"]]);
|
|
1199
1212
|
const useThemeStore = pinia.defineStore(
|
|
1200
1213
|
"theme",
|
|
1201
1214
|
() => {
|