@hlw-uni/mp-vue 1.1.5 → 1.1.6

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.mjs CHANGED
@@ -1,826 +1,6 @@
1
- import { defineComponent, resolveComponent, openBlock, createBlock, ref, computed, createElementBlock, normalizeClass, createElementVNode, toDisplayString, createCommentVNode, renderSlot, useSlots, withCtx, createTextVNode, normalizeStyle, unref, Fragment, renderList, withModifiers, onMounted, onUnmounted, createVNode } from "vue";
1
+ import { ref, onMounted, onUnmounted, computed } from "vue";
2
2
  import { useColor } from "@hlw-uni/mp-core";
3
3
  import { defineStore } from "pinia";
4
- const _sfc_main$h = /* @__PURE__ */ defineComponent({
5
- ...{ name: "HlwAd" },
6
- __name: "index",
7
- props: {
8
- unitId: {}
9
- },
10
- emits: ["load", "close", "error"],
11
- setup(__props, { emit: __emit }) {
12
- const emit = __emit;
13
- function onLoad(event) {
14
- emit("load", event);
15
- }
16
- function onClose(event) {
17
- emit("close", event);
18
- }
19
- function onError(event) {
20
- var _a, _b;
21
- console.error("[HlwAd] 广告错误:", (_a = event == null ? void 0 : event.detail) == null ? void 0 : _a.errCode, (_b = event == null ? void 0 : event.detail) == null ? void 0 : _b.errMsg);
22
- emit("error", event);
23
- }
24
- return (_ctx, _cache) => {
25
- const _component_ad = resolveComponent("ad");
26
- return openBlock(), createBlock(_component_ad, {
27
- "unit-id": __props.unitId,
28
- onLoad,
29
- onClose,
30
- onError
31
- }, null, 8, ["unit-id"]);
32
- };
33
- }
34
- });
35
- const _hoisted_1$g = ["src"];
36
- const _hoisted_2$d = {
37
- key: 1,
38
- class: "hlw-avatar__placeholder"
39
- };
40
- const _hoisted_3$7 = { class: "hlw-avatar__initial" };
41
- const _sfc_main$g = /* @__PURE__ */ defineComponent({
42
- __name: "index",
43
- props: {
44
- src: {},
45
- name: {},
46
- size: {}
47
- },
48
- setup(__props) {
49
- const props = __props;
50
- const loadError = ref(false);
51
- const initial = computed(() => {
52
- if (!props.name)
53
- return "?";
54
- return props.name.charAt(0).toUpperCase();
55
- });
56
- return (_ctx, _cache) => {
57
- return openBlock(), createElementBlock("view", {
58
- class: normalizeClass(`hlw-avatar hlw-avatar--${__props.size ?? "medium"}`)
59
- }, [
60
- __props.src && !loadError.value ? (openBlock(), createElementBlock("image", {
61
- key: 0,
62
- class: "hlw-avatar__image",
63
- src: __props.src,
64
- mode: "aspectFill",
65
- onError: _cache[0] || (_cache[0] = ($event) => loadError.value = true)
66
- }, null, 40, _hoisted_1$g)) : (openBlock(), createElementBlock("view", _hoisted_2$d, [
67
- createElementVNode("text", _hoisted_3$7, toDisplayString(initial.value), 1)
68
- ]))
69
- ], 2);
70
- };
71
- }
72
- });
73
- const _export_sfc = (sfc, props) => {
74
- const target = sfc.__vccOpts || sfc;
75
- for (const [key, val] of props) {
76
- target[key] = val;
77
- }
78
- return target;
79
- };
80
- const index$g = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["__scopeId", "data-v-19006b2d"]]);
81
- const _hoisted_1$f = ["disabled", "open-type"];
82
- const _hoisted_2$c = {
83
- key: 0,
84
- class: "hlw-btn-spinner"
85
- };
86
- const _sfc_main$f = /* @__PURE__ */ defineComponent({
87
- __name: "index",
88
- props: {
89
- type: { default: "primary" },
90
- size: { default: "medium" },
91
- loading: { type: Boolean, default: false },
92
- disabled: { type: Boolean, default: false },
93
- block: { type: Boolean, default: false },
94
- round: { type: Boolean, default: false },
95
- icon: { default: "" },
96
- openType: { default: "" }
97
- },
98
- emits: ["click"],
99
- setup(__props) {
100
- return (_ctx, _cache) => {
101
- return openBlock(), createElementBlock("button", {
102
- class: normalizeClass(["hlw-btn", [
103
- `hlw-btn--${__props.type}`,
104
- `hlw-btn--${__props.size}`,
105
- { "hlw-btn--block": __props.block, "hlw-btn--round": __props.round, "hlw-btn--disabled": __props.disabled, "hlw-btn--loading": __props.loading }
106
- ]]),
107
- disabled: __props.disabled || __props.loading,
108
- "open-type": __props.openType,
109
- onTap: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("click"))
110
- }, [
111
- __props.loading ? (openBlock(), createElementBlock("view", _hoisted_2$c)) : __props.icon ? (openBlock(), createElementBlock("view", {
112
- key: 1,
113
- class: normalizeClass([__props.icon, "hlw-btn-icon"])
114
- }, null, 2)) : createCommentVNode("", true),
115
- renderSlot(_ctx.$slots, "default", {}, void 0, true)
116
- ], 42, _hoisted_1$f);
117
- };
118
- }
119
- });
120
- const index$f = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["__scopeId", "data-v-19a9c118"]]);
121
- const _hoisted_1$e = {
122
- key: 0,
123
- class: "hlw-card-header"
124
- };
125
- const _hoisted_2$b = { class: "hlw-card-header-inner" };
126
- const _hoisted_3$6 = { class: "hlw-card-header-left" };
127
- const _hoisted_4$4 = {
128
- key: 0,
129
- class: "hlw-card-title"
130
- };
131
- const _hoisted_5$2 = {
132
- key: 0,
133
- class: "hlw-card-header-right"
134
- };
135
- const _hoisted_6$2 = {
136
- key: 0,
137
- class: "hlw-card-extra"
138
- };
139
- const _hoisted_7$2 = {
140
- key: 1,
141
- class: "hlw-card-divider"
142
- };
143
- const _hoisted_8$2 = {
144
- key: 2,
145
- class: "hlw-card-footer"
146
- };
147
- const _hoisted_9$2 = { class: "hlw-card-footer-inner" };
148
- const _hoisted_10$2 = { class: "hlw-card-footer-left" };
149
- const _hoisted_11$2 = {
150
- key: 0,
151
- class: "hlw-card-footer-right"
152
- };
153
- const _sfc_main$e = /* @__PURE__ */ defineComponent({
154
- __name: "index",
155
- props: {
156
- title: { default: "" },
157
- extra: { default: "" },
158
- border: { type: Boolean, default: true },
159
- radius: { default: "xl" },
160
- divider: { type: Boolean, default: void 0 },
161
- padding: { type: Boolean, default: true }
162
- },
163
- setup(__props) {
164
- const props = __props;
165
- const slots = useSlots();
166
- const hasHeader = computed(
167
- () => !!(props.title || props.extra || slots.header || slots["header-left"] || slots["header-right"])
168
- );
169
- const hasFooter = computed(
170
- () => !!(slots.footer || slots["footer-left"] || slots["footer-right"])
171
- );
172
- const showDivider = computed(() => {
173
- if (props.divider !== void 0)
174
- return props.divider;
175
- return hasHeader.value;
176
- });
177
- return (_ctx, _cache) => {
178
- return openBlock(), createElementBlock("view", {
179
- class: normalizeClass(["hlw-card", [
180
- `hlw-card--radius-${__props.radius}`,
181
- __props.border ? "hlw-card--bordered" : ""
182
- ]])
183
- }, [
184
- hasHeader.value ? (openBlock(), createElementBlock("view", _hoisted_1$e, [
185
- renderSlot(_ctx.$slots, "header", {}, () => [
186
- createElementVNode("view", _hoisted_2$b, [
187
- createElementVNode("view", _hoisted_3$6, [
188
- renderSlot(_ctx.$slots, "header-left", {}, () => [
189
- __props.title ? (openBlock(), createElementBlock("text", _hoisted_4$4, toDisplayString(__props.title), 1)) : createCommentVNode("", true)
190
- ], true)
191
- ]),
192
- _ctx.$slots["header-right"] || __props.extra ? (openBlock(), createElementBlock("view", _hoisted_5$2, [
193
- renderSlot(_ctx.$slots, "header-right", {}, () => [
194
- __props.extra ? (openBlock(), createElementBlock("text", _hoisted_6$2, toDisplayString(__props.extra), 1)) : createCommentVNode("", true)
195
- ], true)
196
- ])) : createCommentVNode("", true)
197
- ])
198
- ], true)
199
- ])) : createCommentVNode("", true),
200
- showDivider.value ? (openBlock(), createElementBlock("view", _hoisted_7$2)) : createCommentVNode("", true),
201
- createElementVNode("view", {
202
- class: normalizeClass(["hlw-card-body", { "hlw-card-body--padded": __props.padding }])
203
- }, [
204
- renderSlot(_ctx.$slots, "default", {}, void 0, true)
205
- ], 2),
206
- hasFooter.value ? (openBlock(), createElementBlock("view", _hoisted_8$2, [
207
- renderSlot(_ctx.$slots, "footer", {}, () => [
208
- createElementVNode("view", _hoisted_9$2, [
209
- createElementVNode("view", _hoisted_10$2, [
210
- renderSlot(_ctx.$slots, "footer-left", {}, void 0, true)
211
- ]),
212
- _ctx.$slots["footer-right"] ? (openBlock(), createElementBlock("view", _hoisted_11$2, [
213
- renderSlot(_ctx.$slots, "footer-right", {}, void 0, true)
214
- ])) : createCommentVNode("", true)
215
- ])
216
- ], true)
217
- ])) : createCommentVNode("", true)
218
- ], 2);
219
- };
220
- }
221
- });
222
- const index$e = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["__scopeId", "data-v-cf55252e"]]);
223
- const _hoisted_1$d = {
224
- key: 0,
225
- class: "hlw-cell-icon"
226
- };
227
- const _hoisted_2$a = { class: "hlw-cell-body" };
228
- const _hoisted_3$5 = { class: "hlw-cell-title" };
229
- const _hoisted_4$3 = {
230
- key: 0,
231
- class: "hlw-cell-label"
232
- };
233
- const _hoisted_5$1 = { class: "hlw-cell-value" };
234
- const _hoisted_6$1 = ["hover-class"];
235
- const _hoisted_7$1 = {
236
- key: 0,
237
- class: "hlw-cell-icon"
238
- };
239
- const _hoisted_8$1 = { class: "hlw-cell-body" };
240
- const _hoisted_9$1 = { class: "hlw-cell-title" };
241
- const _hoisted_10$1 = {
242
- key: 0,
243
- class: "hlw-cell-label"
244
- };
245
- const _hoisted_11$1 = { class: "hlw-cell-value" };
246
- const _hoisted_12$1 = {
247
- key: 1,
248
- class: "hlw-cell-arrow"
249
- };
250
- const _sfc_main$d = /* @__PURE__ */ defineComponent({
251
- __name: "index",
252
- props: {
253
- title: { default: "" },
254
- label: { default: "" },
255
- value: { default: "" },
256
- icon: { default: "" },
257
- isLink: { type: Boolean, default: false },
258
- url: { default: "" },
259
- border: { type: Boolean, default: true }
260
- },
261
- emits: ["click"],
262
- setup(__props) {
263
- return (_ctx, _cache) => {
264
- const _component_navigator = resolveComponent("navigator");
265
- return __props.url ? (openBlock(), createBlock(_component_navigator, {
266
- key: 0,
267
- url: __props.url,
268
- class: normalizeClass(["hlw-cell", { "hlw-cell--border": __props.border }]),
269
- "hover-class": "hlw-cell--hover"
270
- }, {
271
- default: withCtx(() => [
272
- __props.icon || _ctx.$slots.icon ? (openBlock(), createElementBlock("view", _hoisted_1$d, [
273
- renderSlot(_ctx.$slots, "icon", {}, () => [
274
- createElementVNode("view", {
275
- class: normalizeClass(__props.icon)
276
- }, null, 2)
277
- ], true)
278
- ])) : createCommentVNode("", true),
279
- createElementVNode("view", _hoisted_2$a, [
280
- createElementVNode("view", _hoisted_3$5, [
281
- renderSlot(_ctx.$slots, "title", {}, () => [
282
- createTextVNode(toDisplayString(__props.title), 1)
283
- ], true),
284
- __props.label ? (openBlock(), createElementBlock("view", _hoisted_4$3, toDisplayString(__props.label), 1)) : createCommentVNode("", true)
285
- ]),
286
- createElementVNode("view", _hoisted_5$1, [
287
- renderSlot(_ctx.$slots, "value", {}, () => [
288
- createTextVNode(toDisplayString(__props.value), 1)
289
- ], true)
290
- ])
291
- ]),
292
- _cache[1] || (_cache[1] = createElementVNode("view", { class: "hlw-cell-arrow" }, null, -1))
293
- ]),
294
- _: 3
295
- }, 8, ["url", "class"])) : (openBlock(), createElementBlock("view", {
296
- key: 1,
297
- class: normalizeClass(["hlw-cell", { "hlw-cell--border": __props.border, "hlw-cell--link": __props.isLink }]),
298
- "hover-class": __props.isLink ? "hlw-cell--hover" : "",
299
- onTap: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("click"))
300
- }, [
301
- __props.icon || _ctx.$slots.icon ? (openBlock(), createElementBlock("view", _hoisted_7$1, [
302
- renderSlot(_ctx.$slots, "icon", {}, () => [
303
- createElementVNode("view", {
304
- class: normalizeClass(__props.icon)
305
- }, null, 2)
306
- ], true)
307
- ])) : createCommentVNode("", true),
308
- createElementVNode("view", _hoisted_8$1, [
309
- createElementVNode("view", _hoisted_9$1, [
310
- renderSlot(_ctx.$slots, "title", {}, () => [
311
- createTextVNode(toDisplayString(__props.title), 1)
312
- ], true),
313
- __props.label ? (openBlock(), createElementBlock("view", _hoisted_10$1, toDisplayString(__props.label), 1)) : createCommentVNode("", true)
314
- ]),
315
- createElementVNode("view", _hoisted_11$1, [
316
- renderSlot(_ctx.$slots, "value", {}, () => [
317
- createTextVNode(toDisplayString(__props.value), 1)
318
- ], true)
319
- ])
320
- ]),
321
- __props.isLink ? (openBlock(), createElementBlock("view", _hoisted_12$1)) : createCommentVNode("", true),
322
- renderSlot(_ctx.$slots, "right", {}, void 0, true)
323
- ], 42, _hoisted_6$1));
324
- };
325
- }
326
- });
327
- const index$d = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["__scopeId", "data-v-996053be"]]);
328
- const _hoisted_1$c = {
329
- key: 0,
330
- class: "hlw-divider-text"
331
- };
332
- const _sfc_main$c = /* @__PURE__ */ defineComponent({
333
- __name: "index",
334
- props: {
335
- text: { default: "" },
336
- position: { default: "center" },
337
- dashed: { type: Boolean, default: false }
338
- },
339
- setup(__props) {
340
- return (_ctx, _cache) => {
341
- return openBlock(), createElementBlock("view", {
342
- class: normalizeClass(["hlw-divider", [`hlw-divider--${__props.position}`, { "hlw-divider--dashed": __props.dashed }]])
343
- }, [
344
- _cache[0] || (_cache[0] = createElementVNode("view", { class: "hlw-divider-line" }, null, -1)),
345
- __props.text || _ctx.$slots.default ? (openBlock(), createElementBlock("view", _hoisted_1$c, [
346
- renderSlot(_ctx.$slots, "default", {}, () => [
347
- createTextVNode(toDisplayString(__props.text), 1)
348
- ], true)
349
- ])) : createCommentVNode("", true),
350
- _cache[1] || (_cache[1] = createElementVNode("view", { class: "hlw-divider-line" }, null, -1))
351
- ], 2);
352
- };
353
- }
354
- });
355
- const index$c = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["__scopeId", "data-v-beaa0298"]]);
356
- const _hoisted_1$b = { class: "hlw-empty" };
357
- const _hoisted_2$9 = ["src"];
358
- const _hoisted_3$4 = {
359
- key: 1,
360
- class: "hlw-empty__icon i-fa6-solid-box-open"
361
- };
362
- const _hoisted_4$2 = { class: "hlw-empty__text" };
363
- const _sfc_main$b = /* @__PURE__ */ defineComponent({
364
- __name: "index",
365
- props: {
366
- text: {},
367
- image: {}
368
- },
369
- setup(__props) {
370
- return (_ctx, _cache) => {
371
- return openBlock(), createElementBlock("view", _hoisted_1$b, [
372
- __props.image ? (openBlock(), createElementBlock("image", {
373
- key: 0,
374
- class: "hlw-empty__image",
375
- src: __props.image,
376
- mode: "aspectFit"
377
- }, null, 8, _hoisted_2$9)) : (openBlock(), createElementBlock("view", _hoisted_3$4)),
378
- createElementVNode("text", _hoisted_4$2, toDisplayString(__props.text || "暂无数据"), 1),
379
- renderSlot(_ctx.$slots, "default", {}, void 0, true)
380
- ]);
381
- };
382
- }
383
- });
384
- const index$b = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["__scopeId", "data-v-94fefc47"]]);
385
- const _hoisted_1$a = {
386
- key: 0,
387
- class: "header-placeholder"
388
- };
389
- const _hoisted_2$8 = {
390
- key: 0,
391
- class: "header-title header-title--center"
392
- };
393
- const _sfc_main$a = /* @__PURE__ */ defineComponent({
394
- __name: "index",
395
- props: {
396
- extraHeight: { default: 0 },
397
- bgClass: { default: "" },
398
- isBack: { type: Boolean, default: false },
399
- title: { default: "" },
400
- titleAlign: { default: "center" },
401
- titleSize: { default: "var(--font-base, 28rpx)" },
402
- titleWeight: { default: 500 },
403
- titleColor: { default: "" }
404
- },
405
- emits: ["back"],
406
- setup(__props, { emit: __emit }) {
407
- const getNavBarContentHeight = () => {
408
- var _a;
409
- try {
410
- const menuInfo = (_a = uni.getMenuButtonBoundingClientRect) == null ? void 0 : _a.call(uni);
411
- if (!menuInfo)
412
- return 44;
413
- const systemInfo = uni.getSystemInfoSync();
414
- return (menuInfo.top - systemInfo.statusBarHeight) * 2 + menuInfo.height;
415
- } catch {
416
- return 44;
417
- }
418
- };
419
- const getStatusBarHeight = () => {
420
- try {
421
- const systemInfo = uni.getSystemInfoSync();
422
- return systemInfo.statusBarHeight || 20;
423
- } catch {
424
- return 20;
425
- }
426
- };
427
- const NAV_BAR_CONTENT_HEIGHT = getNavBarContentHeight();
428
- const props = __props;
429
- const emit = __emit;
430
- const handleBack = () => {
431
- emit("back");
432
- uni.navigateBack({ delta: 1 });
433
- };
434
- const titleStyle = computed(() => ({
435
- fontSize: props.titleSize,
436
- fontWeight: String(props.titleWeight),
437
- ...props.titleColor ? { color: props.titleColor } : {}
438
- }));
439
- const slots = useSlots();
440
- const hasBgSlot = computed(() => !props.isBack && !!slots.bg);
441
- const statusBarHeight = ref(getStatusBarHeight());
442
- const totalNavBarHeight = computed(() => statusBarHeight.value + NAV_BAR_CONTENT_HEIGHT + props.extraHeight);
443
- return (_ctx, _cache) => {
444
- return openBlock(), createElementBlock("view", {
445
- class: "hlw-header",
446
- style: normalizeStyle({ height: totalNavBarHeight.value + "px" })
447
- }, [
448
- createElementVNode("view", {
449
- class: normalizeClass(["header-bg-layer", hasBgSlot.value ? "" : props.bgClass])
450
- }, [
451
- !props.isBack ? renderSlot(_ctx.$slots, "bg", { key: 0 }, void 0, true) : createCommentVNode("", true)
452
- ], 2),
453
- createElementVNode("view", {
454
- class: "status-bar-spacer",
455
- style: normalizeStyle({ height: statusBarHeight.value + "px" })
456
- }, null, 4),
457
- createElementVNode("view", {
458
- class: "header-content-area",
459
- style: normalizeStyle({ height: unref(NAV_BAR_CONTENT_HEIGHT) + "px" })
460
- }, [
461
- props.isBack ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
462
- createElementVNode("view", {
463
- class: "header-back",
464
- onClick: handleBack
465
- }, [
466
- renderSlot(_ctx.$slots, "back-icon", {}, () => [
467
- _cache[0] || (_cache[0] = createElementVNode("text", { class: "i-fa6-solid-chevron-left header-back-icon" }, null, -1))
468
- ], true)
469
- ]),
470
- createElementVNode("view", {
471
- class: normalizeClass(["header-title", props.titleAlign === "left" ? "header-title--left" : "header-title--center"])
472
- }, [
473
- renderSlot(_ctx.$slots, "title", {}, () => [
474
- createElementVNode("text", {
475
- class: "header-title-text",
476
- style: normalizeStyle(titleStyle.value)
477
- }, toDisplayString(props.title), 5)
478
- ], true)
479
- ], 2),
480
- props.titleAlign === "center" ? (openBlock(), createElementBlock("view", _hoisted_1$a)) : createCommentVNode("", true)
481
- ], 64)) : renderSlot(_ctx.$slots, "default", { key: 1 }, () => [
482
- props.title ? (openBlock(), createElementBlock("view", _hoisted_2$8, [
483
- createElementVNode("text", {
484
- class: "header-title-text",
485
- style: normalizeStyle(titleStyle.value)
486
- }, toDisplayString(props.title), 5)
487
- ])) : createCommentVNode("", true)
488
- ], true)
489
- ], 4)
490
- ], 4);
491
- };
492
- }
493
- });
494
- const index$a = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["__scopeId", "data-v-8497ffe5"]]);
495
- const _hoisted_1$9 = { class: "hlw-loading" };
496
- const _hoisted_2$7 = {
497
- key: 0,
498
- class: "hlw-loading__text"
499
- };
500
- const _sfc_main$9 = /* @__PURE__ */ defineComponent({
501
- __name: "index",
502
- props: {
503
- text: {}
504
- },
505
- setup(__props) {
506
- return (_ctx, _cache) => {
507
- return openBlock(), createElementBlock("view", _hoisted_1$9, [
508
- _cache[0] || (_cache[0] = createElementVNode("view", { class: "hlw-loading__spinner" }, null, -1)),
509
- __props.text ? (openBlock(), createElementBlock("text", _hoisted_2$7, toDisplayString(__props.text), 1)) : createCommentVNode("", true)
510
- ]);
511
- };
512
- }
513
- });
514
- const index$9 = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["__scopeId", "data-v-fd9272d5"]]);
515
- const _hoisted_1$8 = {
516
- key: 0,
517
- class: "hlw-menu-title"
518
- };
519
- const _hoisted_2$6 = {
520
- key: 1,
521
- class: "hlw-menu-title-divider"
522
- };
523
- const _hoisted_3$3 = { class: "hlw-menu-left" };
524
- const _hoisted_4$1 = { class: "hlw-menu-label" };
525
- const _hoisted_5 = { class: "hlw-menu-right" };
526
- const _hoisted_6 = {
527
- key: 0,
528
- class: "hlw-menu-value"
529
- };
530
- const _hoisted_7 = ["onClick"];
531
- const _hoisted_8 = { class: "hlw-menu-left" };
532
- const _hoisted_9 = { class: "hlw-menu-label" };
533
- const _hoisted_10 = { class: "hlw-menu-right" };
534
- const _hoisted_11 = {
535
- key: 0,
536
- class: "i-fa6-solid-circle-notch hlw-menu-spin hlw-menu-muted"
537
- };
538
- const _hoisted_12 = {
539
- key: 1,
540
- class: "hlw-menu-value"
541
- };
542
- const _hoisted_13 = {
543
- key: 2,
544
- class: "hlw-menu-divider"
545
- };
546
- const _hoisted_14 = { class: "hlw-menu-grid-icon-wrap" };
547
- const _hoisted_15 = { class: "hlw-menu-grid-label" };
548
- const _hoisted_16 = ["onClick"];
549
- const _hoisted_17 = { class: "hlw-menu-grid-icon-wrap" };
550
- const _hoisted_18 = { class: "hlw-menu-grid-label" };
551
- const _sfc_main$8 = /* @__PURE__ */ defineComponent({
552
- __name: "index",
553
- props: {
554
- items: {},
555
- title: { default: "" },
556
- mode: { default: "list" },
557
- columns: { default: 4 },
558
- border: { type: Boolean, default: true }
559
- },
560
- emits: ["click"],
561
- setup(__props, { emit: __emit }) {
562
- const props = __props;
563
- const emit = __emit;
564
- const visibleItems = computed(() => props.items.filter((item) => item.visible !== false));
565
- const handleClick = (item) => {
566
- emit("click", item);
567
- };
568
- return (_ctx, _cache) => {
569
- const _component_navigator = resolveComponent("navigator");
570
- return openBlock(), createElementBlock("view", {
571
- class: normalizeClass(["hlw-menu", { "hlw-menu--no-border": !props.border }])
572
- }, [
573
- props.title ? (openBlock(), createElementBlock("view", _hoisted_1$8, [
574
- createElementVNode("text", null, toDisplayString(props.title), 1)
575
- ])) : createCommentVNode("", true),
576
- props.title ? (openBlock(), createElementBlock("view", _hoisted_2$6)) : createCommentVNode("", true),
577
- props.mode === "list" ? (openBlock(true), createElementBlock(Fragment, { key: 2 }, renderList(visibleItems.value, (item, index2) => {
578
- return openBlock(), createElementBlock(Fragment, { key: index2 }, [
579
- item.url ? (openBlock(), createBlock(_component_navigator, {
580
- key: 0,
581
- url: item.url,
582
- class: "hlw-menu-item",
583
- "hover-class": "hlw-menu-item--active"
584
- }, {
585
- default: withCtx(() => [
586
- createElementVNode("view", _hoisted_3$3, [
587
- createElementVNode("view", {
588
- class: normalizeClass(["hlw-menu-icon", `hlw-menu-icon--${item.iconTheme || "slate"}`])
589
- }, [
590
- createElementVNode("text", {
591
- class: normalizeClass(item.icon)
592
- }, null, 2)
593
- ], 2),
594
- createElementVNode("text", _hoisted_4$1, toDisplayString(item.label), 1)
595
- ]),
596
- createElementVNode("view", _hoisted_5, [
597
- item.value ? (openBlock(), createElementBlock("text", _hoisted_6, toDisplayString(item.value), 1)) : createCommentVNode("", true),
598
- item.tag ? (openBlock(), createElementBlock("text", {
599
- key: 1,
600
- class: normalizeClass(["hlw-menu-tag", [`hlw-menu-tag--${item.tagTheme || "rose"}`, item.tagPulse ? "hlw-menu-tag-pulse" : ""]])
601
- }, toDisplayString(item.tag), 3)) : createCommentVNode("", true),
602
- _cache[0] || (_cache[0] = createElementVNode("text", { class: "i-fa6-solid-chevron-right hlw-menu-arrow" }, null, -1))
603
- ])
604
- ]),
605
- _: 2
606
- }, 1032, ["url"])) : (openBlock(), createElementBlock("view", {
607
- key: 1,
608
- class: "hlw-menu-item",
609
- "hover-class": "hlw-menu-item--active",
610
- onClick: ($event) => handleClick(item)
611
- }, [
612
- createElementVNode("view", _hoisted_8, [
613
- createElementVNode("view", {
614
- class: normalizeClass(["hlw-menu-icon", `hlw-menu-icon--${item.iconTheme || "slate"}`])
615
- }, [
616
- createElementVNode("text", {
617
- class: normalizeClass(item.icon)
618
- }, null, 2)
619
- ], 2),
620
- createElementVNode("text", _hoisted_9, toDisplayString(item.label), 1)
621
- ]),
622
- createElementVNode("view", _hoisted_10, [
623
- item.loading ? (openBlock(), createElementBlock("text", _hoisted_11)) : createCommentVNode("", true),
624
- item.value ? (openBlock(), createElementBlock("text", _hoisted_12, toDisplayString(item.value), 1)) : createCommentVNode("", true),
625
- item.tag ? (openBlock(), createElementBlock("text", {
626
- key: 2,
627
- class: normalizeClass(["hlw-menu-tag", [`hlw-menu-tag--${item.tagTheme || "rose"}`, item.tagPulse ? "hlw-menu-tag-pulse" : ""]])
628
- }, toDisplayString(item.tag), 3)) : createCommentVNode("", true),
629
- _cache[1] || (_cache[1] = createElementVNode("text", { class: "i-fa6-solid-chevron-right hlw-menu-arrow" }, null, -1))
630
- ])
631
- ], 8, _hoisted_7)),
632
- index2 < visibleItems.value.length - 1 ? (openBlock(), createElementBlock("view", _hoisted_13)) : createCommentVNode("", true)
633
- ], 64);
634
- }), 128)) : (openBlock(), createElementBlock("view", {
635
- key: 3,
636
- class: "hlw-menu-grid",
637
- style: normalizeStyle({ gridTemplateColumns: `repeat(${props.columns}, 1fr)` })
638
- }, [
639
- (openBlock(true), createElementBlock(Fragment, null, renderList(visibleItems.value, (item, index2) => {
640
- return openBlock(), createElementBlock(Fragment, { key: index2 }, [
641
- item.url ? (openBlock(), createBlock(_component_navigator, {
642
- key: 0,
643
- url: item.url,
644
- class: "hlw-menu-grid-item",
645
- "hover-class": "hlw-menu-grid-item--active"
646
- }, {
647
- default: withCtx(() => [
648
- createElementVNode("view", _hoisted_14, [
649
- createElementVNode("view", {
650
- class: normalizeClass(["hlw-menu-icon hlw-menu-icon--grid", `hlw-menu-icon--${item.iconTheme || "slate"}`])
651
- }, [
652
- createElementVNode("text", {
653
- class: normalizeClass(item.icon)
654
- }, null, 2)
655
- ], 2),
656
- item.tag ? (openBlock(), createElementBlock("text", {
657
- key: 0,
658
- class: normalizeClass(["hlw-menu-badge", [`hlw-menu-tag--${item.tagTheme || "rose"}`, item.tagPulse ? "hlw-menu-tag-pulse" : ""]])
659
- }, toDisplayString(item.tag), 3)) : createCommentVNode("", true)
660
- ]),
661
- createElementVNode("text", _hoisted_15, toDisplayString(item.label), 1)
662
- ]),
663
- _: 2
664
- }, 1032, ["url"])) : (openBlock(), createElementBlock("view", {
665
- key: 1,
666
- class: "hlw-menu-grid-item",
667
- "hover-class": "hlw-menu-grid-item--active",
668
- onClick: ($event) => handleClick(item)
669
- }, [
670
- createElementVNode("view", _hoisted_17, [
671
- createElementVNode("view", {
672
- class: normalizeClass(["hlw-menu-icon hlw-menu-icon--grid", `hlw-menu-icon--${item.iconTheme || "slate"}`])
673
- }, [
674
- createElementVNode("text", {
675
- class: normalizeClass(item.icon)
676
- }, null, 2)
677
- ], 2),
678
- item.tag ? (openBlock(), createElementBlock("text", {
679
- key: 0,
680
- class: normalizeClass(["hlw-menu-badge", [`hlw-menu-tag--${item.tagTheme || "rose"}`, item.tagPulse ? "hlw-menu-tag-pulse" : ""]])
681
- }, toDisplayString(item.tag), 3)) : createCommentVNode("", true)
682
- ]),
683
- createElementVNode("text", _hoisted_18, toDisplayString(item.label), 1)
684
- ], 8, _hoisted_16))
685
- ], 64);
686
- }), 128))
687
- ], 4))
688
- ], 2);
689
- };
690
- }
691
- });
692
- const index$8 = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["__scopeId", "data-v-2d7cd322"]]);
693
- const _hoisted_1$7 = {
694
- key: 0,
695
- class: "hlw-modal-title"
696
- };
697
- const _hoisted_2$5 = { class: "hlw-modal-body" };
698
- const _hoisted_3$2 = { class: "hlw-modal-footer" };
699
- const _sfc_main$7 = /* @__PURE__ */ defineComponent({
700
- __name: "index",
701
- props: {
702
- show: { type: Boolean, default: false },
703
- title: { default: "" },
704
- showCancel: { type: Boolean, default: true },
705
- confirmText: { default: "确定" },
706
- cancelText: { default: "取消" },
707
- closeOnMask: { type: Boolean, default: true }
708
- },
709
- emits: ["update:show", "confirm", "cancel"],
710
- setup(__props, { emit: __emit }) {
711
- const props = __props;
712
- const emit = __emit;
713
- function close() {
714
- emit("update:show", false);
715
- }
716
- function onMask() {
717
- if (!props.closeOnMask)
718
- return;
719
- close();
720
- }
721
- function onConfirm() {
722
- emit("confirm");
723
- close();
724
- }
725
- function onCancel() {
726
- emit("cancel");
727
- close();
728
- }
729
- return (_ctx, _cache) => {
730
- return __props.show ? (openBlock(), createElementBlock("view", {
731
- key: 0,
732
- class: "hlw-modal-mask",
733
- onTap: withModifiers(onMask, ["self"])
734
- }, [
735
- createElementVNode("view", {
736
- class: normalizeClass(["hlw-modal", { "hlw-modal--show": __props.show }]),
737
- onTap: _cache[0] || (_cache[0] = withModifiers(() => {
738
- }, ["stop"]))
739
- }, [
740
- __props.title ? (openBlock(), createElementBlock("view", _hoisted_1$7, toDisplayString(__props.title), 1)) : createCommentVNode("", true),
741
- createElementVNode("view", _hoisted_2$5, [
742
- renderSlot(_ctx.$slots, "default", {}, void 0, true)
743
- ]),
744
- renderSlot(_ctx.$slots, "footer", {}, () => [
745
- createElementVNode("view", _hoisted_3$2, [
746
- __props.showCancel ? (openBlock(), createElementBlock("view", {
747
- key: 0,
748
- class: "hlw-modal-btn hlw-modal-btn--cancel",
749
- onTap: withModifiers(onCancel, ["stop"])
750
- }, toDisplayString(__props.cancelText), 33)) : createCommentVNode("", true),
751
- createElementVNode("view", {
752
- class: "hlw-modal-btn hlw-modal-btn--confirm",
753
- onTap: withModifiers(onConfirm, ["stop"])
754
- }, toDisplayString(__props.confirmText), 33)
755
- ])
756
- ], true)
757
- ], 34)
758
- ], 32)) : createCommentVNode("", true);
759
- };
760
- }
761
- });
762
- const index$7 = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["__scopeId", "data-v-91d9e108"]]);
763
- const _hoisted_1$6 = {
764
- key: 1,
765
- class: "hlw-notice-left-icon i-fa6-solid-bullhorn"
766
- };
767
- const _hoisted_2$4 = { class: "hlw-notice-text" };
768
- const _hoisted_3$1 = {
769
- key: 1,
770
- class: "hlw-notice-text hlw-notice-text--ellipsis"
771
- };
772
- const _sfc_main$6 = /* @__PURE__ */ defineComponent({
773
- __name: "index",
774
- props: {
775
- text: { default: "" },
776
- scrollable: { type: Boolean, default: true },
777
- closable: { type: Boolean, default: false },
778
- color: { default: "#ed6a0c" },
779
- background: { default: "#fffbe8" },
780
- speed: { default: 60 },
781
- leftIcon: { default: "" }
782
- },
783
- emits: ["close", "click"],
784
- setup(__props) {
785
- const props = __props;
786
- const closed = ref(false);
787
- const duration = computed(() => Math.max(3, props.text.length * 20 / props.speed));
788
- const animStyle = computed(() => ({ animationDuration: `${duration.value}s` }));
789
- function onClose() {
790
- closed.value = true;
791
- }
792
- return (_ctx, _cache) => {
793
- return !closed.value ? (openBlock(), createElementBlock("view", {
794
- key: 0,
795
- class: "hlw-notice",
796
- style: normalizeStyle({ color: __props.color, background: __props.background })
797
- }, [
798
- __props.leftIcon ? (openBlock(), createElementBlock("view", {
799
- key: 0,
800
- class: normalizeClass([__props.leftIcon, "hlw-notice-left-icon"])
801
- }, null, 2)) : (openBlock(), createElementBlock("view", _hoisted_1$6)),
802
- createElementVNode("view", {
803
- class: "hlw-notice-wrap",
804
- onTap: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("click"))
805
- }, [
806
- __props.scrollable ? (openBlock(), createElementBlock("view", {
807
- key: 0,
808
- class: "hlw-notice-scroll",
809
- style: normalizeStyle(animStyle.value)
810
- }, [
811
- createElementVNode("text", _hoisted_2$4, toDisplayString(__props.text), 1)
812
- ], 4)) : (openBlock(), createElementBlock("text", _hoisted_3$1, toDisplayString(__props.text), 1))
813
- ], 32),
814
- __props.closable ? (openBlock(), createElementBlock("view", {
815
- key: 2,
816
- class: "hlw-notice-close i-fa6-solid-xmark",
817
- onTap: onClose
818
- }, null, 32)) : createCommentVNode("", true)
819
- ], 4)) : createCommentVNode("", true);
820
- };
821
- }
822
- });
823
- const index$6 = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__scopeId", "data-v-7a758299"]]);
824
4
  const FONT_SCALE_KEY = "hlw_font_scale";
