@hlw-uni/mp-vue 1.0.35 → 1.1.1

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,7 +1,7 @@
1
- import { defineComponent, resolveComponent, openBlock, createBlock, ref, computed, createElementBlock, normalizeClass, createElementVNode, toDisplayString, useSlots, renderSlot, createCommentVNode, normalizeStyle, unref, Fragment, renderList, withCtx, createVNode, onMounted, onUnmounted } from "vue";
1
+ import { defineComponent, resolveComponent, openBlock, createBlock, ref, computed, createElementBlock, normalizeClass, createElementVNode, toDisplayString, createCommentVNode, renderSlot, useSlots, withCtx, createTextVNode, normalizeStyle, unref, Fragment, renderList, withModifiers, createVNode, onMounted, onUnmounted } from "vue";
2
2
  import { useColor } from "@hlw-uni/mp-core";
3
3
  import { defineStore } from "pinia";
4
- const _sfc_main$7 = /* @__PURE__ */ defineComponent({
4
+ const _sfc_main$h = /* @__PURE__ */ defineComponent({
5
5
  ...{ name: "HlwAd" },
6
6
  __name: "index",
7
7
  props: {
@@ -32,13 +32,13 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
32
32
  };
33
33
  }
34
34
  });
35
- const _hoisted_1$6 = ["src"];
36
- const _hoisted_2$6 = {
35
+ const _hoisted_1$f = ["src"];
36
+ const _hoisted_2$d = {
37
37
  key: 1,
38
38
  class: "hlw-avatar__placeholder"
39
39
  };
40
- const _hoisted_3$4 = { class: "hlw-avatar__initial" };
41
- const _sfc_main$6 = /* @__PURE__ */ defineComponent({
40
+ const _hoisted_3$8 = { class: "hlw-avatar__initial" };
41
+ const _sfc_main$g = /* @__PURE__ */ defineComponent({
42
42
  __name: "index",
43
43
  props: {
44
44
  src: {},
@@ -63,8 +63,8 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
63
63
  src: __props.src,
64
64
  mode: "aspectFill",
65
65
  onError: _cache[0] || (_cache[0] = ($event) => loadError.value = true)
66
- }, null, 40, _hoisted_1$6)) : (openBlock(), createElementBlock("view", _hoisted_2$6, [
67
- createElementVNode("text", _hoisted_3$4, toDisplayString(initial.value), 1)
66
+ }, null, 40, _hoisted_1$f)) : (openBlock(), createElementBlock("view", _hoisted_2$d, [
67
+ createElementVNode("text", _hoisted_3$8, toDisplayString(initial.value), 1)
68
68
  ]))
69
69
  ], 2);
70
70
  };
@@ -77,40 +77,80 @@ const _export_sfc = (sfc, props) => {
77
77
  }
78
78
  return target;
79
79
  };
80
- const index$6 = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__scopeId", "data-v-89dcbc96"]]);
81
- const _hoisted_1$5 = {
80
+ const index$g = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["__scopeId", "data-v-19006b2d"]]);
81
+ const _hoisted_1$e = ["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$e);
117
+ };
118
+ }
119
+ });
120
+ const index$f = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["__scopeId", "data-v-19a9c118"]]);
121
+ const _hoisted_1$d = {
82
122
  key: 0,
83
123
  class: "hlw-card-header"
84
124
  };
