mx-ui-template 0.2.4 → 0.2.5

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.
@@ -1,6 +1,6 @@
1
- import { defineComponent as x, createBlock as ve, openBlock as $, unref as R, normalizeStyle as te, normalizeClass as W, withCtx as Q, renderSlot as N, computed as F, createSlots as lt, onUnmounted as ze, onDeactivated as ne, isRef as at, watch as O, onMounted as oe, nextTick as me, onActivated as he, ref as p, reactive as ge, getCurrentInstance as ye, createVNode as h, onBeforeUnmount as Ae, provide as Fe, watchEffect as st, inject as ut, mergeProps as j, Transition as Le, Teleport as Ve, withDirectives as Ne, vShow as Re, Fragment as ct, createApp as it, createElementBlock as Y, createCommentVNode as ce, createElementVNode as l, toDisplayString as u } from "vue";
2
- import { NButton as rt, NInput as dt, NCard as ft } from "naive-ui";
3
- const vt = /* @__PURE__ */ x({
1
+ import { defineComponent as C, createBlock as oe, openBlock as O, unref as j, normalizeStyle as X, normalizeClass as K, withCtx as te, renderSlot as R, computed as $, createSlots as lt, onUnmounted as De, onDeactivated as le, isRef as at, watch as E, onMounted as Z, nextTick as me, onActivated as he, ref as y, reactive as ge, getCurrentInstance as pe, createVNode as h, onBeforeUnmount as Ae, provide as Le, watchEffect as st, inject as ut, mergeProps as H, Transition as Fe, Teleport as Ve, withDirectives as _e, vShow as Ne, Fragment as ct, createApp as it, createElementBlock as N, createCommentVNode as ie, createElementVNode as a, toDisplayString as c, resolveDynamicComponent as rt, normalizeProps as dt, guardReactiveProps as ft } from "vue";
2
+ import { NButton as vt, NInput as mt, NCard as ht } from "naive-ui";
3
+ const gt = /* @__PURE__ */ C({
4
4
  __name: "Button",
5
5
  props: {
6
6
  type: {},
@@ -17,13 +17,13 @@ const vt = /* @__PURE__ */ x({
17
17
  },
18
18
  emits: ["click"],
19
19
  setup(e, { emit: t }) {
20
- const o = e, n = t, c = (s) => {
21
- !o.disabled && o.onClick && o.onClick(s), n("click", s);
20
+ const o = e, n = t, s = (u) => {
21
+ !o.disabled && o.onClick && o.onClick(u), n("click", u);
22
22
  };
23
- return (s, r) => ($(), ve(R(rt), {
23
+ return (u, i) => (O(), oe(j(vt), {
24
24
  id: e.id,
25
- class: W(e.class),
26
- style: te(e.style),
25
+ class: K(e.class),
26
+ style: X(e.style),
27
27
  type: e.type,
28
28
  size: e.size,
29
29
  circle: e.circle,
@@ -31,20 +31,20 @@ const vt = /* @__PURE__ */ x({
31
31
  dashed: e.dashed,
32
32
  loading: e.loading,
33
33
  disabled: e.disabled,
34
- onClick: c
34
+ onClick: s
35
35
  }, {
36
- default: Q(() => [
37
- N(s.$slots, "default", {}, void 0, !0)
36
+ default: te(() => [
37
+ R(u.$slots, "default", {}, void 0, !0)
38
38
  ]),
39
39
  _: 3
40
40
  }, 8, ["id", "class", "style", "type", "size", "circle", "ghost", "dashed", "loading", "disabled"]));
41
41
  }
42
- }), K = (e, t) => {
42
+ }), F = (e, t) => {
43
43
  const o = e.__vccOpts || e;
44
- for (const [n, c] of t)
45
- o[n] = c;
44
+ for (const [n, s] of t)
45
+ o[n] = s;
46
46
  return o;
47
- }, mt = /* @__PURE__ */ K(vt, [["__scopeId", "data-v-fdf1cb77"]]), ht = /* @__PURE__ */ x({
47
+ }, pt = /* @__PURE__ */ F(gt, [["__scopeId", "data-v-fdf1cb77"]]), yt = /* @__PURE__ */ C({
48
48
  __name: "Input",
49
49
  props: {
50
50
  modelValue: {},
@@ -66,28 +66,28 @@ const vt = /* @__PURE__ */ x({
66
66
  },
67
67
  emits: ["update:modelValue", "input", "blur", "focus"],
68
68
  setup(e, { emit: t }) {
69
- const o = e, n = t, c = F({
69
+ const o = e, n = t, s = $({
70
70
  get() {
71
71
  return o.modelValue?.toString() || "";
72
72
  },
73
- set(i) {
74
- n("update:modelValue", typeof o.modelValue == "number" && i !== "" ? Number(i) : i);
73
+ set(r) {
74
+ n("update:modelValue", typeof o.modelValue == "number" && r !== "" ? Number(r) : r);
75
75
  }
76
- }), s = (i) => {
77
- n("update:modelValue", i);
78
- }, r = (i) => {
79
- n("blur", i);
80
- }, a = (i) => {
81
- n("focus", i);
76
+ }), u = (r) => {
77
+ n("update:modelValue", r);
78
+ }, i = (r) => {
79
+ n("blur", r);
80
+ }, l = (r) => {
81
+ n("focus", r);
82
82
  };
83
- return (i, d) => ($(), ve(R(dt), {
83
+ return (r, f) => (O(), oe(j(mt), {
84
84
  id: e.id,
85
- class: W(e.class),
86
- style: te(e.style),
87
- value: c.value,
85
+ class: K(e.class),
86
+ style: X(e.style),
87
+ value: s.value,
88
88
  "onUpdate:value": [
89
- d[0] || (d[0] = (g) => c.value = g),
90
- s
89
+ f[0] || (f[0] = (g) => s.value = g),
90
+ u
91
91
  ],
92
92
  type: e.type,
93
93
  size: e.size,
@@ -98,11 +98,11 @@ const vt = /* @__PURE__ */ x({
98
98
  "prefix-icon": e.prefixIcon,
99
99
  "suffix-icon": e.suffixIcon,
100
100
  disabled: e.disabled,
101
- onBlur: r,
102
- onFocus: a
101
+ onBlur: i,
102
+ onFocus: l
103
103
  }, null, 8, ["id", "class", "style", "value", "type", "size", "placeholder", "readonly", "maxlength", "show-word-limit", "prefix-icon", "suffix-icon", "disabled"]));
104
104
  }
105
- }), gt = /* @__PURE__ */ K(ht, [["__scopeId", "data-v-be9f5c5c"]]), yt = /* @__PURE__ */ x({
105
+ }), bt = /* @__PURE__ */ F(yt, [["__scopeId", "data-v-be9f5c5c"]]), St = /* @__PURE__ */ C({
106
106
  __name: "Card",
107
107
  props: {
108
108
  title: {},
@@ -117,68 +117,68 @@ const vt = /* @__PURE__ */ x({
117
117
  },
118
118
  emits: ["close"],
119
119
  setup(e, { emit: t }) {
120
- const o = e, n = t, c = () => {
120
+ const o = e, n = t, s = () => {
121
121
  o.onClose && o.onClose(), n("close");
122
122
  };
123
- return (s, r) => ($(), ve(R(ft), {
123
+ return (u, i) => (O(), oe(j(ht), {
124
124
  id: e.id,
125
- class: W(e.class),
126
- style: te(e.style),
125
+ class: K(e.class),
126
+ style: X(e.style),
127
127
  title: e.title,
128
128
  bordered: e.bordered,
129
129
  size: e.size,
130
130
  closable: e.closable,
131
- onClose: c
131
+ onClose: s
132
132
  }, lt({
133
- default: Q(() => [
134
- N(s.$slots, "default", {}, void 0, !0)
133
+ default: te(() => [
134
+ R(u.$slots, "default", {}, void 0, !0)
135
135
  ]),
136
136
  _: 2
137
137
  }, [
138
- s.$slots["header-extra"] ? {
138
+ u.$slots["header-extra"] ? {
139
139
  name: "header-extra",
140
- fn: Q(() => [
141
- N(s.$slots, "header-extra", {}, void 0, !0)
140
+ fn: te(() => [
141
+ R(u.$slots, "header-extra", {}, void 0, !0)
142
142
  ]),
143
143
  key: "0"
144
144
  } : void 0
145
145
  ]), 1032, ["id", "class", "style", "title", "bordered", "size", "closable"]));
146
146
  }
147
- }), pt = /* @__PURE__ */ K(yt, [["__scopeId", "data-v-fdc12dd9"]]);
148
- function bt() {
147
+ }), wt = /* @__PURE__ */ F(St, [["__scopeId", "data-v-fdc12dd9"]]);
148
+ function Ct() {
149
149
  }
150
- const P = Object.assign, pe = typeof window < "u", le = (e) => e !== null && typeof e == "object", D = (e) => e != null, de = (e) => typeof e == "function", Et = (e) => le(e) && de(e.then) && de(e.catch), je = (e) => typeof e == "number" || /^\d+(\.\d+)?$/.test(e), Ct = () => pe ? /ios|iphone|ipad|ipod/.test(navigator.userAgent.toLowerCase()) : !1;
151
- function xe(e, t) {
150
+ const T = Object.assign, ye = typeof window < "u", ae = (e) => e !== null && typeof e == "object", D = (e) => e != null, fe = (e) => typeof e == "function", Et = (e) => ae(e) && fe(e.then) && fe(e.catch), Re = (e) => typeof e == "number" || /^\d+(\.\d+)?$/.test(e), xt = () => ye ? /ios|iphone|ipad|ipod/.test(navigator.userAgent.toLowerCase()) : !1;
151
+ function Ee(e, t) {
152
152
  const o = t.split(".");
153
153
  let n = e;
154
- return o.forEach((c) => {
155
- var s;
156
- n = le(n) && (s = n[c]) != null ? s : "";
154
+ return o.forEach((s) => {
155
+ var u;
156
+ n = ae(n) && (u = n[s]) != null ? u : "";
157
157
  }), n;
158
158
  }
159
- function wt(e, t, o) {
159
+ function Bt(e, t, o) {
160
160
  return t.reduce(
161
- (n, c) => (n[c] = e[c], n),
161
+ (n, s) => (n[s] = e[s], n),
162
162
  {}
163
163
  );
164
164
  }
165
- const ee = null, C = [Number, String], A = {
165
+ const ne = null, w = [Number, String], L = {
166
166
  type: Boolean,
167
167
  default: !0
168
- }, xt = (e) => ({
168
+ }, It = (e) => ({
169
169
  type: Number,
170
170
  default: e
171
- }), ie = (e) => ({
172
- type: C,
171
+ }), re = (e) => ({
172
+ type: w,
173
173
  default: e
174
- }), w = (e) => ({
174
+ }), x = (e) => ({
175
175
  type: String,
176
176
  default: e
177
177
  });
178
178
  var be = typeof window < "u";
179
- function He(e) {
179
+ function je(e) {
180
180
  let t;
181
- oe(() => {
181
+ Z(() => {
182
182
  e(), me(() => {
183
183
  t = !0;
184
184
  });
@@ -186,106 +186,106 @@ function He(e) {
186
186
  t && e();
187
187
  });
188
188
  }
189
- function Ee(e, t, o = {}) {
189
+ function Se(e, t, o = {}) {
190
190
  if (!be)
191
191
  return;
192
- const { target: n = window, passive: c = !1, capture: s = !1 } = o;
193
- let r = !1, a;
194
- const i = (m) => {
195
- if (r)
192
+ const { target: n = window, passive: s = !1, capture: u = !1 } = o;
193
+ let i = !1, l;
194
+ const r = (d) => {
195
+ if (i)
196
196
  return;
197
- const v = R(m);
198
- v && !a && (v.addEventListener(e, t, {
199
- capture: s,
200
- passive: c
201
- }), a = !0);
202
- }, d = (m) => {
203
- if (r)
197
+ const v = j(d);
198
+ v && !l && (v.addEventListener(e, t, {
199
+ capture: u,
200
+ passive: s
201
+ }), l = !0);
202
+ }, f = (d) => {
203
+ if (i)
204
204
  return;
205
- const v = R(m);
206
- v && a && (v.removeEventListener(e, t, s), a = !1);
205
+ const v = j(d);
206
+ v && l && (v.removeEventListener(e, t, u), l = !1);
207
207
  };
208
- ze(() => d(n)), ne(() => d(n)), He(() => i(n));
208
+ De(() => f(n)), le(() => f(n)), je(() => r(n));
209
209
  let g;
210
- return at(n) && (g = O(n, (m, v) => {
211
- d(v), i(m);
210
+ return at(n) && (g = E(n, (d, v) => {
211
+ f(v), r(d);
212
212
  })), () => {
213
- g?.(), d(n), r = !0;
213
+ g?.(), f(n), i = !0;
214
214
  };
215
215
  }
216
- var G, re;
217
- function Bt() {
218
- if (!G && (G = p(0), re = p(0), be)) {
216
+ var J, de;
217
+ function kt() {
218
+ if (!J && (J = y(0), de = y(0), be)) {
219
219
  const e = () => {
220
- G.value = window.innerWidth, re.value = window.innerHeight;
220
+ J.value = window.innerWidth, de.value = window.innerHeight;
221
221
  };
222
222
  e(), window.addEventListener("resize", e, { passive: !0 }), window.addEventListener("orientationchange", e, { passive: !0 });
223
223
  }
224
- return { width: G, height: re };
224
+ return { width: J, height: de };
225
225
  }
226
- var St = /scroll|auto|overlay/i, Me = be ? window : void 0;
227
- function kt(e) {
226
+ var Pt = /scroll|auto|overlay/i, He = be ? window : void 0;
227
+ function Ot(e) {
228
228
  return e.tagName !== "HTML" && e.tagName !== "BODY" && e.nodeType === 1;
229
229
  }
230
- function _e(e, t = Me) {
230
+ function Me(e, t = He) {
231
231
  let o = e;
232
- for (; o && o !== t && kt(o); ) {
232
+ for (; o && o !== t && Ot(o); ) {
233
233
  const { overflowY: n } = window.getComputedStyle(o);
234
- if (St.test(n))
234
+ if (Pt.test(n))
235
235
  return o;
236
236
  o = o.parentNode;
237
237
  }
238
238
  return t;
239
239
  }
240
- function It(e, t = Me) {
241
- const o = p();
242
- return oe(() => {
243
- e.value && (o.value = _e(e.value, t));
240
+ function $t(e, t = He) {
241
+ const o = y();
242
+ return Z(() => {
243
+ e.value && (o.value = Me(e.value, t));
244
244
  }), o;
245
245
  }
246
- function Ot(e) {
246
+ function Tt(e) {
247
247
  const t = "scrollTop" in e ? e.scrollTop : e.pageYOffset;
248
248
  return Math.max(t, 0);
249
249
  }
250
- Ct();
251
- const Pt = (e) => e.stopPropagation();
252
- function Ce(e, t) {
253
- (typeof e.cancelable != "boolean" || e.cancelable) && e.preventDefault(), t && Pt(e);
250
+ xt();
251
+ const zt = (e) => e.stopPropagation();
252
+ function we(e, t) {
253
+ (typeof e.cancelable != "boolean" || e.cancelable) && e.preventDefault(), t && zt(e);
254
254
  }
255
- Bt();
256
- function I(e) {
255
+ kt();
256
+ function P(e) {
257
257
  if (D(e))
258
- return je(e) ? `${e}px` : String(e);
258
+ return Re(e) ? `${e}px` : String(e);
259
259
  }
260
- function Tt(e) {
260
+ function Dt(e) {
261
261
  if (D(e)) {
262
262
  if (Array.isArray(e))
263
263
  return {
264
- width: I(e[0]),
265
- height: I(e[1])
264
+ width: P(e[0]),
265
+ height: P(e[1])
266
266
  };
267
- const t = I(e);
267
+ const t = P(e);
268
268
  return {
269
269
  width: t,
270
270
  height: t
271
271
  };
272
272
  }
273
273
  }
274
- function $t(e) {
274
+ function At(e) {
275
275
  const t = {};
276
276
  return e !== void 0 && (t.zIndex = +e), t;
277
277
  }
278
- const Dt = /-(\w)/g, Ye = (e) => e.replace(Dt, (t, o) => o.toUpperCase()), zt = (e) => e.replace(/([A-Z])/g, "-$1").toLowerCase().replace(/^-/, ""), { hasOwnProperty: At } = Object.prototype;
279
- function Ft(e, t, o) {
278
+ const Lt = /-(\w)/g, Ye = (e) => e.replace(Lt, (t, o) => o.toUpperCase()), Ft = (e) => e.replace(/([A-Z])/g, "-$1").toLowerCase().replace(/^-/, ""), { hasOwnProperty: Vt } = Object.prototype;
279
+ function _t(e, t, o) {
280
280
  const n = t[o];
281
- D(n) && (!At.call(e, o) || !le(n) ? e[o] = n : e[o] = Ue(Object(e[o]), n));
281
+ D(n) && (!Vt.call(e, o) || !ae(n) ? e[o] = n : e[o] = Ue(Object(e[o]), n));
282
282
  }
283
283
  function Ue(e, t) {
284
284
  return Object.keys(t).forEach((o) => {
285
- Ft(e, t, o);
285
+ _t(e, t, o);
286
286
  }), e;
287
287
  }
288
- var Lt = {
288
+ var Nt = {
289
289
  name: "姓名",
290
290
  tel: "电话",
291
291
  save: "保存",
@@ -347,86 +347,86 @@ var Lt = {
347
347
  add: "新增地址"
348
348
  }
349
349
  };
350
- const Be = p("zh-CN"), Se = ge({
351
- "zh-CN": Lt
352
- }), Vt = {
350
+ const xe = y("zh-CN"), Be = ge({
351
+ "zh-CN": Nt
352
+ }), Rt = {
353
353
  messages() {
354
- return Se[Be.value];
354
+ return Be[xe.value];
355
355
  },
356
356
  use(e, t) {
357
- Be.value = e, this.add({ [e]: t });
357
+ xe.value = e, this.add({ [e]: t });
358
358
  },
359
359
  add(e = {}) {
360
- Ue(Se, e);
360
+ Ue(Be, e);
361
361
  }
362
362
  };
363
- var Nt = Vt;
364
- function Rt(e) {
363
+ var jt = Rt;
364
+ function Ht(e) {
365
365
  const t = Ye(e) + ".";
366
366
  return (o, ...n) => {
367
- const c = Nt.messages(), s = xe(c, t + o) || xe(c, o);
368
- return de(s) ? s(...n) : s;
367
+ const s = jt.messages(), u = Ee(s, t + o) || Ee(s, o);
368
+ return fe(u) ? u(...n) : u;
369
369
  };
370
370
  }
371
- function fe(e, t) {
371
+ function ve(e, t) {
372
372
  return t ? typeof t == "string" ? ` ${e}--${t}` : Array.isArray(t) ? t.reduce(
373
- (o, n) => o + fe(e, n),
373
+ (o, n) => o + ve(e, n),
374
374
  ""
375
375
  ) : Object.keys(t).reduce(
376
- (o, n) => o + (t[n] ? fe(e, n) : ""),
376
+ (o, n) => o + (t[n] ? ve(e, n) : ""),
377
377
  ""
378
378
  ) : "";
379
379
  }
380
- function jt(e) {
381
- return (t, o) => (t && typeof t != "string" && (o = t, t = ""), t = t ? `${e}__${t}` : e, `${t}${fe(t, o)}`);
380
+ function Mt(e) {
381
+ return (t, o) => (t && typeof t != "string" && (o = t, t = ""), t = t ? `${e}__${t}` : e, `${t}${ve(t, o)}`);
382
382
  }
383
- function z(e) {
383
+ function A(e) {
384
384
  const t = `van-${e}`;
385
385
  return [
386
386
  t,
387
- jt(t),
388
- Rt(t)
387
+ Mt(t),
388
+ Ht(t)
389
389
  ];
390
390
  }
391
- const Ht = "van-haptics-feedback", ke = 5;
392
- function Mt(e, {
391
+ const Yt = "van-haptics-feedback", Ie = 5;
392
+ function Ut(e, {
393
393
  args: t = [],
394
394
  done: o,
395
395
  canceled: n,
396
- error: c
396
+ error: s
397
397
  }) {
398
398
  if (e) {
399
- const s = e.apply(null, t);
400
- Et(s) ? s.then((r) => {
401
- r ? o() : n && n();
402
- }).catch(c || bt) : s ? o() : n && n();
399
+ const u = e.apply(null, t);
400
+ Et(u) ? u.then((i) => {
401
+ i ? o() : n && n();
402
+ }).catch(s || Ct) : u ? o() : n && n();
403
403
  } else
404
404
  o();
405
405
  }
406
- function L(e) {
406
+ function V(e) {
407
407
  return e.install = (t) => {
408
408
  const { name: o } = e;
409
409
  o && (t.component(o, e), t.component(Ye(`-${o}`), e));
410
410
  }, e;
411
411
  }
412
- const _t = Symbol();
412
+ const Wt = Symbol();
413
413
  function We(e) {
414
- const t = ye();
415
- t && P(t.proxy, e);
414
+ const t = pe();
415
+ t && T(t.proxy, e);
416
416
  }
417
- const [Yt, Ie] = z("badge"), Ut = {
417
+ const [Kt, ke] = A("badge"), Xt = {
418
418
  dot: Boolean,
419
- max: C,
420
- tag: w("div"),
419
+ max: w,
420
+ tag: x("div"),
421
421
  color: String,
422
422
  offset: Array,
423
- content: C,
424
- showZero: A,
425
- position: w("top-right")
423
+ content: w,
424
+ showZero: L,
425
+ position: x("top-right")
426
426
  };
427
- var Wt = x({
428
- name: Yt,
429
- props: Ut,
427
+ var Zt = C({
428
+ name: Kt,
429
+ props: Xt,
430
430
  setup(e, {
431
431
  slots: t
432
432
  }) {
@@ -434,112 +434,112 @@ var Wt = x({
434
434
  if (t.content)
435
435
  return !0;
436
436
  const {
437
- content: a,
438
- showZero: i
437
+ content: l,
438
+ showZero: r
439
439
  } = e;
440
- return D(a) && a !== "" && (i || a !== 0 && a !== "0");
440
+ return D(l) && l !== "" && (r || l !== 0 && l !== "0");
441
441
  }, n = () => {
442
442
  const {
443
- dot: a,
444
- max: i,
445
- content: d
443
+ dot: l,
444
+ max: r,
445
+ content: f
446
446
  } = e;
447
- if (!a && o())
448
- return t.content ? t.content() : D(i) && je(d) && +d > +i ? `${i}+` : d;
449
- }, c = (a) => a.startsWith("-") ? a.replace("-", "") : `-${a}`, s = F(() => {
450
- const a = {
447
+ if (!l && o())
448
+ return t.content ? t.content() : D(r) && Re(f) && +f > +r ? `${r}+` : f;
449
+ }, s = (l) => l.startsWith("-") ? l.replace("-", "") : `-${l}`, u = $(() => {
450
+ const l = {
451
451
  background: e.color
452
452
  };
453
453
  if (e.offset) {
454
- const [i, d] = e.offset, {
454
+ const [r, f] = e.offset, {
455
455
  position: g
456
- } = e, [m, v] = g.split("-");
457
- t.default ? (typeof d == "number" ? a[m] = I(m === "top" ? d : -d) : a[m] = m === "top" ? I(d) : c(d), typeof i == "number" ? a[v] = I(v === "left" ? i : -i) : a[v] = v === "left" ? I(i) : c(i)) : (a.marginTop = I(d), a.marginLeft = I(i));
456
+ } = e, [d, v] = g.split("-");
457
+ t.default ? (typeof f == "number" ? l[d] = P(d === "top" ? f : -f) : l[d] = d === "top" ? P(f) : s(f), typeof r == "number" ? l[v] = P(v === "left" ? r : -r) : l[v] = v === "left" ? P(r) : s(r)) : (l.marginTop = P(f), l.marginLeft = P(r));
458
458
  }
459
- return a;
460
- }), r = () => {
459
+ return l;
460
+ }), i = () => {
461
461
  if (o() || e.dot)
462
462
  return h("div", {
463
- class: Ie([e.position, {
463
+ class: ke([e.position, {
464
464
  dot: e.dot,
465
465
  fixed: !!t.default
466
466
  }]),
467
- style: s.value
467
+ style: u.value
468
468
  }, [n()]);
469
469
  };
470
470
  return () => {
471
471
  if (t.default) {
472
472
  const {
473
- tag: a
473
+ tag: l
474
474
  } = e;
475
- return h(a, {
476
- class: Ie("wrapper")
475
+ return h(l, {
476
+ class: ke("wrapper")
477
477
  }, {
478
- default: () => [t.default(), r()]
478
+ default: () => [t.default(), i()]
479
479
  });
480
480
  }
481
- return r();
481
+ return i();
482
482
  };
483
483
  }
484
484
  });
485
- const Kt = L(Wt);
485
+ const Gt = V(Zt);
486
486
  let Ke = 2e3;
487
- const Xt = () => ++Ke, Zt = (e) => {
487
+ const qt = () => ++Ke, Jt = (e) => {
488
488
  Ke = e;
489
- }, [Xe, Gt] = z("config-provider"), Ze = Symbol(Xe), qt = {
490
- tag: w("div"),
491
- theme: w("light"),
489
+ }, [Xe, Qt] = A("config-provider"), Ze = Symbol(Xe), en = {
490
+ tag: x("div"),
491
+ theme: x("light"),
492
492
  zIndex: Number,
493
493
  themeVars: Object,
494
494
  themeVarsDark: Object,
495
495
  themeVarsLight: Object,
496
- themeVarsScope: w("local"),
496
+ themeVarsScope: x("local"),
497
497
  iconPrefix: String
498
498
  };
499
- function Jt(e) {
499
+ function tn(e) {
500
500
  return e.replace(/([a-zA-Z])(\d)/g, "$1-$2");
501
501
  }
502
- function Qt(e) {
502
+ function nn(e) {
503
503
  const t = {};
504
504
  return Object.keys(e).forEach((o) => {
505
- const n = Jt(zt(o));
505
+ const n = tn(Ft(o));
506
506
  t[`--van-${n}`] = e[o];
507
507
  }), t;
508
508
  }
509
- function q(e = {}, t = {}) {
509
+ function Q(e = {}, t = {}) {
510
510
  Object.keys(e).forEach((o) => {
511
511
  e[o] !== t[o] && document.documentElement.style.setProperty(o, e[o]);
512
512
  }), Object.keys(t).forEach((o) => {
513
513
  e[o] || document.documentElement.style.removeProperty(o);
514
514
  });
515
515
  }
516
- x({
516
+ C({
517
517
  name: Xe,
518
- props: qt,
518
+ props: en,
519
519
  setup(e, {
520
520
  slots: t
521
521
  }) {
522
- const o = F(() => Qt(P({}, e.themeVars, e.theme === "dark" ? e.themeVarsDark : e.themeVarsLight)));
523
- if (pe) {
522
+ const o = $(() => nn(T({}, e.themeVars, e.theme === "dark" ? e.themeVarsDark : e.themeVarsLight)));
523
+ if (ye) {
524
524
  const n = () => {
525
525
  document.documentElement.classList.add(`van-theme-${e.theme}`);
526
- }, c = (s = e.theme) => {
527
- document.documentElement.classList.remove(`van-theme-${s}`);
526
+ }, s = (u = e.theme) => {
527
+ document.documentElement.classList.remove(`van-theme-${u}`);
528
528
  };
529
- O(() => e.theme, (s, r) => {
530
- r && c(r), n();
529
+ E(() => e.theme, (u, i) => {
530
+ i && s(i), n();
531
531
  }, {
532
532
  immediate: !0
533
- }), he(n), ne(c), Ae(c), O(o, (s, r) => {
534
- e.themeVarsScope === "global" && q(s, r);
535
- }), O(() => e.themeVarsScope, (s, r) => {
536
- r === "global" && q({}, o.value), s === "global" && q(o.value, {});
537
- }), e.themeVarsScope === "global" && q(o.value, {});
533
+ }), he(n), le(s), Ae(s), E(o, (u, i) => {
534
+ e.themeVarsScope === "global" && Q(u, i);
535
+ }), E(() => e.themeVarsScope, (u, i) => {
536
+ i === "global" && Q({}, o.value), u === "global" && Q(o.value, {});
537
+ }), e.themeVarsScope === "global" && Q(o.value, {});
538
538
  }
539
- return Fe(Ze, e), st(() => {
540
- e.zIndex !== void 0 && Zt(e.zIndex);
539
+ return Le(Ze, e), st(() => {
540
+ e.zIndex !== void 0 && Jt(e.zIndex);
541
541
  }), () => h(e.tag, {
542
- class: Gt(),
542
+ class: Qt(),
543
543
  style: e.themeVarsScope === "local" ? o.value : void 0
544
544
  }, {
545
545
  default: () => {
@@ -549,126 +549,126 @@ x({
549
549
  });
550
550
  }
551
551
  });
552
- const [en, Oe] = z("icon"), tn = (e) => e?.includes("/"), nn = {
552
+ const [on, Pe] = A("icon"), ln = (e) => e?.includes("/"), an = {
553
553
  dot: Boolean,
554
- tag: w("i"),
554
+ tag: x("i"),
555
555
  name: String,
556
- size: C,
557
- badge: C,
556
+ size: w,
557
+ badge: w,
558
558
  color: String,
559
559
  badgeProps: Object,
560
560
  classPrefix: String
561
561
  };
562
- var on = x({
563
- name: en,
564
- props: nn,
562
+ var sn = C({
563
+ name: on,
564
+ props: an,
565
565
  setup(e, {
566
566
  slots: t
567
567
  }) {
568
- const o = ut(Ze, null), n = F(() => e.classPrefix || o?.iconPrefix || Oe());
568
+ const o = ut(Ze, null), n = $(() => e.classPrefix || o?.iconPrefix || Pe());
569
569
  return () => {
570
570
  const {
571
- tag: c,
572
- dot: s,
573
- name: r,
574
- size: a,
575
- badge: i,
576
- color: d
577
- } = e, g = tn(r);
578
- return h(Kt, j({
579
- dot: s,
580
- tag: c,
581
- class: [n.value, g ? "" : `${n.value}-${r}`],
571
+ tag: s,
572
+ dot: u,
573
+ name: i,
574
+ size: l,
575
+ badge: r,
576
+ color: f
577
+ } = e, g = ln(i);
578
+ return h(Gt, H({
579
+ dot: u,
580
+ tag: s,
581
+ class: [n.value, g ? "" : `${n.value}-${i}`],
582
582
  style: {
583
- color: d,
584
- fontSize: I(a)
583
+ color: f,
584
+ fontSize: P(l)
585
585
  },
586
- content: i
586
+ content: r
587
587
  }, e.badgeProps), {
588
588
  default: () => {
589
- var m;
590
- return [(m = t.default) == null ? void 0 : m.call(t), g && h("img", {
591
- class: Oe("image"),
592
- src: r
589
+ var d;
590
+ return [(d = t.default) == null ? void 0 : d.call(t), g && h("img", {
591
+ class: Pe("image"),
592
+ src: i
593
593
  }, null)];
594
594
  }
595
595
  });
596
596
  };
597
597
  }
598
598
  });
599
- const Ge = L(on), [ln, U] = z("loading"), an = Array(12).fill(null).map((e, t) => h("i", {
600
- class: U("line", String(t + 1))
601
- }, null)), sn = h("svg", {
602
- class: U("circular"),
599
+ const Ge = V(sn), [un, W] = A("loading"), cn = Array(12).fill(null).map((e, t) => h("i", {
600
+ class: W("line", String(t + 1))
601
+ }, null)), rn = h("svg", {
602
+ class: W("circular"),
603
603
  viewBox: "25 25 50 50"
604
604
  }, [h("circle", {
605
605
  cx: "50",
606
606
  cy: "50",
607
607
  r: "20",
608
608
  fill: "none"
609
- }, null)]), un = {
610
- size: C,
611
- type: w("circular"),
609
+ }, null)]), dn = {
610
+ size: w,
611
+ type: x("circular"),
612
612
  color: String,
613
613
  vertical: Boolean,
614
- textSize: C,
614
+ textSize: w,
615
615
  textColor: String
616
616
  };
617
- var cn = x({
618
- name: ln,
619
- props: un,
617
+ var fn = C({
618
+ name: un,
619
+ props: dn,
620
620
  setup(e, {
621
621
  slots: t
622
622
  }) {
623
- const o = F(() => P({
623
+ const o = $(() => T({
624
624
  color: e.color
625
- }, Tt(e.size))), n = () => {
626
- const s = e.type === "spinner" ? an : sn;
625
+ }, Dt(e.size))), n = () => {
626
+ const u = e.type === "spinner" ? cn : rn;
627
627
  return h("span", {
628
- class: U("spinner", e.type),
628
+ class: W("spinner", e.type),
629
629
  style: o.value
630
- }, [t.icon ? t.icon() : s]);
631
- }, c = () => {
632
- var s;
630
+ }, [t.icon ? t.icon() : u]);
631
+ }, s = () => {
632
+ var u;
633
633
  if (t.default)
634
634
  return h("span", {
635
- class: U("text"),
635
+ class: W("text"),
636
636
  style: {
637
- fontSize: I(e.textSize),
638
- color: (s = e.textColor) != null ? s : e.color
637
+ fontSize: P(e.textSize),
638
+ color: (u = e.textColor) != null ? u : e.color
639
639
  }
640
640
  }, [t.default()]);
641
641
  };
642
642
  return () => {
643
643
  const {
644
- type: s,
645
- vertical: r
644
+ type: u,
645
+ vertical: i
646
646
  } = e;
647
647
  return h("div", {
648
- class: U([s, {
649
- vertical: r
648
+ class: W([u, {
649
+ vertical: i
650
650
  }]),
651
651
  "aria-live": "polite",
652
652
  "aria-busy": !0
653
- }, [n(), c()]);
653
+ }, [n(), s()]);
654
654
  };
655
655
  }
656
656
  });
657
- const qe = L(cn), rn = {
657
+ const qe = V(fn), vn = {
658
658
  // whether to show popup
659
659
  show: Boolean,
660
660
  // z-index
661
- zIndex: C,
661
+ zIndex: w,
662
662
  // whether to show overlay
663
- overlay: A,
663
+ overlay: L,
664
664
  // transition duration
665
- duration: C,
665
+ duration: w,
666
666
  // teleport
667
667
  teleport: [String, Object],
668
668
  // prevent body scroll
669
- lockScroll: A,
669
+ lockScroll: L,
670
670
  // whether to lazy render
671
- lazyRender: A,
671
+ lazyRender: L,
672
672
  // callback function before close
673
673
  beforeClose: Function,
674
674
  // overlay props
@@ -676,65 +676,65 @@ const qe = L(cn), rn = {
676
676
  // overlay custom style
677
677
  overlayStyle: Object,
678
678
  // overlay custom class name
679
- overlayClass: ee,
679
+ overlayClass: ne,
680
680
  // Initial rendering animation
681
681
  transitionAppear: Boolean,
682
682
  // whether to close popup when overlay is clicked
683
- closeOnClickOverlay: A
683
+ closeOnClickOverlay: L
684
684
  };
685
- function dn(e, t) {
685
+ function mn(e, t) {
686
686
  return e > t ? "horizontal" : t > e ? "vertical" : "";
687
687
  }
688
688
  function Je() {
689
- const e = p(0), t = p(0), o = p(0), n = p(0), c = p(0), s = p(0), r = p(""), a = p(!0), i = () => r.value === "vertical", d = () => r.value === "horizontal", g = () => {
690
- o.value = 0, n.value = 0, c.value = 0, s.value = 0, r.value = "", a.value = !0;
689
+ const e = y(0), t = y(0), o = y(0), n = y(0), s = y(0), u = y(0), i = y(""), l = y(!0), r = () => i.value === "vertical", f = () => i.value === "horizontal", g = () => {
690
+ o.value = 0, n.value = 0, s.value = 0, u.value = 0, i.value = "", l.value = !0;
691
691
  };
692
692
  return {
693
- move: (E) => {
694
- const B = E.touches[0];
695
- o.value = (B.clientX < 0 ? 0 : B.clientX) - e.value, n.value = B.clientY - t.value, c.value = Math.abs(o.value), s.value = Math.abs(n.value);
693
+ move: (b) => {
694
+ const B = b.touches[0];
695
+ o.value = (B.clientX < 0 ? 0 : B.clientX) - e.value, n.value = B.clientY - t.value, s.value = Math.abs(o.value), u.value = Math.abs(n.value);
696
696
  const k = 10;
697
- (!r.value || c.value < k && s.value < k) && (r.value = dn(c.value, s.value)), a.value && (c.value > ke || s.value > ke) && (a.value = !1);
697
+ (!i.value || s.value < k && u.value < k) && (i.value = mn(s.value, u.value)), l.value && (s.value > Ie || u.value > Ie) && (l.value = !1);
698
698
  },
699
- start: (E) => {
700
- g(), e.value = E.touches[0].clientX, t.value = E.touches[0].clientY;
699
+ start: (b) => {
700
+ g(), e.value = b.touches[0].clientX, t.value = b.touches[0].clientY;
701
701
  },
702
702
  reset: g,
703
703
  startX: e,
704
704
  startY: t,
705
705
  deltaX: o,
706
706
  deltaY: n,
707
- offsetX: c,
708
- offsetY: s,
709
- direction: r,
710
- isVertical: i,
711
- isHorizontal: d,
712
- isTap: a
707
+ offsetX: s,
708
+ offsetY: u,
709
+ direction: i,
710
+ isVertical: r,
711
+ isHorizontal: f,
712
+ isTap: l
713
713
  };
714
714
  }
715
- let H = 0;
716
- const Pe = "van-overflow-hidden";
717
- function fn(e, t) {
718
- const o = Je(), n = "01", c = "10", s = (g) => {
715
+ let M = 0;
716
+ const Oe = "van-overflow-hidden";
717
+ function hn(e, t) {
718
+ const o = Je(), n = "01", s = "10", u = (g) => {
719
719
  o.move(g);
720
- const m = o.deltaY.value > 0 ? c : n, v = _e(
720
+ const d = o.deltaY.value > 0 ? s : n, v = Me(
721
721
  g.target,
722
722
  e.value
723
- ), { scrollHeight: E, offsetHeight: B, scrollTop: k } = v;
724
- let S = "11";
725
- k === 0 ? S = B >= E ? "00" : "01" : k + B >= E && (S = "10"), S !== "11" && o.isVertical() && !(parseInt(S, 2) & parseInt(m, 2)) && Ce(g, !0);
726
- }, r = () => {
727
- document.addEventListener("touchstart", o.start), document.addEventListener("touchmove", s, { passive: !1 }), H || document.body.classList.add(Pe), H++;
728
- }, a = () => {
729
- H && (document.removeEventListener("touchstart", o.start), document.removeEventListener("touchmove", s), H--, H || document.body.classList.remove(Pe));
730
- }, i = () => t() && r(), d = () => t() && a();
731
- He(i), ne(d), Ae(d), O(t, (g) => {
732
- g ? r() : a();
723
+ ), { scrollHeight: b, offsetHeight: B, scrollTop: k } = v;
724
+ let I = "11";
725
+ k === 0 ? I = B >= b ? "00" : "01" : k + B >= b && (I = "10"), I !== "11" && o.isVertical() && !(parseInt(I, 2) & parseInt(d, 2)) && we(g, !0);
726
+ }, i = () => {
727
+ document.addEventListener("touchstart", o.start), document.addEventListener("touchmove", u, { passive: !1 }), M || document.body.classList.add(Oe), M++;
728
+ }, l = () => {
729
+ M && (document.removeEventListener("touchstart", o.start), document.removeEventListener("touchmove", u), M--, M || document.body.classList.remove(Oe));
730
+ }, r = () => t() && i(), f = () => t() && l();
731
+ je(r), le(f), Ae(f), E(t, (g) => {
732
+ g ? i() : l();
733
733
  });
734
734
  }
735
735
  function Qe(e) {
736
- const t = p(!1);
737
- return O(
736
+ const t = y(!1);
737
+ return E(
738
738
  e,
739
739
  (o) => {
740
740
  o && (t.value = o);
@@ -742,300 +742,300 @@ function Qe(e) {
742
742
  { immediate: !0 }
743
743
  ), (o) => () => t.value ? o() : null;
744
744
  }
745
- const Te = () => {
745
+ const $e = () => {
746
746
  var e;
747
- const { scopeId: t } = ((e = ye()) == null ? void 0 : e.vnode) || {};
747
+ const { scopeId: t } = ((e = pe()) == null ? void 0 : e.vnode) || {};
748
748
  return t ? { [t]: "" } : null;
749
- }, [vn, mn] = z("overlay"), hn = {
749
+ }, [gn, pn] = A("overlay"), yn = {
750
750
  show: Boolean,
751
- zIndex: C,
752
- duration: C,
753
- className: ee,
754
- lockScroll: A,
755
- lazyRender: A,
751
+ zIndex: w,
752
+ duration: w,
753
+ className: ne,
754
+ lockScroll: L,
755
+ lazyRender: L,
756
756
  customStyle: Object,
757
757
  teleport: [String, Object]
758
758
  };
759
- var gn = x({
760
- name: vn,
759
+ var bn = C({
760
+ name: gn,
761
761
  inheritAttrs: !1,
762
- props: hn,
762
+ props: yn,
763
763
  setup(e, {
764
764
  attrs: t,
765
765
  slots: o
766
766
  }) {
767
- const n = p(), c = Qe(() => e.show || !e.lazyRender), s = (a) => {
768
- e.lockScroll && Ce(a, !0);
769
- }, r = c(() => {
770
- var a;
771
- const i = P($t(e.zIndex), e.customStyle);
772
- return D(e.duration) && (i.animationDuration = `${e.duration}s`), Ne(h("div", j({
767
+ const n = y(), s = Qe(() => e.show || !e.lazyRender), u = (l) => {
768
+ e.lockScroll && we(l, !0);
769
+ }, i = s(() => {
770
+ var l;
771
+ const r = T(At(e.zIndex), e.customStyle);
772
+ return D(e.duration) && (r.animationDuration = `${e.duration}s`), _e(h("div", H({
773
773
  ref: n,
774
- style: i,
775
- class: [mn(), e.className]
776
- }, t), [(a = o.default) == null ? void 0 : a.call(o)]), [[Re, e.show]]);
774
+ style: r,
775
+ class: [pn(), e.className]
776
+ }, t), [(l = o.default) == null ? void 0 : l.call(o)]), [[Ne, e.show]]);
777
777
  });
778
- return Ee("touchmove", s, {
778
+ return Se("touchmove", u, {
779
779
  target: n
780
780
  }), () => {
781
- const a = h(Le, {
781
+ const l = h(Fe, {
782
782
  name: "van-fade",
783
783
  appear: !0
784
784
  }, {
785
- default: r
785
+ default: i
786
786
  });
787
787
  return e.teleport ? h(Ve, {
788
788
  to: e.teleport
789
789
  }, {
790
- default: () => [a]
791
- }) : a;
790
+ default: () => [l]
791
+ }) : l;
792
792
  };
793
793
  }
794
794
  });
795
- const yn = L(gn), pn = P({}, rn, {
795
+ const Sn = V(bn), wn = T({}, vn, {
796
796
  round: Boolean,
797
- position: w("center"),
798
- closeIcon: w("cross"),
797
+ position: x("center"),
798
+ closeIcon: x("cross"),
799
799
  closeable: Boolean,
800
800
  transition: String,
801
801
  iconPrefix: String,
802
802
  closeOnPopstate: Boolean,
803
- closeIconPosition: w("top-right"),
803
+ closeIconPosition: x("top-right"),
804
804
  destroyOnClose: Boolean,
805
805
  safeAreaInsetTop: Boolean,
806
806
  safeAreaInsetBottom: Boolean
807
- }), [bn, $e] = z("popup");
808
- var En = x({
809
- name: bn,
807
+ }), [Cn, Te] = A("popup");
808
+ var En = C({
809
+ name: Cn,
810
810
  inheritAttrs: !1,
811
- props: pn,
811
+ props: wn,
812
812
  emits: ["open", "close", "opened", "closed", "keydown", "update:show", "clickOverlay", "clickCloseIcon"],
813
813
  setup(e, {
814
814
  emit: t,
815
815
  attrs: o,
816
816
  slots: n
817
817
  }) {
818
- let c, s;
819
- const r = p(), a = p(), i = Qe(() => e.show || !e.lazyRender), d = F(() => {
820
- const y = {
821
- zIndex: r.value
818
+ let s, u;
819
+ const i = y(), l = y(), r = Qe(() => e.show || !e.lazyRender), f = $(() => {
820
+ const p = {
821
+ zIndex: i.value
822
822
  };
823
823
  if (D(e.duration)) {
824
- const T = e.position === "center" ? "animationDuration" : "transitionDuration";
825
- y[T] = `${e.duration}s`;
824
+ const z = e.position === "center" ? "animationDuration" : "transitionDuration";
825
+ p[z] = `${e.duration}s`;
826
826
  }
827
- return y;
827
+ return p;
828
828
  }), g = () => {
829
- c || (c = !0, r.value = e.zIndex !== void 0 ? +e.zIndex : Xt(), t("open"));
830
- }, m = () => {
831
- c && Mt(e.beforeClose, {
829
+ s || (s = !0, i.value = e.zIndex !== void 0 ? +e.zIndex : qt(), t("open"));
830
+ }, d = () => {
831
+ s && Ut(e.beforeClose, {
832
832
  done() {
833
- c = !1, t("close"), t("update:show", !1);
833
+ s = !1, t("close"), t("update:show", !1);
834
834
  }
835
835
  });
836
- }, v = (y) => {
837
- t("clickOverlay", y), e.closeOnClickOverlay && m();
838
- }, E = () => {
836
+ }, v = (p) => {
837
+ t("clickOverlay", p), e.closeOnClickOverlay && d();
838
+ }, b = () => {
839
839
  if (e.overlay) {
840
- const y = P({
840
+ const p = T({
841
841
  show: e.show,
842
842
  class: e.overlayClass,
843
- zIndex: r.value,
843
+ zIndex: i.value,
844
844
  duration: e.duration,
845
845
  customStyle: e.overlayStyle,
846
846
  role: e.closeOnClickOverlay ? "button" : void 0,
847
847
  tabindex: e.closeOnClickOverlay ? 0 : void 0
848
848
  }, e.overlayProps);
849
- return h(yn, j(y, Te(), {
849
+ return h(Sn, H(p, $e(), {
850
850
  onClick: v
851
851
  }), {
852
852
  default: n["overlay-content"]
853
853
  });
854
854
  }
855
- }, B = (y) => {
856
- t("clickCloseIcon", y), m();
855
+ }, B = (p) => {
856
+ t("clickCloseIcon", p), d();
857
857
  }, k = () => {
858
858
  if (e.closeable)
859
859
  return h(Ge, {
860
860
  role: "button",
861
861
  tabindex: 0,
862
862
  name: e.closeIcon,
863
- class: [$e("close-icon", e.closeIconPosition), Ht],
863
+ class: [Te("close-icon", e.closeIconPosition), Yt],
864
864
  classPrefix: e.iconPrefix,
865
865
  onClick: B
866
866
  }, null);
867
867
  };
868
- let S;
869
- const ae = () => {
870
- S && clearTimeout(S), S = setTimeout(() => {
868
+ let I;
869
+ const se = () => {
870
+ I && clearTimeout(I), I = setTimeout(() => {
871
871
  t("opened");
872
872
  });
873
- }, se = () => t("closed"), X = (y) => t("keydown", y), f = i(() => {
874
- var y;
873
+ }, ue = () => t("closed"), G = (p) => t("keydown", p), m = r(() => {
874
+ var p;
875
875
  const {
876
- destroyOnClose: T,
877
- round: ue,
878
- position: Z,
876
+ destroyOnClose: z,
877
+ round: ce,
878
+ position: q,
879
879
  safeAreaInsetTop: nt,
880
880
  safeAreaInsetBottom: ot,
881
- show: we
881
+ show: Ce
882
882
  } = e;
883
- if (!(!we && T))
884
- return Ne(h("div", j({
885
- ref: a,
886
- style: d.value,
883
+ if (!(!Ce && z))
884
+ return _e(h("div", H({
885
+ ref: l,
886
+ style: f.value,
887
887
  role: "dialog",
888
888
  tabindex: 0,
889
- class: [$e({
890
- round: ue,
891
- [Z]: Z
889
+ class: [Te({
890
+ round: ce,
891
+ [q]: q
892
892
  }), {
893
893
  "van-safe-area-top": nt,
894
894
  "van-safe-area-bottom": ot
895
895
  }],
896
- onKeydown: X
897
- }, o, Te()), [(y = n.default) == null ? void 0 : y.call(n), k()]), [[Re, we]]);
898
- }), b = () => {
896
+ onKeydown: G
897
+ }, o, $e()), [(p = n.default) == null ? void 0 : p.call(n), k()]), [[Ne, Ce]]);
898
+ }), S = () => {
899
899
  const {
900
- position: y,
901
- transition: T,
902
- transitionAppear: ue
903
- } = e, Z = y === "center" ? "van-fade" : `van-popup-slide-${y}`;
904
- return h(Le, {
905
- name: T || Z,
906
- appear: ue,
907
- onAfterEnter: ae,
908
- onAfterLeave: se
900
+ position: p,
901
+ transition: z,
902
+ transitionAppear: ce
903
+ } = e, q = p === "center" ? "van-fade" : `van-popup-slide-${p}`;
904
+ return h(Fe, {
905
+ name: z || q,
906
+ appear: ce,
907
+ onAfterEnter: se,
908
+ onAfterLeave: ue
909
909
  }, {
910
- default: f
910
+ default: m
911
911
  });
912
912
  };
913
- return O(() => e.show, (y) => {
914
- y && !c && (g(), o.tabindex === 0 && me(() => {
915
- var T;
916
- (T = a.value) == null || T.focus();
917
- })), !y && c && (c = !1, t("close"));
913
+ return E(() => e.show, (p) => {
914
+ p && !s && (g(), o.tabindex === 0 && me(() => {
915
+ var z;
916
+ (z = l.value) == null || z.focus();
917
+ })), !p && s && (s = !1, t("close"));
918
918
  }), We({
919
- popupRef: a
920
- }), fn(a, () => e.show && e.lockScroll), Ee("popstate", () => {
921
- e.closeOnPopstate && (m(), s = !1);
922
- }), oe(() => {
919
+ popupRef: l
920
+ }), hn(l, () => e.show && e.lockScroll), Se("popstate", () => {
921
+ e.closeOnPopstate && (d(), u = !1);
922
+ }), Z(() => {
923
923
  e.show && g();
924
924
  }), he(() => {
925
- s && (t("update:show", !0), s = !1);
926
- }), ne(() => {
927
- e.show && e.teleport && (m(), s = !0);
928
- }), Fe(_t, () => e.show), () => e.teleport ? h(Ve, {
925
+ u && (t("update:show", !0), u = !1);
926
+ }), le(() => {
927
+ e.show && e.teleport && (d(), u = !0);
928
+ }), Le(Wt, () => e.show), () => e.teleport ? h(Ve, {
929
929
  to: e.teleport
930
930
  }, {
931
- default: () => [E(), b()]
932
- }) : h(ct, null, [E(), b()]);
931
+ default: () => [b(), S()]
932
+ }) : h(ct, null, [b(), S()]);
933
933
  }
934
934
  });
935
- const Cn = L(En);
936
- let M = 0;
937
- function wn(e) {
938
- e ? (M || document.body.classList.add("van-toast--unclickable"), M++) : M && (M--, M || document.body.classList.remove("van-toast--unclickable"));
935
+ const xn = V(En);
936
+ let Y = 0;
937
+ function Bn(e) {
938
+ e ? (Y || document.body.classList.add("van-toast--unclickable"), Y++) : Y && (Y--, Y || document.body.classList.remove("van-toast--unclickable"));
939
939
  }
940
- const [xn, V] = z("toast"), Bn = ["show", "overlay", "teleport", "transition", "overlayClass", "overlayStyle", "closeOnClickOverlay", "zIndex"], Sn = {
940
+ const [In, _] = A("toast"), kn = ["show", "overlay", "teleport", "transition", "overlayClass", "overlayStyle", "closeOnClickOverlay", "zIndex"], Pn = {
941
941
  icon: String,
942
942
  show: Boolean,
943
- type: w("text"),
943
+ type: x("text"),
944
944
  overlay: Boolean,
945
- message: C,
946
- iconSize: C,
947
- duration: xt(2e3),
948
- position: w("middle"),
945
+ message: w,
946
+ iconSize: w,
947
+ duration: It(2e3),
948
+ position: x("middle"),
949
949
  teleport: [String, Object],
950
950
  wordBreak: String,
951
- className: ee,
951
+ className: ne,
952
952
  iconPrefix: String,
953
- transition: w("van-fade"),
953
+ transition: x("van-fade"),
954
954
  loadingType: String,
955
955
  forbidClick: Boolean,
956
- overlayClass: ee,
956
+ overlayClass: ne,
957
957
  overlayStyle: Object,
958
958
  closeOnClick: Boolean,
959
959
  closeOnClickOverlay: Boolean,
960
- zIndex: C
960
+ zIndex: w
961
961
  };
962
- var et = x({
963
- name: xn,
964
- props: Sn,
962
+ var et = C({
963
+ name: In,
964
+ props: Pn,
965
965
  emits: ["update:show"],
966
966
  setup(e, {
967
967
  emit: t,
968
968
  slots: o
969
969
  }) {
970
- let n, c = !1;
971
- const s = () => {
972
- const m = e.show && e.forbidClick;
973
- c !== m && (c = m, wn(c));
974
- }, r = (m) => t("update:show", m), a = () => {
975
- e.closeOnClick && r(!1);
976
- }, i = () => clearTimeout(n), d = () => {
970
+ let n, s = !1;
971
+ const u = () => {
972
+ const d = e.show && e.forbidClick;
973
+ s !== d && (s = d, Bn(s));
974
+ }, i = (d) => t("update:show", d), l = () => {
975
+ e.closeOnClick && i(!1);
976
+ }, r = () => clearTimeout(n), f = () => {
977
977
  const {
978
- icon: m,
978
+ icon: d,
979
979
  type: v,
980
- iconSize: E,
980
+ iconSize: b,
981
981
  iconPrefix: B,
982
982
  loadingType: k
983
983
  } = e;
984
- if (m || v === "success" || v === "fail")
984
+ if (d || v === "success" || v === "fail")
985
985
  return h(Ge, {
986
- name: m || v,
987
- size: E,
988
- class: V("icon"),
986
+ name: d || v,
987
+ size: b,
988
+ class: _("icon"),
989
989
  classPrefix: B
990
990
  }, null);
991
991
  if (v === "loading")
992
992
  return h(qe, {
993
- class: V("loading"),
994
- size: E,
993
+ class: _("loading"),
994
+ size: b,
995
995
  type: k
996
996
  }, null);
997
997
  }, g = () => {
998
998
  const {
999
- type: m,
999
+ type: d,
1000
1000
  message: v
1001
1001
  } = e;
1002
1002
  if (o.message)
1003
1003
  return h("div", {
1004
- class: V("text")
1004
+ class: _("text")
1005
1005
  }, [o.message()]);
1006
1006
  if (D(v) && v !== "")
1007
- return m === "html" ? h("div", {
1007
+ return d === "html" ? h("div", {
1008
1008
  key: 0,
1009
- class: V("text"),
1009
+ class: _("text"),
1010
1010
  innerHTML: String(v)
1011
1011
  }, null) : h("div", {
1012
- class: V("text")
1012
+ class: _("text")
1013
1013
  }, [v]);
1014
1014
  };
1015
- return O(() => [e.show, e.forbidClick], s), O(() => [e.show, e.type, e.message, e.duration], () => {
1016
- i(), e.show && e.duration > 0 && (n = setTimeout(() => {
1017
- r(!1);
1015
+ return E(() => [e.show, e.forbidClick], u), E(() => [e.show, e.type, e.message, e.duration], () => {
1016
+ r(), e.show && e.duration > 0 && (n = setTimeout(() => {
1017
+ i(!1);
1018
1018
  }, e.duration));
1019
- }), oe(s), ze(s), () => h(Cn, j({
1020
- class: [V([e.position, e.wordBreak === "normal" ? "break-normal" : e.wordBreak, {
1019
+ }), Z(u), De(u), () => h(xn, H({
1020
+ class: [_([e.position, e.wordBreak === "normal" ? "break-normal" : e.wordBreak, {
1021
1021
  [e.type]: !e.icon
1022
1022
  }]), e.className],
1023
1023
  lockScroll: !1,
1024
- onClick: a,
1025
- onClosed: i,
1026
- "onUpdate:show": r
1027
- }, wt(e, Bn)), {
1028
- default: () => [d(), g()]
1024
+ onClick: l,
1025
+ onClosed: r,
1026
+ "onUpdate:show": i
1027
+ }, Bt(e, kn)), {
1028
+ default: () => [f(), g()]
1029
1029
  });
1030
1030
  }
1031
1031
  });
1032
- function kn() {
1032
+ function On() {
1033
1033
  const e = ge({
1034
1034
  show: !1
1035
- }), t = (c) => {
1036
- e.show = c;
1037
- }, o = (c) => {
1038
- P(e, c, { transitionAppear: !0 }), t(!0);
1035
+ }), t = (s) => {
1036
+ e.show = s;
1037
+ }, o = (s) => {
1038
+ T(e, s, { transitionAppear: !0 }), t(!0);
1039
1039
  }, n = () => t(!1);
1040
1040
  return We({ open: o, close: n, toggle: t }), {
1041
1041
  open: o,
@@ -1044,7 +1044,7 @@ function kn() {
1044
1044
  toggle: t
1045
1045
  };
1046
1046
  }
1047
- function In(e) {
1047
+ function $n(e) {
1048
1048
  const t = it(e), o = document.createElement("div");
1049
1049
  return document.body.appendChild(o), {
1050
1050
  instance: t.mount(o),
@@ -1053,7 +1053,7 @@ function In(e) {
1053
1053
  }
1054
1054
  };
1055
1055
  }
1056
- const On = {
1056
+ const Tn = {
1057
1057
  icon: "",
1058
1058
  type: "text",
1059
1059
  message: "",
@@ -1074,170 +1074,170 @@ const On = {
1074
1074
  closeOnClick: !1,
1075
1075
  closeOnClickOverlay: !1
1076
1076
  };
1077
- let J = [], Pn = !1, De = P({}, On);
1078
- const Tn = /* @__PURE__ */ new Map();
1079
- function $n(e) {
1080
- return le(e) ? e : {
1077
+ let ee = [], zn = !1, ze = T({}, Tn);
1078
+ const Dn = /* @__PURE__ */ new Map();
1079
+ function An(e) {
1080
+ return ae(e) ? e : {
1081
1081
  message: e
1082
1082
  };
1083
1083
  }
1084
- function Dn() {
1084
+ function Ln() {
1085
1085
  const {
1086
1086
  instance: e
1087
- } = In({
1087
+ } = $n({
1088
1088
  setup() {
1089
- const t = p(""), {
1089
+ const t = y(""), {
1090
1090
  open: o,
1091
1091
  state: n,
1092
- close: c,
1093
- toggle: s
1094
- } = kn(), r = () => {
1095
- }, a = () => h(et, j(n, {
1096
- onClosed: r,
1097
- "onUpdate:show": s
1092
+ close: s,
1093
+ toggle: u
1094
+ } = On(), i = () => {
1095
+ }, l = () => h(et, H(n, {
1096
+ onClosed: i,
1097
+ "onUpdate:show": u
1098
1098
  }), null);
1099
- return O(t, (i) => {
1100
- n.message = i;
1101
- }), ye().render = a, {
1099
+ return E(t, (r) => {
1100
+ n.message = r;
1101
+ }), pe().render = l, {
1102
1102
  open: o,
1103
- close: c,
1103
+ close: s,
1104
1104
  message: t
1105
1105
  };
1106
1106
  }
1107
1107
  });
1108
1108
  return e;
1109
1109
  }
1110
- function zn() {
1111
- if (!J.length || Pn) {
1112
- const e = Dn();
1113
- J.push(e);
1110
+ function Fn() {
1111
+ if (!ee.length || zn) {
1112
+ const e = Ln();
1113
+ ee.push(e);
1114
1114
  }
1115
- return J[J.length - 1];
1115
+ return ee[ee.length - 1];
1116
1116
  }
1117
- function An(e = {}) {
1118
- if (!pe)
1117
+ function Vn(e = {}) {
1118
+ if (!ye)
1119
1119
  return {};
1120
- const t = zn(), o = $n(e);
1121
- return t.open(P({}, De, Tn.get(o.type || De.type), o)), t;
1120
+ const t = Fn(), o = An(e);
1121
+ return t.open(T({}, ze, Dn.get(o.type || ze.type), o)), t;
1122
1122
  }
1123
- L(et);
1124
- const [Fn, _, Ln] = z("pull-refresh"), tt = 50, Vn = ["pulling", "loosing", "success"], Nn = {
1123
+ V(et);
1124
+ const [_n, U, Nn] = A("pull-refresh"), tt = 50, Rn = ["pulling", "loosing", "success"], jn = {
1125
1125
  disabled: Boolean,
1126
1126
  modelValue: Boolean,
1127
- headHeight: ie(tt),
1127
+ headHeight: re(tt),
1128
1128
  successText: String,
1129
1129
  pullingText: String,
1130
1130
  loosingText: String,
1131
1131
  loadingText: String,
1132
- pullDistance: C,
1133
- successDuration: ie(500),
1134
- animationDuration: ie(300)
1132
+ pullDistance: w,
1133
+ successDuration: re(500),
1134
+ animationDuration: re(300)
1135
1135
  };
1136
- var Rn = x({
1137
- name: Fn,
1138
- props: Nn,
1136
+ var Hn = C({
1137
+ name: _n,
1138
+ props: jn,
1139
1139
  emits: ["change", "refresh", "update:modelValue"],
1140
1140
  setup(e, {
1141
1141
  emit: t,
1142
1142
  slots: o
1143
1143
  }) {
1144
1144
  let n;
1145
- const c = p(), s = p(), r = It(c), a = ge({
1145
+ const s = y(), u = y(), i = $t(s), l = ge({
1146
1146
  status: "normal",
1147
1147
  distance: 0,
1148
1148
  duration: 0
1149
- }), i = Je(), d = () => {
1149
+ }), r = Je(), f = () => {
1150
1150
  if (e.headHeight !== tt)
1151
1151
  return {
1152
1152
  height: `${e.headHeight}px`
1153
1153
  };
1154
- }, g = () => a.status !== "loading" && a.status !== "success" && !e.disabled, m = (f) => {
1155
- const b = +(e.pullDistance || e.headHeight);
1156
- return f > b && (f < b * 2 ? f = b + (f - b) / 2 : f = b * 1.5 + (f - b * 2) / 4), Math.round(f);
1157
- }, v = (f, b) => {
1158
- const y = +(e.pullDistance || e.headHeight);
1159
- a.distance = f, b ? a.status = "loading" : f === 0 ? a.status = "normal" : f < y ? a.status = "pulling" : a.status = "loosing", t("change", {
1160
- status: a.status,
1161
- distance: f
1154
+ }, g = () => l.status !== "loading" && l.status !== "success" && !e.disabled, d = (m) => {
1155
+ const S = +(e.pullDistance || e.headHeight);
1156
+ return m > S && (m < S * 2 ? m = S + (m - S) / 2 : m = S * 1.5 + (m - S * 2) / 4), Math.round(m);
1157
+ }, v = (m, S) => {
1158
+ const p = +(e.pullDistance || e.headHeight);
1159
+ l.distance = m, S ? l.status = "loading" : m === 0 ? l.status = "normal" : m < p ? l.status = "pulling" : l.status = "loosing", t("change", {
1160
+ status: l.status,
1161
+ distance: m
1162
1162
  });
1163
- }, E = () => {
1163
+ }, b = () => {
1164
1164
  const {
1165
- status: f
1166
- } = a;
1167
- return f === "normal" ? "" : e[`${f}Text`] || Ln(f);
1165
+ status: m
1166
+ } = l;
1167
+ return m === "normal" ? "" : e[`${m}Text`] || Nn(m);
1168
1168
  }, B = () => {
1169
1169
  const {
1170
- status: f,
1171
- distance: b
1172
- } = a;
1173
- if (o[f])
1174
- return o[f]({
1175
- distance: b
1170
+ status: m,
1171
+ distance: S
1172
+ } = l;
1173
+ if (o[m])
1174
+ return o[m]({
1175
+ distance: S
1176
1176
  });
1177
- const y = [];
1178
- return Vn.includes(f) && y.push(h("div", {
1179
- class: _("text")
1180
- }, [E()])), f === "loading" && y.push(h(qe, {
1181
- class: _("loading")
1177
+ const p = [];
1178
+ return Rn.includes(m) && p.push(h("div", {
1179
+ class: U("text")
1180
+ }, [b()])), m === "loading" && p.push(h(qe, {
1181
+ class: U("loading")
1182
1182
  }, {
1183
- default: E
1184
- })), y;
1183
+ default: b
1184
+ })), p;
1185
1185
  }, k = () => {
1186
- a.status = "success", setTimeout(() => {
1186
+ l.status = "success", setTimeout(() => {
1187
1187
  v(0);
1188
1188
  }, +e.successDuration);
1189
- }, S = (f) => {
1190
- n = Ot(r.value) === 0, n && (a.duration = 0, i.start(f));
1191
- }, ae = (f) => {
1192
- g() && S(f);
1193
- }, se = (f) => {
1189
+ }, I = (m) => {
1190
+ n = Tt(i.value) === 0, n && (l.duration = 0, r.start(m));
1191
+ }, se = (m) => {
1192
+ g() && I(m);
1193
+ }, ue = (m) => {
1194
1194
  if (g()) {
1195
- n || S(f);
1195
+ n || I(m);
1196
1196
  const {
1197
- deltaY: b
1198
- } = i;
1199
- i.move(f), n && b.value >= 0 && i.isVertical() && (Ce(f), v(m(b.value)));
1197
+ deltaY: S
1198
+ } = r;
1199
+ r.move(m), n && S.value >= 0 && r.isVertical() && (we(m), v(d(S.value)));
1200
1200
  }
1201
- }, X = () => {
1202
- n && i.deltaY.value && g() && (a.duration = +e.animationDuration, a.status === "loosing" ? (v(+e.headHeight, !0), t("update:modelValue", !0), me(() => t("refresh"))) : v(0));
1201
+ }, G = () => {
1202
+ n && r.deltaY.value && g() && (l.duration = +e.animationDuration, l.status === "loosing" ? (v(+e.headHeight, !0), t("update:modelValue", !0), me(() => t("refresh"))) : v(0));
1203
1203
  };
1204
- return O(() => e.modelValue, (f) => {
1205
- a.duration = +e.animationDuration, f ? v(+e.headHeight, !0) : o.success || e.successText ? k() : v(0, !1);
1206
- }), Ee("touchmove", se, {
1207
- target: s
1204
+ return E(() => e.modelValue, (m) => {
1205
+ l.duration = +e.animationDuration, m ? v(+e.headHeight, !0) : o.success || e.successText ? k() : v(0, !1);
1206
+ }), Se("touchmove", ue, {
1207
+ target: u
1208
1208
  }), () => {
1209
- var f;
1210
- const b = {
1211
- transitionDuration: `${a.duration}ms`,
1212
- transform: a.distance ? `translate3d(0,${a.distance}px, 0)` : ""
1209
+ var m;
1210
+ const S = {
1211
+ transitionDuration: `${l.duration}ms`,
1212
+ transform: l.distance ? `translate3d(0,${l.distance}px, 0)` : ""
1213
1213
  };
1214
1214
  return h("div", {
1215
- ref: c,
1216
- class: _()
1217
- }, [h("div", {
1218
1215
  ref: s,
1219
- class: _("track"),
1220
- style: b,
1221
- onTouchstartPassive: ae,
1222
- onTouchend: X,
1223
- onTouchcancel: X
1216
+ class: U()
1224
1217
  }, [h("div", {
1225
- class: _("head"),
1226
- style: d()
1227
- }, [B()]), (f = o.default) == null ? void 0 : f.call(o)])]);
1218
+ ref: u,
1219
+ class: U("track"),
1220
+ style: S,
1221
+ onTouchstartPassive: se,
1222
+ onTouchend: G,
1223
+ onTouchcancel: G
1224
+ }, [h("div", {
1225
+ class: U("head"),
1226
+ style: f()
1227
+ }, [B()]), (m = o.default) == null ? void 0 : m.call(o)])]);
1228
1228
  };
1229
1229
  }
1230
1230
  });
1231
- const jn = L(Rn), Hn = {
1231
+ const Mn = V(Hn), Yn = {
1232
1232
  key: 0,
1233
1233
  class: "mx-app-page-header"
1234
- }, Mn = {
1234
+ }, Un = {
1235
1235
  key: 0,
1236
1236
  class: "mx-app-page-header-left"
1237
- }, _n = { class: "mx-app-page-header-center" }, Yn = { class: "mx-app-page-title" }, Un = { class: "mx-app-page-header-right" }, Wn = {
1237
+ }, Wn = { class: "mx-app-page-header-center" }, Kn = { class: "mx-app-page-title" }, Xn = { class: "mx-app-page-header-right" }, Zn = {
1238
1238
  key: 1,
1239
1239
  class: "mx-app-page-search"
1240
- }, Kn = { class: "search-content" }, Xn = /* @__PURE__ */ x({
1240
+ }, Gn = { class: "search-content" }, qn = /* @__PURE__ */ C({
1241
1241
  __name: "index",
1242
1242
  props: {
1243
1243
  title: { default: "" },
@@ -1255,197 +1255,264 @@ const jn = L(Rn), Hn = {
1255
1255
  },
1256
1256
  emits: ["back", "refresh"],
1257
1257
  setup(e, { emit: t }) {
1258
- const o = t, n = p(0), c = p(!1), s = () => {
1258
+ const o = t, n = y(0), s = y(!1), u = () => {
1259
1259
  setTimeout(() => {
1260
- An("刷新成功"), c.value = !1, n.value++;
1260
+ Vn("刷新成功"), s.value = !1, n.value++;
1261
1261
  }, 1e3);
1262
- }, r = p(), a = () => {
1262
+ }, i = y(), l = () => {
1263
1263
  o("back");
1264
1264
  };
1265
- return (i, d) => ($(), Y("div", {
1265
+ return (r, f) => (O(), N("div", {
1266
1266
  id: "id",
1267
- class: W([
1267
+ class: K([
1268
1268
  "mx-app-page",
1269
1269
  {
1270
1270
  "mx-app-page-with-header": e.showHeader
1271
1271
  }
1272
1272
  ])
1273
1273
  }, [
1274
- e.showHeader ? ($(), Y("header", Hn, [
1275
- e.showBack ? ($(), Y("div", Mn, [
1276
- l("div", {
1274
+ e.showHeader ? (O(), N("header", Yn, [
1275
+ e.showBack ? (O(), N("div", Un, [
1276
+ a("div", {
1277
1277
  class: "mx-app-page-back",
1278
- onClick: a
1279
- }, [...d[1] || (d[1] = [
1280
- l("i", { class: "iconfont icon-fanhui1 icon" }, null, -1)
1278
+ onClick: l
1279
+ }, [...f[1] || (f[1] = [
1280
+ a("i", { class: "iconfont icon-fanhui1 icon" }, null, -1)
1281
1281
  ])])
1282
- ])) : ce("", !0),
1283
- l("div", _n, [
1284
- N(i.$slots, "title", {}, () => [
1285
- l("span", Yn, u(e.title), 1)
1282
+ ])) : ie("", !0),
1283
+ a("div", Wn, [
1284
+ R(r.$slots, "title", {}, () => [
1285
+ a("span", Kn, c(e.title), 1)
1286
1286
  ], !0)
1287
1287
  ]),
1288
- l("div", Un, [
1289
- N(i.$slots, "header-right", {}, void 0, !0)
1288
+ a("div", Xn, [
1289
+ R(r.$slots, "header-right", {}, void 0, !0)
1290
1290
  ])
1291
- ])) : ce("", !0),
1292
- e.showSearch ? ($(), Y("div", Wn, [
1293
- l("div", Kn, [
1294
- N(i.$slots, "search", {}, void 0, !0)
1291
+ ])) : ie("", !0),
1292
+ e.showSearch ? (O(), N("div", Zn, [
1293
+ a("div", Gn, [
1294
+ R(r.$slots, "search", {}, void 0, !0)
1295
1295
  ]),
1296
- d[2] || (d[2] = l("i", { class: "iconfont icon-sousuo icon" }, null, -1))
1297
- ])) : ce("", !0),
1298
- l("div", {
1299
- class: W(["mx-app-page-content-wrapper", {
1296
+ f[2] || (f[2] = a("i", { class: "iconfont icon-sousuo icon" }, null, -1))
1297
+ ])) : ie("", !0),
1298
+ a("div", {
1299
+ class: K(["mx-app-page-content-wrapper", {
1300
1300
  "has-search": e.showSearch,
1301
1301
  "has-header": e.showHeader
1302
1302
  }]),
1303
1303
  ref_key: "contentWrapperRef",
1304
- ref: r
1304
+ ref: i
1305
1305
  }, [
1306
- h(R(jn), {
1307
- modelValue: c.value,
1308
- "onUpdate:modelValue": d[0] || (d[0] = (g) => c.value = g),
1309
- onRefresh: s
1306
+ h(j(Mn), {
1307
+ modelValue: s.value,
1308
+ "onUpdate:modelValue": f[0] || (f[0] = (g) => s.value = g),
1309
+ onRefresh: u
1310
1310
  }, {
1311
- default: Q(() => [
1312
- l("p", null, "刷新次数: " + u(n.value), 1),
1313
- l("p", null, "刷新次数: " + u(n.value), 1),
1314
- l("p", null, "刷新次数: " + u(n.value), 1),
1315
- l("p", null, "刷新次数: " + u(n.value), 1),
1316
- l("p", null, "刷新次数: " + u(n.value), 1),
1317
- l("p", null, "刷新次数: " + u(n.value), 1),
1318
- l("p", null, "刷新次数: " + u(n.value), 1),
1319
- l("p", null, "刷新次数: " + u(n.value), 1),
1320
- l("p", null, "刷新次数: " + u(n.value), 1),
1321
- l("p", null, "刷新次数: " + u(n.value), 1),
1322
- l("p", null, "刷新次数: " + u(n.value), 1),
1323
- l("p", null, "刷新次数: " + u(n.value), 1),
1324
- l("p", null, "刷新次数: " + u(n.value), 1),
1325
- l("p", null, "刷新次数: " + u(n.value), 1),
1326
- l("p", null, "刷新次数: " + u(n.value), 1),
1327
- l("p", null, "刷新次数: " + u(n.value), 1),
1328
- l("p", null, "刷新次数: " + u(n.value), 1),
1329
- l("p", null, "刷新次数: " + u(n.value), 1),
1330
- l("p", null, "刷新次数: " + u(n.value), 1),
1331
- l("p", null, "刷新次数: " + u(n.value), 1),
1332
- l("p", null, "刷新次数: " + u(n.value), 1),
1333
- l("p", null, "刷新次数: " + u(n.value), 1),
1334
- l("p", null, "刷新次数: " + u(n.value), 1),
1335
- l("p", null, "刷新次数: " + u(n.value), 1),
1336
- l("p", null, "刷新次数: " + u(n.value), 1),
1337
- l("p", null, "刷新次数: " + u(n.value), 1),
1338
- l("p", null, "刷新次数: " + u(n.value), 1),
1339
- l("p", null, "刷新次数: " + u(n.value), 1),
1340
- l("p", null, "刷新次数: " + u(n.value), 1),
1341
- l("p", null, "刷新次数: " + u(n.value), 1),
1342
- l("p", null, "刷新次数: " + u(n.value), 1),
1343
- l("p", null, "刷新次数: " + u(n.value), 1),
1344
- l("p", null, "刷新次数: " + u(n.value), 1),
1345
- l("p", null, "刷新次数: " + u(n.value), 1),
1346
- l("p", null, "刷新次数: " + u(n.value), 1),
1347
- l("p", null, "刷新次数: " + u(n.value), 1),
1348
- l("p", null, "刷新次数: " + u(n.value), 1),
1349
- l("p", null, "刷新次数: " + u(n.value), 1),
1350
- l("p", null, "刷新次数: " + u(n.value), 1),
1351
- l("p", null, "刷新次数: " + u(n.value), 1),
1352
- l("p", null, "刷新次数: " + u(n.value), 1),
1353
- l("p", null, "刷新次数: " + u(n.value), 1),
1354
- l("p", null, "刷新次数: " + u(n.value), 1),
1355
- l("p", null, "刷新次数: " + u(n.value), 1),
1356
- l("p", null, "刷新次数: " + u(n.value), 1),
1357
- l("p", null, "刷新次数: " + u(n.value), 1),
1358
- l("p", null, "刷新次数: " + u(n.value), 1),
1359
- l("p", null, "刷新次数: " + u(n.value), 1),
1360
- l("p", null, "刷新次数: " + u(n.value), 1),
1361
- l("p", null, "刷新次数: " + u(n.value), 1),
1362
- l("p", null, "刷新次数: " + u(n.value), 1),
1363
- l("p", null, "刷新次数: " + u(n.value), 1),
1364
- l("p", null, "刷新次数: " + u(n.value), 1),
1365
- l("p", null, "刷新次数: " + u(n.value), 1),
1366
- l("p", null, "刷新次数: " + u(n.value), 1),
1367
- l("p", null, "刷新次数: " + u(n.value), 1),
1368
- l("p", null, "刷新次数: " + u(n.value), 1),
1369
- l("p", null, "刷新次数: " + u(n.value), 1),
1370
- l("p", null, "刷新次数: " + u(n.value), 1),
1371
- l("p", null, "刷新次数: " + u(n.value), 1),
1372
- l("p", null, "刷新次数: " + u(n.value), 1),
1373
- l("p", null, "刷新次数: " + u(n.value), 1),
1374
- l("p", null, "刷新次数: " + u(n.value), 1),
1375
- l("p", null, "刷新次数: " + u(n.value), 1),
1376
- l("p", null, "刷新次数: " + u(n.value), 1),
1377
- l("p", null, "刷新次数: " + u(n.value), 1),
1378
- l("p", null, "刷新次数: " + u(n.value), 1),
1379
- l("p", null, "刷新次数: " + u(n.value), 1)
1311
+ default: te(() => [
1312
+ a("p", null, "刷新次数: " + c(n.value), 1),
1313
+ a("p", null, "刷新次数: " + c(n.value), 1),
1314
+ a("p", null, "刷新次数: " + c(n.value), 1),
1315
+ a("p", null, "刷新次数: " + c(n.value), 1),
1316
+ a("p", null, "刷新次数: " + c(n.value), 1),
1317
+ a("p", null, "刷新次数: " + c(n.value), 1),
1318
+ a("p", null, "刷新次数: " + c(n.value), 1),
1319
+ a("p", null, "刷新次数: " + c(n.value), 1),
1320
+ a("p", null, "刷新次数: " + c(n.value), 1),
1321
+ a("p", null, "刷新次数: " + c(n.value), 1),
1322
+ a("p", null, "刷新次数: " + c(n.value), 1),
1323
+ a("p", null, "刷新次数: " + c(n.value), 1),
1324
+ a("p", null, "刷新次数: " + c(n.value), 1),
1325
+ a("p", null, "刷新次数: " + c(n.value), 1),
1326
+ a("p", null, "刷新次数: " + c(n.value), 1),
1327
+ a("p", null, "刷新次数: " + c(n.value), 1),
1328
+ a("p", null, "刷新次数: " + c(n.value), 1),
1329
+ a("p", null, "刷新次数: " + c(n.value), 1),
1330
+ a("p", null, "刷新次数: " + c(n.value), 1),
1331
+ a("p", null, "刷新次数: " + c(n.value), 1),
1332
+ a("p", null, "刷新次数: " + c(n.value), 1),
1333
+ a("p", null, "刷新次数: " + c(n.value), 1),
1334
+ a("p", null, "刷新次数: " + c(n.value), 1),
1335
+ a("p", null, "刷新次数: " + c(n.value), 1),
1336
+ a("p", null, "刷新次数: " + c(n.value), 1),
1337
+ a("p", null, "刷新次数: " + c(n.value), 1),
1338
+ a("p", null, "刷新次数: " + c(n.value), 1),
1339
+ a("p", null, "刷新次数: " + c(n.value), 1),
1340
+ a("p", null, "刷新次数: " + c(n.value), 1),
1341
+ a("p", null, "刷新次数: " + c(n.value), 1),
1342
+ a("p", null, "刷新次数: " + c(n.value), 1),
1343
+ a("p", null, "刷新次数: " + c(n.value), 1),
1344
+ a("p", null, "刷新次数: " + c(n.value), 1),
1345
+ a("p", null, "刷新次数: " + c(n.value), 1),
1346
+ a("p", null, "刷新次数: " + c(n.value), 1),
1347
+ a("p", null, "刷新次数: " + c(n.value), 1),
1348
+ a("p", null, "刷新次数: " + c(n.value), 1),
1349
+ a("p", null, "刷新次数: " + c(n.value), 1),
1350
+ a("p", null, "刷新次数: " + c(n.value), 1),
1351
+ a("p", null, "刷新次数: " + c(n.value), 1),
1352
+ a("p", null, "刷新次数: " + c(n.value), 1),
1353
+ a("p", null, "刷新次数: " + c(n.value), 1),
1354
+ a("p", null, "刷新次数: " + c(n.value), 1),
1355
+ a("p", null, "刷新次数: " + c(n.value), 1),
1356
+ a("p", null, "刷新次数: " + c(n.value), 1),
1357
+ a("p", null, "刷新次数: " + c(n.value), 1),
1358
+ a("p", null, "刷新次数: " + c(n.value), 1),
1359
+ a("p", null, "刷新次数: " + c(n.value), 1),
1360
+ a("p", null, "刷新次数: " + c(n.value), 1),
1361
+ a("p", null, "刷新次数: " + c(n.value), 1),
1362
+ a("p", null, "刷新次数: " + c(n.value), 1),
1363
+ a("p", null, "刷新次数: " + c(n.value), 1),
1364
+ a("p", null, "刷新次数: " + c(n.value), 1),
1365
+ a("p", null, "刷新次数: " + c(n.value), 1),
1366
+ a("p", null, "刷新次数: " + c(n.value), 1),
1367
+ a("p", null, "刷新次数: " + c(n.value), 1),
1368
+ a("p", null, "刷新次数: " + c(n.value), 1),
1369
+ a("p", null, "刷新次数: " + c(n.value), 1),
1370
+ a("p", null, "刷新次数: " + c(n.value), 1),
1371
+ a("p", null, "刷新次数: " + c(n.value), 1),
1372
+ a("p", null, "刷新次数: " + c(n.value), 1),
1373
+ a("p", null, "刷新次数: " + c(n.value), 1),
1374
+ a("p", null, "刷新次数: " + c(n.value), 1),
1375
+ a("p", null, "刷新次数: " + c(n.value), 1),
1376
+ a("p", null, "刷新次数: " + c(n.value), 1),
1377
+ a("p", null, "刷新次数: " + c(n.value), 1),
1378
+ a("p", null, "刷新次数: " + c(n.value), 1),
1379
+ a("p", null, "刷新次数: " + c(n.value), 1)
1380
1380
  ]),
1381
1381
  _: 1
1382
1382
  }, 8, ["modelValue"])
1383
1383
  ], 2)
1384
1384
  ], 2));
1385
1385
  }
1386
- }), Zn = /* @__PURE__ */ K(Xn, [["__scopeId", "data-v-4ad76a0d"]]), Gn = /* @__PURE__ */ x({
1387
- __name: "index",
1386
+ }), Jn = /* @__PURE__ */ F(qn, [["__scopeId", "data-v-4ad76a0d"]]), Qn = ["innerHTML"], eo = /* @__PURE__ */ C({
1387
+ __name: "svg",
1388
1388
  props: {
1389
1389
  // 图标类名
1390
- icon: {
1391
- type: String,
1392
- default: ""
1393
- },
1390
+ icon: { type: String, default: "" },
1394
1391
  // 图标大小
1395
- size: {
1396
- type: String,
1397
- default: "32px"
1398
- },
1392
+ size: { type: String, default: "" },
1399
1393
  /**
1400
1394
  * 是否为线图标
1401
1395
  */
1402
- isLineIcon: {
1403
- type: Boolean,
1404
- default: !1
1405
- },
1396
+ isLineIcon: { type: Boolean, default: !1 },
1406
1397
  // 图标地址
1407
- iconPath: {
1408
- type: String,
1409
- default: ""
1398
+ iconPath: { type: String, default: "" },
1399
+ // 支持通过 color 修改 svg 的填充/描边颜色
1400
+ color: { type: String, default: "" }
1401
+ },
1402
+ setup(e) {
1403
+ const t = e, o = y(""), n = $(() => {
1404
+ if (!t.icon) return "";
1405
+ const i = t.isLineIcon ? "line" : "mine";
1406
+ return `${t.iconPath}${i}/${t.icon}.svg`;
1407
+ });
1408
+ E([() => t.icon, () => t.isLineIcon, () => t.iconPath], s), E(() => t.color, u), Z(() => {
1409
+ s();
1410
+ });
1411
+ async function s() {
1412
+ if (!t.icon) {
1413
+ o.value = "";
1414
+ return;
1415
+ }
1416
+ const i = n.value;
1417
+ try {
1418
+ const l = await fetch(i);
1419
+ if (!l.ok) {
1420
+ o.value = "";
1421
+ return;
1422
+ }
1423
+ const r = await l.text(), d = new DOMParser().parseFromString(r, "image/svg+xml").querySelector("svg");
1424
+ if (!d) {
1425
+ o.value = r;
1426
+ return;
1427
+ }
1428
+ d.querySelectorAll("[fill]").forEach((b) => b.removeAttribute("fill")), d.setAttribute("fill", "currentColor"), d.removeAttribute("width"), d.removeAttribute("height");
1429
+ const v = new XMLSerializer();
1430
+ o.value = v.serializeToString(d);
1431
+ } catch {
1432
+ o.value = "";
1433
+ }
1434
+ }
1435
+ function u() {
1410
1436
  }
1437
+ return (i, l) => (O(), N("span", {
1438
+ class: "custom_icon",
1439
+ style: X({ width: t.size, height: t.size, color: t.color }),
1440
+ innerHTML: o.value
1441
+ }, null, 12, Qn));
1442
+ }
1443
+ }), to = /* @__PURE__ */ F(eo, [["__scopeId", "data-v-293c5ff4"]]), no = /* @__PURE__ */ C({
1444
+ __name: "bg",
1445
+ props: {
1446
+ // 图标类名
1447
+ icon: { type: String, default: "" },
1448
+ // 图标大小
1449
+ size: { type: String, default: "" },
1450
+ /**
1451
+ * 是否为线图标
1452
+ */
1453
+ isLineIcon: { type: Boolean, default: !1 },
1454
+ // 图标地址
1455
+ iconPath: { type: String, default: "" }
1411
1456
  },
1412
1457
  setup(e) {
1413
- const t = e, o = F(() => {
1458
+ const t = e, o = $(() => {
1414
1459
  if (!t.icon) return "";
1415
- const n = t.isLineIcon ? "menu" : "icon";
1416
- return new URL(`${t.iconPath ? t.iconPath : "/src/assets/iconImages/"}${n}/${t.icon}.png`, import.meta.url).href;
1460
+ const n = t.isLineIcon ? "line" : "mine";
1461
+ return `${t.iconPath}${n}/${t.icon}.svg`;
1417
1462
  });
1418
- return (n, c) => ($(), Y("i", {
1463
+ return (n, s) => (O(), N("i", {
1419
1464
  class: "icon custom_icon",
1420
- style: te({
1421
- width: e.size,
1422
- height: e.size,
1465
+ style: X({
1466
+ width: t.size,
1467
+ height: t.size,
1423
1468
  backgroundImage: "url(" + o.value + ")"
1424
1469
  })
1425
1470
  }, null, 4));
1426
1471
  }
1427
- }), qn = /* @__PURE__ */ K(Gn, [["__scopeId", "data-v-9d934115"]]), to = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1472
+ }), oo = /* @__PURE__ */ F(no, [["__scopeId", "data-v-f5089bc1"]]), lo = /* @__PURE__ */ C({
1473
+ __name: "index",
1474
+ props: {
1475
+ // 图标类名
1476
+ icon: { type: String, default: "" },
1477
+ // 图标大小
1478
+ size: { type: String, default: "32px" },
1479
+ /**
1480
+ * 是否为线图标
1481
+ */
1482
+ isLineIcon: { type: Boolean, default: !1 },
1483
+ // 图标地址
1484
+ iconPath: { type: String, default: "http://8.155.35.80:9000/lv-test/icons/" },
1485
+ // 支持通过 color 修改 svg 的填充/描边颜色
1486
+ color: { type: String, default: "" },
1487
+ // 是否为背景图标
1488
+ isBgIcon: { type: Boolean, default: !1 }
1489
+ },
1490
+ setup(e) {
1491
+ const t = e, o = $(() => t.isBgIcon || !t.isLineIcon ? oo : to);
1492
+ return (n, s) => (O(), oe(rt(o.value), dt(ft(t)), null, 16));
1493
+ }
1494
+ }), ao = /* @__PURE__ */ F(lo, [["__scopeId", "data-v-926a7644"]]), io = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1428
1495
  __proto__: null
1429
- }, Symbol.toStringTag, { value: "Module" })), Jn = {
1430
- Button: mt,
1431
- Input: gt,
1432
- Card: pt,
1433
- AppPage: Zn,
1434
- CustomIcon: qn
1435
- }, no = {
1496
+ }, Symbol.toStringTag, { value: "Module" })), so = {
1497
+ Button: pt,
1498
+ Input: bt,
1499
+ Card: wt,
1500
+ AppPage: Jn,
1501
+ CustomIcon: ao
1502
+ }, ro = {
1436
1503
  install: (e) => {
1437
- Object.values(Jn).forEach((t) => {
1504
+ Object.values(so).forEach((t) => {
1438
1505
  e.component(t.name, t);
1439
1506
  });
1440
1507
  }
1441
1508
  };
1442
1509
  export {
1443
- Zn as AppPage,
1444
- mt as Button,
1445
- pt as Card,
1446
- qn as CustomIcon,
1447
- gt as Input,
1448
- Jn as components,
1449
- no as default,
1450
- to as types
1510
+ Jn as AppPage,
1511
+ pt as Button,
1512
+ wt as Card,
1513
+ ao as CustomIcon,
1514
+ bt as Input,
1515
+ so as components,
1516
+ ro as default,
1517
+ io as types
1451
1518
  };