825
5
  const FONT_PRESETS = {
826
6
  small: {
@@ -924,290 +104,6 @@ function useThemePageStyle() {
924
104
  onUnmounted(() => uni.$off(THEME_CHANGE_EVENT, onThemeChange));
925
105
  return { themePageStyle };
926
106
  }
927
- const _hoisted_1$5 = { class: "hlw-page-header" };
928
- const _hoisted_2$3 = { class: "hlw-page-footer" };
929
- const _sfc_main$5 = /* @__PURE__ */ defineComponent({
930
- __name: "index",
931
- props: {
932
- title: { default: "" },
933
- isBack: { type: Boolean, default: false },
934
- bgClass: { default: "" }
935
- },
936
- setup(__props) {
937
- const props = __props;
938
- const { themePageStyle } = useThemePageStyle();
939
- return (_ctx, _cache) => {
940
- const _component_hlw_header = resolveComponent("hlw-header");
941
- const _component_scroll_view = resolveComponent("scroll-view");
942
- return openBlock(), createElementBlock("view", {
943
- class: "hlw-page",
944
- style: normalizeStyle(unref(themePageStyle))
945
- }, [
946
- createElementVNode("view", _hoisted_1$5, [
947
- renderSlot(_ctx.$slots, "header", {}, () => [
948
- props.title || props.isBack ? (openBlock(), createBlock(_component_hlw_header, {
949
- key: 0,
950
- title: props.title,
951
- "is-back": props.isBack,
952
- "bg-class": props.bgClass
953
- }, null, 8, ["title", "is-back", "bg-class"])) : createCommentVNode("", true)
954
- ], true)
955
- ]),
956
- createVNode(_component_scroll_view, {
957
- class: "hlw-page-content",
958
- "scroll-y": true,
959
- "enable-flex": true,
960
- enhanced: true,
961
- "show-scrollbar": false,
962
- style: normalizeStyle(unref(themePageStyle))
963
- }, {
964
- default: withCtx(() => [
965
- renderSlot(_ctx.$slots, "default", {}, void 0, true)
966
- ]),
967
- _: 3
968
- }, 8, ["style"]),
969
- createElementVNode("view", _hoisted_2$3, [
970
- renderSlot(_ctx.$slots, "footer", {}, void 0, true)
971
- ])
972
- ], 4);
973
- };
974
- }
975
- });
976
- const index$5 = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-01bb7796"]]);
977
- const _hoisted_1$4 = {
978
- key: 0,
979
- class: "hlw-popup-header"
980
- };
981
- const _hoisted_2$2 = { class: "hlw-popup-title" };
982
- const _sfc_main$4 = /* @__PURE__ */ defineComponent({
983
- __name: "index",
984
- props: {
985
- show: { type: Boolean, default: false },
986
- position: { default: "bottom" },
987
- round: { type: Boolean, default: true },
988
- closable: { type: Boolean, default: true },
989
- title: { default: "" }
990
- },
991
- emits: ["update:show", "close"],
992
- setup(__props, { emit: __emit }) {
993
- const emit = __emit;
994
- function onClose() {
995
- emit("update:show", false);
996
- emit("close");
997
- }
998
- return (_ctx, _cache) => {
999
- return __props.show ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
1000
- createElementVNode("view", {
1001
- class: "hlw-popup-mask",
1002
- onTap: withModifiers(onClose, ["self"])
1003
- }, null, 32),
1004
- createElementVNode("view", {
1005
- class: normalizeClass(["hlw-popup", [`hlw-popup--${__props.position}`, { "hlw-popup--round": __props.round }]]),
1006
- onTap: _cache[0] || (_cache[0] = withModifiers(() => {
1007
- }, ["stop"]))
1008
- }, [
1009
- __props.title || __props.closable ? (openBlock(), createElementBlock("view", _hoisted_1$4, [
1010
- createElementVNode("text", _hoisted_2$2, toDisplayString(__props.title), 1),
1011
- __props.closable ? (openBlock(), createElementBlock("view", {
1012
- key: 0,
1013
- class: "hlw-popup-close i-fa6-solid-xmark",
1014
- onTap: onClose
1015
- }, null, 32)) : createCommentVNode("", true)
1016
- ])) : createCommentVNode("", true),
1017
- renderSlot(_ctx.$slots, "default", {}, void 0, true)
1018
- ], 34)
1019
- ], 64)) : createCommentVNode("", true);
1020
- };
1021
- }
1022
- });
1023
- const index$4 = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-be12aee0"]]);
1024
- const _hoisted_1$3 = ["value", "placeholder", "disabled"];
1025
- const _sfc_main$3 = /* @__PURE__ */ defineComponent({
1026
- __name: "index",
1027
- props: {
1028
- modelValue: { default: "" },
1029
- placeholder: { default: "搜索" },
1030
- disabled: { type: Boolean, default: false },
1031
- clearable: { type: Boolean, default: true },
1032
- shape: { default: "round" },
1033
- background: { default: "" }
1034
- },
1035
- emits: ["update:modelValue", "search", "clear", "focus", "blur"],
1036
- setup(__props, { emit: __emit }) {
1037
- const emit = __emit;
1038
- function onInput(e) {
1039
- var _a;
1040
- emit("update:modelValue", ((_a = e == null ? void 0 : e.detail) == null ? void 0 : _a.value) ?? "");
1041
- }
1042
- function onClear() {
1043
- emit("update:modelValue", "");
1044
- emit("clear");
1045
- }
1046
- return (_ctx, _cache) => {
1047
- return openBlock(), createElementBlock("view", {
1048
- class: "hlw-search",
1049
- style: normalizeStyle(__props.background ? { background: __props.background } : {})
1050
- }, [
1051
- createElementVNode("view", {
1052
- class: normalizeClass(["hlw-search-box", { "hlw-search-box--round": __props.shape === "round" }])
1053
- }, [
1054
- _cache[3] || (_cache[3] = createElementVNode("view", { class: "hlw-search-icon i-fa6-solid-magnifying-glass" }, null, -1)),
1055
- createElementVNode("input", {
1056
- class: "hlw-search-input",
1057
- type: "text",
1058
- value: __props.modelValue,
1059
- placeholder: __props.placeholder,
1060
- disabled: __props.disabled,
1061
- "confirm-type": "search",
1062
- onInput,
1063
- onConfirm: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("search", __props.modelValue)),
1064
- onFocus: _cache[1] || (_cache[1] = ($event) => _ctx.$emit("focus")),
1065
- onBlur: _cache[2] || (_cache[2] = ($event) => _ctx.$emit("blur"))
1066
- }, null, 40, _hoisted_1$3),
1067
- __props.clearable && __props.modelValue ? (openBlock(), createElementBlock("view", {
1068
- key: 0,
1069
- class: "hlw-search-clear i-fa6-solid-xmark",
1070
- onTap: onClear
1071
- }, null, 32)) : createCommentVNode("", true)
1072
- ], 2)
1073
- ], 4);
1074
- };
1075
- }
1076
- });
1077
- const index$3 = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-4fe1bfab"]]);
1078
- const _hoisted_1$2 = { class: "hlw-skeleton-content" };
1079
- const _hoisted_2$1 = {
1080
- key: 0,
1081
- class: "hlw-skeleton-title"
1082
- };
1083
- const _sfc_main$2 = /* @__PURE__ */ defineComponent({
1084
- __name: "index",
1085
- props: {
1086
- loading: { type: Boolean, default: true },
1087
- rows: { default: 3 },
1088
- avatar: { type: Boolean, default: false },
1089
- title: { type: Boolean, default: true },
1090
- animate: { type: Boolean, default: true },
1091
- avatarSize: { default: "medium" }
1092
- },
1093
- setup(__props) {
1094
- return (_ctx, _cache) => {
1095
- return __props.loading ? (openBlock(), createElementBlock("view", {
1096
- key: 0,
1097
- class: normalizeClass(["hlw-skeleton", { "hlw-skeleton--animate": __props.animate }])
1098
- }, [
1099
- __props.avatar ? (openBlock(), createElementBlock("view", {
1100
- key: 0,
1101
- class: normalizeClass(["hlw-skeleton-avatar", `hlw-skeleton-avatar--${__props.avatarSize}`])
1102
- }, null, 2)) : createCommentVNode("", true),
1103
- createElementVNode("view", _hoisted_1$2, [
1104
- __props.title ? (openBlock(), createElementBlock("view", _hoisted_2$1)) : createCommentVNode("", true),
1105
- (openBlock(true), createElementBlock(Fragment, null, renderList(__props.rows, (i) => {
1106
- return openBlock(), createElementBlock("view", {
1107
- key: i,
1108
- class: "hlw-skeleton-row",
1109
- style: normalizeStyle({ width: i === __props.rows ? "60%" : "100%" })
1110
- }, null, 4);
1111
- }), 128))
1112
- ])
1113
- ], 2)) : renderSlot(_ctx.$slots, "default", { key: 1 }, void 0, true);
1114
- };
1115
- }
1116
- });
1117
- const index$2 = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-bc3155a2"]]);
1118
- const _hoisted_1$1 = { class: "hlw-tabs-wrap" };
1119
- const _hoisted_2 = ["onTap"];
1120
- const _hoisted_3 = { class: "hlw-tab-text" };
1121
- const _hoisted_4 = {
1122
- key: 0,
1123
- class: "hlw-tab-badge"
1124
- };
1125
- const _sfc_main$1 = /* @__PURE__ */ defineComponent({
1126
- __name: "index",
1127
- props: {
1128
- modelValue: { default: 0 },
1129
- items: { default: () => [] },
1130
- scrollable: { type: Boolean, default: false },
1131
- lineWidth: { default: "40rpx" }
1132
- },
1133
- emits: ["update:modelValue", "change"],
1134
- setup(__props, { emit: __emit }) {
1135
- const emit = __emit;
1136
- function onChange(index2) {
1137
- emit("update:modelValue", index2);
1138
- emit("change", index2);
1139
- }
1140
- return (_ctx, _cache) => {
1141
- const _component_scroll_view = resolveComponent("scroll-view");
1142
- return openBlock(), createBlock(_component_scroll_view, {
1143
- class: "hlw-tabs",
1144
- "scroll-x": __props.scrollable,
1145
- enhanced: true,
1146
- "show-scrollbar": false
1147
- }, {
1148
- default: withCtx(() => [
1149
- createElementVNode("view", _hoisted_1$1, [
1150
- (openBlock(true), createElementBlock(Fragment, null, renderList(__props.items, (item, index2) => {
1151
- return openBlock(), createElementBlock("view", {
1152
- key: index2,
1153
- class: normalizeClass(["hlw-tab", { "hlw-tab--active": __props.modelValue === index2 }]),
1154
- onTap: ($event) => onChange(index2)
1155
- }, [
1156
- createElementVNode("text", _hoisted_3, toDisplayString(typeof item === "string" ? item : item.label), 1),
1157
- typeof item !== "string" && item.badge ? (openBlock(), createElementBlock("view", _hoisted_4, toDisplayString(item.badge), 1)) : createCommentVNode("", true),
1158
- __props.modelValue === index2 ? (openBlock(), createElementBlock("view", {
1159
- key: 1,
1160
- class: "hlw-tab-line",
1161
- style: normalizeStyle({ width: __props.lineWidth })
1162
- }, null, 4)) : createCommentVNode("", true)
1163
- ], 42, _hoisted_2);
1164
- }), 128))
1165
- ])
1166
- ]),
1167
- _: 1
1168
- }, 8, ["scroll-x"]);
1169
- };
1170
- }
1171
- });
1172
- const index$1 = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-5a47c034"]]);
1173
- const _hoisted_1 = { class: "hlw-tag-text" };
1174
- const _sfc_main = /* @__PURE__ */ defineComponent({
1175
- __name: "index",
1176
- props: {
1177
- type: { default: "primary" },
1178
- plain: { type: Boolean, default: false },
1179
- closable: { type: Boolean, default: false },
1180
- size: { default: "medium" },
1181
- round: { type: Boolean, default: false },
1182
- color: { default: "" }
1183
- },
1184
- emits: ["click", "close"],
1185
- setup(__props) {
1186
- const props = __props;
1187
- const customStyle = computed(() => {
1188
- if (!props.color)
1189
- return {};
1190
- return props.plain ? { color: props.color, borderColor: props.color, background: "transparent" } : { background: props.color, color: "#fff", borderColor: props.color };
1191
- });
1192
- return (_ctx, _cache) => {
1193
- return openBlock(), createElementBlock("view", {
1194
- class: normalizeClass(["hlw-tag", [`hlw-tag--${__props.type}`, `hlw-tag--${__props.size}`, { "hlw-tag--plain": __props.plain, "hlw-tag--round": __props.round }]]),
1195
- style: normalizeStyle(customStyle.value),
1196
- onTap: _cache[1] || (_cache[1] = ($event) => _ctx.$emit("click"))
1197
- }, [
1198
- createElementVNode("text", _hoisted_1, [
1199
- renderSlot(_ctx.$slots, "default", {}, void 0, true)
1200
- ]),
1201
- __props.closable ? (openBlock(), createElementBlock("view", {
1202
- key: 0,
1203
- class: "hlw-tag-close i-fa6-solid-xmark",
1204
- onTap: _cache[0] || (_cache[0] = withModifiers(($event) => _ctx.$emit("close"), ["stop"]))
1205
- }, null, 32)) : createCommentVNode("", true)
1206
- ], 38);
1207
- };
1208
- }
1209
- });
1210
- const index = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-e4ea56ad"]]);
1211
107
  const useThemeStore = defineStore(
1212
108
  "theme",
1213
109
  () => {
@@ -1249,24 +145,6 @@ export {
1249
145
  DEFAULT_THEMES,
1250
146
  FONT_PRESETS,
1251
147
  FONT_SCALE_KEY,
1252
- _sfc_main$h as HlwAd,
1253
- index$g as HlwAvatar,
1254
- index$f as HlwButton,
1255
- index$e as HlwCard,
1256
- index$d as HlwCell,
1257
- index$c as HlwDivider,
1258
- index$b as HlwEmpty,
1259
- index$a as HlwHeader,
1260
- index$9 as HlwLoading,
1261
- index$8 as HlwMenu,
1262
- index$7 as HlwModal,
1263
- index$6 as HlwNoticeBar,
1264
- index$5 as HlwPage,
1265
- index$4 as HlwPopup,
1266
- index$3 as HlwSearch,
1267
- index$2 as HlwSkeleton,
1268
- index$1 as HlwTabs,
1269
- index as HlwTag,
1270
148
  THEME_CHANGE_EVENT,
1271
149
  THEME_COLOR_KEY,
1272
150
  buildThemeStyle,