85
- const _hoisted_2$5 = { class: "hlw-card-header-inner" };
86
- const _hoisted_3$3 = { class: "hlw-card-header-left" };
87
- const _hoisted_4$2 = {
125
+ const _hoisted_2$b = { class: "hlw-card-header-inner" };
126
+ const _hoisted_3$7 = { class: "hlw-card-header-left" };
127
+ const _hoisted_4$4 = {
88
128
  key: 0,
89
129
  class: "hlw-card-title"
90
130
  };
91
- const _hoisted_5$1 = {
131
+ const _hoisted_5$2 = {
92
132
  key: 0,
93
133
  class: "hlw-card-header-right"
94
134
  };
95
- const _hoisted_6$1 = {
135
+ const _hoisted_6$2 = {
96
136
  key: 0,
97
137
  class: "hlw-card-extra"
98
138
  };
99
- const _hoisted_7$1 = {
139
+ const _hoisted_7$2 = {
100
140
  key: 1,
101
141
  class: "hlw-card-divider"
102
142
  };
103
- const _hoisted_8$1 = {
143
+ const _hoisted_8$2 = {
104
144
  key: 2,
105
145
  class: "hlw-card-footer"
106
146
  };
107
- const _hoisted_9$1 = { class: "hlw-card-footer-inner" };
108
- const _hoisted_10$1 = { class: "hlw-card-footer-left" };
109
- const _hoisted_11$1 = {
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 = {
110
150
  key: 0,
111
151
  class: "hlw-card-footer-right"
112
152
  };
113
- const _sfc_main$5 = /* @__PURE__ */ defineComponent({
153
+ const _sfc_main$e = /* @__PURE__ */ defineComponent({
114
154
  __name: "index",
115
155
  props: {
116
156
  title: { default: "" },
@@ -141,35 +181,35 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
141
181
  __props.border ? "hlw-card--bordered" : ""
142
182
  ]])
143
183
  }, [
144
- hasHeader.value ? (openBlock(), createElementBlock("view", _hoisted_1$5, [
184
+ hasHeader.value ? (openBlock(), createElementBlock("view", _hoisted_1$d, [
145
185
  renderSlot(_ctx.$slots, "header", {}, () => [
146
- createElementVNode("view", _hoisted_2$5, [
147
- createElementVNode("view", _hoisted_3$3, [
186
+ createElementVNode("view", _hoisted_2$b, [
187
+ createElementVNode("view", _hoisted_3$7, [
148
188
  renderSlot(_ctx.$slots, "header-left", {}, () => [
149
- __props.title ? (openBlock(), createElementBlock("text", _hoisted_4$2, toDisplayString(__props.title), 1)) : createCommentVNode("", true)
189
+ __props.title ? (openBlock(), createElementBlock("text", _hoisted_4$4, toDisplayString(__props.title), 1)) : createCommentVNode("", true)
150
190
  ], true)
151
191
  ]),
152
- _ctx.$slots["header-right"] || __props.extra ? (openBlock(), createElementBlock("view", _hoisted_5$1, [
192
+ _ctx.$slots["header-right"] || __props.extra ? (openBlock(), createElementBlock("view", _hoisted_5$2, [
153
193
  renderSlot(_ctx.$slots, "header-right", {}, () => [
154
- __props.extra ? (openBlock(), createElementBlock("text", _hoisted_6$1, toDisplayString(__props.extra), 1)) : createCommentVNode("", true)
194
+ __props.extra ? (openBlock(), createElementBlock("text", _hoisted_6$2, toDisplayString(__props.extra), 1)) : createCommentVNode("", true)
155
195
  ], true)
156
196
  ])) : createCommentVNode("", true)
157
197
  ])
158
198
  ], true)
159
199
  ])) : createCommentVNode("", true),
160
- showDivider.value ? (openBlock(), createElementBlock("view", _hoisted_7$1)) : createCommentVNode("", true),
200
+ showDivider.value ? (openBlock(), createElementBlock("view", _hoisted_7$2)) : createCommentVNode("", true),
161
201
  createElementVNode("view", {
162
202
  class: normalizeClass(["hlw-card-body", { "hlw-card-body--padded": __props.padding }])
163
203
  }, [
164
204
  renderSlot(_ctx.$slots, "default", {}, void 0, true)
165
205
  ], 2),
166
- hasFooter.value ? (openBlock(), createElementBlock("view", _hoisted_8$1, [
206
+ hasFooter.value ? (openBlock(), createElementBlock("view", _hoisted_8$2, [
167
207
  renderSlot(_ctx.$slots, "footer", {}, () => [
168
- createElementVNode("view", _hoisted_9$1, [
169
- createElementVNode("view", _hoisted_10$1, [
208
+ createElementVNode("view", _hoisted_9$2, [
209
+ createElementVNode("view", _hoisted_10$2, [
170
210
  renderSlot(_ctx.$slots, "footer-left", {}, void 0, true)
171
211
  ]),
172
- _ctx.$slots["footer-right"] ? (openBlock(), createElementBlock("view", _hoisted_11$1, [
212
+ _ctx.$slots["footer-right"] ? (openBlock(), createElementBlock("view", _hoisted_11$2, [
173
213
  renderSlot(_ctx.$slots, "footer-right", {}, void 0, true)
174
214
  ])) : createCommentVNode("", true)
175
215
  ])
@@ -179,15 +219,148 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
179
219
  };
180
220
  }
181
221
  });
182
- const index$5 = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-cf55252e"]]);
183
- const _hoisted_1$4 = { class: "hlw-empty" };
184
- const _hoisted_2$4 = ["src"];
185
- const _hoisted_3$2 = {
222
+ const index$e = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["__scopeId", "data-v-cf55252e"]]);
223
+ const _hoisted_1$c = {
224
+ key: 0,
225
+ class: "hlw-cell-icon"
226
+ };
227
+ const _hoisted_2$a = { class: "hlw-cell-body" };
228
+ const _hoisted_3$6 = { 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 = {
186
247
  key: 1,
187
- class: "hlw-empty__icon"
248
+ class: "hlw-cell-arrow"
188
249
  };
189
- const _hoisted_4$1 = { class: "hlw-empty__text" };
190
- const _sfc_main$4 = /* @__PURE__ */ defineComponent({
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$c, [
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$6, [
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$b = {
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$b, [
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$a = { class: "hlw-empty" };
357
+ const _hoisted_2$9 = ["src"];
358
+ const _hoisted_3$5 = {
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({
191
364
  __name: "index",
192
365
  props: {
193
366
  text: {},
@@ -195,29 +368,29 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
195
368
  },
196
369
  setup(__props) {
197
370
  return (_ctx, _cache) => {
198
- return openBlock(), createElementBlock("view", _hoisted_1$4, [
371
+ return openBlock(), createElementBlock("view", _hoisted_1$a, [
199
372
  __props.image ? (openBlock(), createElementBlock("image", {
200
373
  key: 0,
201
374
  class: "hlw-empty__image",
202
375
  src: __props.image,
203
376
  mode: "aspectFit"
204
- }, null, 8, _hoisted_2$4)) : (openBlock(), createElementBlock("text", _hoisted_3$2, "📦")),
205
- createElementVNode("text", _hoisted_4$1, toDisplayString(__props.text || "暂无数据"), 1),
377
+ }, null, 8, _hoisted_2$9)) : (openBlock(), createElementBlock("view", _hoisted_3$5)),
378
+ createElementVNode("text", _hoisted_4$2, toDisplayString(__props.text || "暂无数据"), 1),
206
379
  renderSlot(_ctx.$slots, "default", {}, void 0, true)
207
380
  ]);
208
381
  };
209
382
  }
210
383
  });
211
- const index$4 = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-08b8d8fe"]]);
212
- const _hoisted_1$3 = {
384
+ const index$b = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["__scopeId", "data-v-94fefc47"]]);
385
+ const _hoisted_1$9 = {
213
386
  key: 0,
214
387
  class: "header-placeholder"
215
388
  };
216
- const _hoisted_2$3 = {
389
+ const _hoisted_2$8 = {
217
390
  key: 0,
218
391
  class: "header-title header-title--center"
219
392
  };
220
- const _sfc_main$3 = /* @__PURE__ */ defineComponent({
393
+ const _sfc_main$a = /* @__PURE__ */ defineComponent({
221
394
  __name: "index",
222
395
  props: {
223
396
  extraHeight: { default: 0 },
@@ -304,9 +477,9 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
304
477
  }, toDisplayString(props.title), 5)
305
478
  ], true)
306
479
  ], 2),
307
- props.titleAlign === "center" ? (openBlock(), createElementBlock("view", _hoisted_1$3)) : createCommentVNode("", true)
480
+ props.titleAlign === "center" ? (openBlock(), createElementBlock("view", _hoisted_1$9)) : createCommentVNode("", true)
308
481
  ], 64)) : renderSlot(_ctx.$slots, "default", { key: 1 }, () => [
309
- props.title ? (openBlock(), createElementBlock("view", _hoisted_2$3, [
482
+ props.title ? (openBlock(), createElementBlock("view", _hoisted_2$8, [
310
483
  createElementVNode("text", {
311
484
  class: "header-title-text",
312
485
  style: normalizeStyle(titleStyle.value)
@@ -318,37 +491,37 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
318
491
  };
319
492
  }
320
493
  });
321
- const index$3 = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-fa8f2a18"]]);
322
- const _hoisted_1$2 = { class: "hlw-loading" };
323
- const _hoisted_2$2 = {
494
+ const index$a = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["__scopeId", "data-v-b85e90ac"]]);
495
+ const _hoisted_1$8 = { class: "hlw-loading" };
496
+ const _hoisted_2$7 = {
324
497
  key: 0,
325
498
  class: "hlw-loading__text"
326
499
  };
327
- const _sfc_main$2 = /* @__PURE__ */ defineComponent({
500
+ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
328
501
  __name: "index",
329
502
  props: {
330
503
  text: {}
331
504
  },
332
505
  setup(__props) {
333
506
  return (_ctx, _cache) => {
334
- return openBlock(), createElementBlock("view", _hoisted_1$2, [
507
+ return openBlock(), createElementBlock("view", _hoisted_1$8, [
335
508
  _cache[0] || (_cache[0] = createElementVNode("view", { class: "hlw-loading__spinner" }, null, -1)),
336
- __props.text ? (openBlock(), createElementBlock("text", _hoisted_2$2, toDisplayString(__props.text), 1)) : createCommentVNode("", true)
509
+ __props.text ? (openBlock(), createElementBlock("text", _hoisted_2$7, toDisplayString(__props.text), 1)) : createCommentVNode("", true)
337
510
  ]);
338
511
  };
339
512
  }
340
513
  });
341
- const index$2 = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-14242381"]]);
342
- const _hoisted_1$1 = {
514
+ const index$9 = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["__scopeId", "data-v-fd9272d5"]]);
515
+ const _hoisted_1$7 = {
343
516
  key: 0,
344
517
  class: "hlw-menu-title"
345
518
  };
346
- const _hoisted_2$1 = {
519
+ const _hoisted_2$6 = {
347
520
  key: 1,
348
521
  class: "hlw-menu-title-divider"
349
522
  };
350
- const _hoisted_3$1 = { class: "hlw-menu-left" };
351
- const _hoisted_4 = { class: "hlw-menu-label" };
523
+ const _hoisted_3$4 = { class: "hlw-menu-left" };
524
+ const _hoisted_4$1 = { class: "hlw-menu-label" };
352
525
  const _hoisted_5 = { class: "hlw-menu-right" };
353
526
  const _hoisted_6 = {
354
527
  key: 0,
@@ -375,7 +548,7 @@ const _hoisted_15 = { class: "hlw-menu-grid-label" };
375
548
  const _hoisted_16 = ["onClick"];
376
549
  const _hoisted_17 = { class: "hlw-menu-grid-icon-wrap" };
377
550
  const _hoisted_18 = { class: "hlw-menu-grid-label" };
378
- const _sfc_main$1 = /* @__PURE__ */ defineComponent({
551
+ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
379
552
  __name: "index",
380
553
  props: {
381
554
  items: {},
@@ -397,10 +570,10 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
397
570
  return openBlock(), createElementBlock("view", {
398
571
  class: normalizeClass(["hlw-menu", { "hlw-menu--no-border": !props.border }])
399
572
  }, [
400
- props.title ? (openBlock(), createElementBlock("view", _hoisted_1$1, [
573
+ props.title ? (openBlock(), createElementBlock("view", _hoisted_1$7, [
401
574
  createElementVNode("text", null, toDisplayString(props.title), 1)
402
575
  ])) : createCommentVNode("", true),
403
- props.title ? (openBlock(), createElementBlock("view", _hoisted_2$1)) : createCommentVNode("", true),
576
+ props.title ? (openBlock(), createElementBlock("view", _hoisted_2$6)) : createCommentVNode("", true),
404
577
  props.mode === "list" ? (openBlock(true), createElementBlock(Fragment, { key: 2 }, renderList(visibleItems.value, (item, index2) => {
405
578
  return openBlock(), createElementBlock(Fragment, { key: index2 }, [
406
579
  item.url ? (openBlock(), createBlock(_component_navigator, {
@@ -410,7 +583,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
410
583
  "hover-class": "hlw-menu-item--active"
411
584
  }, {
412
585
  default: withCtx(() => [
413
- createElementVNode("view", _hoisted_3$1, [
586
+ createElementVNode("view", _hoisted_3$4, [
414
587
  createElementVNode("view", {
415
588
  class: normalizeClass(["hlw-menu-icon", `hlw-menu-icon--${item.iconTheme || "slate"}`])
416
589
  }, [
@@ -418,7 +591,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
418
591
  class: normalizeClass(item.icon)
419
592
  }, null, 2)
420
593
  ], 2),
421
- createElementVNode("text", _hoisted_4, toDisplayString(item.label), 1)
594
+ createElementVNode("text", _hoisted_4$1, toDisplayString(item.label), 1)
422
595
  ]),
423
596
  createElementVNode("view", _hoisted_5, [
424
597
  item.value ? (openBlock(), createElementBlock("text", _hoisted_6, toDisplayString(item.value), 1)) : createCommentVNode("", true),
@@ -516,11 +689,137 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
516
689
  };
517
690
  }
518
691
  });
519
- const index$1 = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-2d7cd322"]]);
520
- const _hoisted_1 = { class: "hlw-page" };
521
- const _hoisted_2 = { class: "hlw-page-header" };
522
- const _hoisted_3 = { class: "hlw-page-footer" };
523
- const _sfc_main = /* @__PURE__ */ defineComponent({
692
+ const index$8 = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["__scopeId", "data-v-2d7cd322"]]);
693
+ const _hoisted_1$6 = {
694
+ key: 0,
695
+ class: "hlw-modal-title"
696
+ };
697
+ const _hoisted_2$5 = { class: "hlw-modal-body" };
698
+ const _hoisted_3$3 = { 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 emit = __emit;
712
+ function close() {
713
+ emit("update:show", false);
714
+ }
715
+ function onMask() {
716
+ close();
717
+ }
718
+ function onConfirm() {
719
+ emit("confirm");
720
+ close();
721
+ }
722
+ function onCancel() {
723
+ emit("cancel");
724
+ close();
725
+ }
726
+ return (_ctx, _cache) => {
727
+ return __props.show ? (openBlock(), createElementBlock("view", {
728
+ key: 0,
729
+ class: "hlw-modal-mask",
730
+ onTap: withModifiers(onMask, ["self"])
731
+ }, [
732
+ createElementVNode("view", {
733
+ class: normalizeClass(["hlw-modal", { "hlw-modal--show": __props.show }])
734
+ }, [
735
+ __props.title ? (openBlock(), createElementBlock("view", _hoisted_1$6, toDisplayString(__props.title), 1)) : createCommentVNode("", true),
736
+ createElementVNode("view", _hoisted_2$5, [
737
+ renderSlot(_ctx.$slots, "default", {}, void 0, true)
738
+ ]),
739
+ renderSlot(_ctx.$slots, "footer", {}, () => [
740
+ createElementVNode("view", _hoisted_3$3, [
741
+ __props.showCancel ? (openBlock(), createElementBlock("view", {
742
+ key: 0,
743
+ class: "hlw-modal-btn hlw-modal-btn--cancel",
744
+ onTap: onCancel
745
+ }, toDisplayString(__props.cancelText), 33)) : createCommentVNode("", true),
746
+ createElementVNode("view", {
747
+ class: "hlw-modal-btn hlw-modal-btn--confirm",
748
+ onTap: onConfirm
749
+ }, toDisplayString(__props.confirmText), 33)
750
+ ])
751
+ ], true)
752
+ ], 2)
753
+ ], 32)) : createCommentVNode("", true);
754
+ };
755
+ }
756
+ });
757
+ const index$7 = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["__scopeId", "data-v-397b9549"]]);
758
+ const _hoisted_1$5 = {
759
+ key: 1,
760
+ class: "hlw-notice-left-icon i-fa6-solid-bullhorn"
761
+ };
762
+ const _hoisted_2$4 = { class: "hlw-notice-text" };
763
+ const _hoisted_3$2 = {
764
+ key: 1,
765
+ class: "hlw-notice-text hlw-notice-text--ellipsis"
766
+ };
767
+ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
768
+ __name: "index",
769
+ props: {
770
+ text: { default: "" },
771
+ scrollable: { type: Boolean, default: true },
772
+ closable: { type: Boolean, default: false },
773
+ color: { default: "#ed6a0c" },
774
+ background: { default: "#fffbe8" },
775
+ speed: { default: 60 },
776
+ leftIcon: { default: "" }
777
+ },
778
+ emits: ["close", "click"],
779
+ setup(__props) {
780
+ const props = __props;
781
+ const closed = ref(false);
782
+ const duration = computed(() => Math.max(3, props.text.length * 20 / props.speed));
783
+ const animStyle = computed(() => ({ animationDuration: `${duration.value}s` }));
784
+ function onClose() {
785
+ closed.value = true;
786
+ }
787
+ return (_ctx, _cache) => {
788
+ return !closed.value ? (openBlock(), createElementBlock("view", {
789
+ key: 0,
790
+ class: "hlw-notice",
791
+ style: normalizeStyle({ color: __props.color, background: __props.background })
792
+ }, [
793
+ __props.leftIcon ? (openBlock(), createElementBlock("view", {
794
+ key: 0,
795
+ class: normalizeClass([__props.leftIcon, "hlw-notice-left-icon"])
796
+ }, null, 2)) : (openBlock(), createElementBlock("view", _hoisted_1$5)),
797
+ createElementVNode("view", {
798
+ class: "hlw-notice-wrap",
799
+ onTap: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("click"))
800
+ }, [
801
+ __props.scrollable ? (openBlock(), createElementBlock("view", {
802
+ key: 0,
803
+ class: "hlw-notice-scroll",
804
+ style: normalizeStyle(animStyle.value)
805
+ }, [
806
+ createElementVNode("text", _hoisted_2$4, toDisplayString(__props.text), 1)
807
+ ], 4)) : (openBlock(), createElementBlock("text", _hoisted_3$2, toDisplayString(__props.text), 1))
808
+ ], 32),
809
+ __props.closable ? (openBlock(), createElementBlock("view", {
810
+ key: 2,
811
+ class: "hlw-notice-close i-fa6-solid-xmark",
812
+ onTap: onClose
813
+ }, null, 32)) : createCommentVNode("", true)
814
+ ], 4)) : createCommentVNode("", true);
815
+ };
816
+ }
817
+ });
818
+ const index$6 = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__scopeId", "data-v-7a758299"]]);
819
+ const _hoisted_1$4 = { class: "hlw-page" };
820
+ const _hoisted_2$3 = { class: "hlw-page-header" };
821
+ const _hoisted_3$1 = { class: "hlw-page-footer" };
822
+ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
524
823
  __name: "index",
525
824
  props: {
526
825
  title: { default: "" },
@@ -532,8 +831,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
532
831
  return (_ctx, _cache) => {
533
832
  const _component_hlw_header = resolveComponent("hlw-header");
534
833
  const _component_scroll_view = resolveComponent("scroll-view");
535
- return openBlock(), createElementBlock("view", _hoisted_1, [
536
- createElementVNode("view", _hoisted_2, [
834
+ return openBlock(), createElementBlock("view", _hoisted_1$4, [
835
+ createElementVNode("view", _hoisted_2$3, [
537
836
  renderSlot(_ctx.$slots, "header", {}, () => [
538
837
  props.title || props.isBack ? (openBlock(), createBlock(_component_hlw_header, {
539
838
  key: 0,
@@ -555,14 +854,244 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
555
854
  ]),
556
855
  _: 3
557
856
  }),
558
- createElementVNode("view", _hoisted_3, [
857
+ createElementVNode("view", _hoisted_3$1, [
559
858
  renderSlot(_ctx.$slots, "footer", {}, void 0, true)
560
859
  ])
561
860
  ]);
562
861
  };
563
862
  }
564
863
  });
565
- const index = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-d8833363"]]);
864
+ const index$5 = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-0cf37585"]]);
865
+ const _hoisted_1$3 = {
866
+ key: 0,
867
+ class: "hlw-popup-header"
868
+ };
869
+ const _hoisted_2$2 = { class: "hlw-popup-title" };
870
+ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
871
+ __name: "index",
872
+ props: {
873
+ show: { type: Boolean, default: false },
874
+ position: { default: "bottom" },
875
+ round: { type: Boolean, default: true },
876
+ closable: { type: Boolean, default: true },
877
+ title: { default: "" }
878
+ },
879
+ emits: ["update:show", "close"],
880
+ setup(__props, { emit: __emit }) {
881
+ const emit = __emit;
882
+ function onClose() {
883
+ emit("update:show", false);
884
+ emit("close");
885
+ }
886
+ return (_ctx, _cache) => {
887
+ return openBlock(), createElementBlock(Fragment, null, [
888
+ __props.show ? (openBlock(), createElementBlock("view", {
889
+ key: 0,
890
+ class: "hlw-popup-mask",
891
+ onTap: withModifiers(onClose, ["self"])
892
+ }, null, 32)) : createCommentVNode("", true),
893
+ createElementVNode("view", {
894
+ class: normalizeClass(["hlw-popup", [`hlw-popup--${__props.position}`, { "hlw-popup--show": __props.show, "hlw-popup--round": __props.round }]])
895
+ }, [
896
+ __props.title || __props.closable ? (openBlock(), createElementBlock("view", _hoisted_1$3, [
897
+ createElementVNode("text", _hoisted_2$2, toDisplayString(__props.title), 1),
898
+ __props.closable ? (openBlock(), createElementBlock("view", {
899
+ key: 0,
900
+ class: "hlw-popup-close i-fa6-solid-xmark",
901
+ onTap: onClose
902
+ }, null, 32)) : createCommentVNode("", true)
903
+ ])) : createCommentVNode("", true),
904
+ renderSlot(_ctx.$slots, "default", {}, void 0, true)
905
+ ], 2)
906
+ ], 64);
907
+ };
908
+ }
909
+ });
910
+ const index$4 = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-2d71ef9b"]]);
911
+ const _hoisted_1$2 = ["value", "placeholder", "disabled"];
912
+ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
913
+ __name: "index",
914
+ props: {
915
+ modelValue: { default: "" },
916
+ placeholder: { default: "搜索" },
917
+ disabled: { type: Boolean, default: false },
918
+ clearable: { type: Boolean, default: true },
919
+ shape: { default: "round" },
920
+ background: { default: "" }
921
+ },
922
+ emits: ["update:modelValue", "search", "clear", "focus", "blur"],
923
+ setup(__props, { emit: __emit }) {
924
+ const emit = __emit;
925
+ function onInput(e) {
926
+ var _a;
927
+ emit("update:modelValue", ((_a = e == null ? void 0 : e.detail) == null ? void 0 : _a.value) ?? "");
928
+ }
929
+ function onClear() {
930
+ emit("update:modelValue", "");
931
+ emit("clear");
932
+ }
933
+ return (_ctx, _cache) => {
934
+ return openBlock(), createElementBlock("view", {
935
+ class: "hlw-search",
936
+ style: normalizeStyle(__props.background ? { background: __props.background } : {})
937
+ }, [
938
+ createElementVNode("view", {
939
+ class: normalizeClass(["hlw-search-box", { "hlw-search-box--round": __props.shape === "round" }])
940
+ }, [
941
+ _cache[3] || (_cache[3] = createElementVNode("view", { class: "hlw-search-icon i-fa6-solid-magnifying-glass" }, null, -1)),
942
+ createElementVNode("input", {
943
+ class: "hlw-search-input",
944
+ type: "text",
945
+ value: __props.modelValue,
946
+ placeholder: __props.placeholder,
947
+ disabled: __props.disabled,
948
+ "confirm-type": "search",
949
+ onInput,
950
+ onConfirm: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("search", __props.modelValue)),
951
+ onFocus: _cache[1] || (_cache[1] = ($event) => _ctx.$emit("focus")),
952
+ onBlur: _cache[2] || (_cache[2] = ($event) => _ctx.$emit("blur"))
953
+ }, null, 40, _hoisted_1$2),
954
+ __props.clearable && __props.modelValue ? (openBlock(), createElementBlock("view", {
955
+ key: 0,
956
+ class: "hlw-search-clear i-fa6-solid-xmark",
957
+ onTap: onClear
958
+ }, null, 32)) : createCommentVNode("", true)
959
+ ], 2)
960
+ ], 4);
961
+ };
962
+ }
963
+ });
964
+ const index$3 = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-4fe1bfab"]]);
965
+ const _hoisted_1$1 = { class: "hlw-skeleton-content" };
966
+ const _hoisted_2$1 = {
967
+ key: 0,
968
+ class: "hlw-skeleton-title"
969
+ };
970
+ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
971
+ __name: "index",
972
+ props: {
973
+ loading: { type: Boolean, default: true },
974
+ rows: { default: 3 },
975
+ avatar: { type: Boolean, default: false },
976
+ title: { type: Boolean, default: true },
977
+ animate: { type: Boolean, default: true },
978
+ avatarSize: { default: "medium" }
979
+ },
980
+ setup(__props) {
981
+ return (_ctx, _cache) => {
982
+ return __props.loading ? (openBlock(), createElementBlock("view", {
983
+ key: 0,
984
+ class: normalizeClass(["hlw-skeleton", { "hlw-skeleton--animate": __props.animate }])
985
+ }, [
986
+ __props.avatar ? (openBlock(), createElementBlock("view", {
987
+ key: 0,
988
+ class: normalizeClass(["hlw-skeleton-avatar", `hlw-skeleton-avatar--${__props.avatarSize}`])
989
+ }, null, 2)) : createCommentVNode("", true),
990
+ createElementVNode("view", _hoisted_1$1, [
991
+ __props.title ? (openBlock(), createElementBlock("view", _hoisted_2$1)) : createCommentVNode("", true),
992
+ (openBlock(true), createElementBlock(Fragment, null, renderList(__props.rows, (i) => {
993
+ return openBlock(), createElementBlock("view", {
994
+ key: i,
995
+ class: "hlw-skeleton-row",
996
+ style: normalizeStyle({ width: i === __props.rows ? "60%" : "100%" })
997
+ }, null, 4);
998
+ }), 128))
999
+ ])
1000
+ ], 2)) : renderSlot(_ctx.$slots, "default", { key: 1 }, void 0, true);
1001
+ };
1002
+ }
1003
+ });
1004
+ const index$2 = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-bc3155a2"]]);
1005
+ const _hoisted_1 = { class: "hlw-tabs-wrap" };
1006
+ const _hoisted_2 = ["onTap"];
1007
+ const _hoisted_3 = { class: "hlw-tab-text" };
1008
+ const _hoisted_4 = {
1009
+ key: 0,
1010
+ class: "hlw-tab-badge"
1011
+ };
1012
+ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
1013
+ __name: "index",
1014
+ props: {
1015
+ modelValue: { default: 0 },
1016
+ items: { default: () => [] },
1017
+ scrollable: { type: Boolean, default: false },
1018
+ lineWidth: { default: "40rpx" }
1019
+ },
1020
+ emits: ["update:modelValue", "change"],
1021
+ setup(__props, { emit: __emit }) {
1022
+ const emit = __emit;
1023
+ function onChange(index2) {
1024
+ emit("update:modelValue", index2);
1025
+ emit("change", index2);
1026
+ }
1027
+ return (_ctx, _cache) => {
1028
+ const _component_scroll_view = resolveComponent("scroll-view");
1029
+ return openBlock(), createBlock(_component_scroll_view, {
1030
+ class: "hlw-tabs",
1031
+ "scroll-x": __props.scrollable,
1032
+ enhanced: true,
1033
+ "show-scrollbar": false
1034
+ }, {
1035
+ default: withCtx(() => [
1036
+ createElementVNode("view", _hoisted_1, [
1037
+ (openBlock(true), createElementBlock(Fragment, null, renderList(__props.items, (item, index2) => {
1038
+ return openBlock(), createElementBlock("view", {
1039
+ key: index2,
1040
+ class: normalizeClass(["hlw-tab", { "hlw-tab--active": __props.modelValue === index2 }]),
1041
+ onTap: ($event) => onChange(index2)
1042
+ }, [
1043
+ createElementVNode("text", _hoisted_3, toDisplayString(typeof item === "string" ? item : item.label), 1),
1044
+ typeof item !== "string" && item.badge ? (openBlock(), createElementBlock("view", _hoisted_4, toDisplayString(item.badge), 1)) : createCommentVNode("", true),
1045
+ __props.modelValue === index2 ? (openBlock(), createElementBlock("view", {
1046
+ key: 1,
1047
+ class: "hlw-tab-line",
1048
+ style: normalizeStyle({ width: __props.lineWidth })
1049
+ }, null, 4)) : createCommentVNode("", true)
1050
+ ], 42, _hoisted_2);
1051
+ }), 128))
1052
+ ])
1053
+ ]),
1054
+ _: 1
1055
+ }, 8, ["scroll-x"]);
1056
+ };
1057
+ }
1058
+ });
1059
+ const index$1 = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-5a47c034"]]);
1060
+ const _sfc_main = /* @__PURE__ */ defineComponent({
1061
+ __name: "index",
1062
+ props: {
1063
+ type: { default: "primary" },
1064
+ plain: { type: Boolean, default: false },
1065
+ closable: { type: Boolean, default: false },
1066
+ size: { default: "medium" },
1067
+ round: { type: Boolean, default: false },
1068
+ color: { default: "" }
1069
+ },
1070
+ emits: ["click", "close"],
1071
+ setup(__props) {
1072
+ const props = __props;
1073
+ const customStyle = computed(() => {
1074
+ if (!props.color)
1075
+ return {};
1076
+ return props.plain ? { color: props.color, borderColor: props.color, background: "transparent" } : { background: props.color, color: "#fff", borderColor: props.color };
1077
+ });
1078
+ return (_ctx, _cache) => {
1079
+ return openBlock(), createElementBlock("view", {
1080
+ class: normalizeClass(["hlw-tag", [`hlw-tag--${__props.type}`, `hlw-tag--${__props.size}`, { "hlw-tag--plain": __props.plain, "hlw-tag--round": __props.round }]]),
1081
+ style: normalizeStyle(customStyle.value),
1082
+ onTap: _cache[1] || (_cache[1] = ($event) => _ctx.$emit("click"))
1083
+ }, [
1084
+ renderSlot(_ctx.$slots, "default", {}, void 0, true),
1085
+ __props.closable ? (openBlock(), createElementBlock("view", {
1086
+ key: 0,
1087
+ class: "hlw-tag-close i-fa6-solid-xmark",
1088
+ onTap: _cache[0] || (_cache[0] = withModifiers(($event) => _ctx.$emit("close"), ["stop"]))
1089
+ }, null, 32)) : createCommentVNode("", true)
1090
+ ], 38);
1091
+ };
1092
+ }
1093
+ });
1094
+ const index = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-fd774288"]]);
566
1095
  const FONT_SCALE_KEY = "hlw_font_scale";
567
1096
  const FONT_PRESETS = {
568
1097
  small: {
@@ -707,14 +1236,24 @@ export {
707
1236
  DEFAULT_THEMES,
708
1237
  FONT_PRESETS,
709
1238
  FONT_SCALE_KEY,
710
- _sfc_main$7 as HlwAd,
711
- index$6 as HlwAvatar,
712
- index$5 as HlwCard,
713
- index$4 as HlwEmpty,
714
- index$3 as HlwHeader,
715
- index$2 as HlwLoading,
716
- index$1 as HlwMenu,
717
- index as HlwPage,
1239
+ _sfc_main$h as HlwAd,
1240
+ index$g as HlwAvatar,
1241
+ index$f as HlwButton,
1242
+ index$e as HlwCard,
1243
+ index$d as HlwCell,
1244
+ index$c as HlwDivider,
1245
+ index$b as HlwEmpty,
1246
+ index$a as HlwHeader,
1247
+ index$9 as HlwLoading,
1248
+ index$8 as HlwMenu,
1249
+ index$7 as HlwModal,
1250
+ index$6 as HlwNoticeBar,
1251
+ index$5 as HlwPage,
1252
+ index$4 as HlwPopup,
1253
+ index$3 as HlwSearch,
1254
+ index$2 as HlwSkeleton,
1255
+ index$1 as HlwTabs,
1256
+ index as HlwTag,
718
1257
  THEME_CHANGE_EVENT,
719
1258
  THEME_COLOR_KEY,
720
1259
  buildThemeStyle,