y-design-ssr 1.1.10 → 1.1.12

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/libs/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { ref as L, reactive as F, getCurrentInstance as le, provide as _t, isVNode as Se, inject as zt, onUnmounted as we, computed as B, defineComponent as z, createVNode as f, watch as j, onMounted as K, nextTick as ie, onBeforeUnmount as xe, onBeforeUpdate as st, onUpdated as yn, createTextVNode as bn, Fragment as He, createApp as Ce, h as Ve, Transition as We, withDirectives as te, vShow as ye, Teleport as ct, vModelText as Ot, mergeProps as Ie, vModelDynamic as Sn, resolveDirective as gt, watchEffect as wn, unref as pt } from "vue";
1
+ import { ref as L, reactive as F, getCurrentInstance as le, provide as _t, isVNode as Se, inject as zt, onUnmounted as we, computed as B, defineComponent as z, createVNode as f, watch as j, onMounted as Z, nextTick as ue, onBeforeUnmount as xe, onBeforeUpdate as st, onUpdated as yn, createTextVNode as bn, Fragment as He, createApp as Ce, h as Ve, Transition as We, withDirectives as te, vShow as ye, Teleport as ct, vModelText as Ot, mergeProps as Ie, vModelDynamic as Sn, resolveDirective as gt, watchEffect as wn, unref as pt } from "vue";
2
2
  const xn = {
3
3
  "pull-refresh": {
4
4
  pulling: "下拉刷新...",
@@ -231,13 +231,13 @@ const R = (e) => isNaN(Number(e)) && typeof e == "string" ? e : `${e}px`, bt = (
231
231
  if (!e.lazy)
232
232
  return;
233
233
  const $ = i.size + i.space, _ = r.length * $;
234
- let W = -(m.offset + I.offset) - m.cloneNodeCount * $;
234
+ let W = -(m.offset + V.offset) - m.cloneNodeCount * $;
235
235
  W < 0 && (W += _);
236
- const q = W + m.viewportSize;
236
+ const G = W + m.viewportSize;
237
237
  for (let X = 0; X < r.length; X++)
238
238
  if (!s.list[X]) {
239
239
  const J = $ * X, re = J + i.size;
240
- (J >= W && J < q || re > W && re < q || J < W && re > q) && (s.list[X] = !0);
240
+ (J >= W && J < G || re > W && re < G || J < W && re > G) && (s.list[X] = !0);
241
241
  }
242
242
  }, s = F({
243
243
  list: c()
@@ -265,17 +265,17 @@ const R = (e) => isNaN(Number(e)) && typeof e == "string" ? e : `${e}px`, bt = (
265
265
  } = g.value.getBoundingClientRect();
266
266
  e.vertical ? d(e.itemSize, _) : d(e.itemSize, $), l.value = l.value >= r.length ? r.length - 1 : l.value, l.value < 0 && (l.value = 0), u(l.value), w(), D();
267
267
  };
268
- K(() => {
269
- if (ie(S).catch(() => {
268
+ Z(() => {
269
+ if (ue(S).catch(() => {
270
270
  }), e.touchable && g.value) {
271
271
  const $ = g.value;
272
- $.addEventListener("touchstart", U, !1), $.addEventListener("mousedown", U, !1), $.addEventListener("touchmove", Z, !1), $.addEventListener("mousemove", Z, !1), $.addEventListener("touchend", P, !1), $.addEventListener("mouseup", P, !1), $.addEventListener("mouseleave", P, !1), $.addEventListener("touchcancel", P, !1);
272
+ $.addEventListener("touchstart", U, !1), $.addEventListener("mousedown", U, !1), $.addEventListener("touchmove", q, !1), $.addEventListener("mousemove", q, !1), $.addEventListener("touchend", I, !1), $.addEventListener("mouseup", I, !1), $.addEventListener("mouseleave", I, !1), $.addEventListener("touchcancel", I, !1);
273
273
  }
274
274
  window.addEventListener("resize", S, !1), window.addEventListener("orientationchange", S, !1);
275
275
  }), xe(() => {
276
- if (V(), e.touchable && g.value) {
276
+ if (P(), e.touchable && g.value) {
277
277
  const $ = g.value;
278
- $.removeEventListener("touchstart", U, !1), $.removeEventListener("mousedown", U, !1), $.removeEventListener("mousemove", Z, !1), $.removeEventListener("touchmove", Z, !1), $.removeEventListener("mouseup", P, !1), $.removeEventListener("touchend", P, !1), $.removeEventListener("mouseleave", P, !1), $.removeEventListener("touchcancel", P, !1);
278
+ $.removeEventListener("touchstart", U, !1), $.removeEventListener("mousedown", U, !1), $.removeEventListener("mousemove", q, !1), $.removeEventListener("touchmove", q, !1), $.removeEventListener("mouseup", I, !1), $.removeEventListener("touchend", I, !1), $.removeEventListener("mouseleave", I, !1), $.removeEventListener("touchcancel", I, !1);
279
279
  }
280
280
  window.removeEventListener("resize", S, !1), window.removeEventListener("orientationchange", S, !1);
281
281
  });
@@ -301,8 +301,8 @@ const R = (e) => isNaN(Number(e)) && typeof e == "string" ? e : `${e}px`, bt = (
301
301
  }, y = () => {
302
302
  u(l.value), o("afterChange", l.value);
303
303
  }, C = ($) => (r.length + $) % r.length, b = ($, _ = !0) => {
304
- l.value = C($), u($), h(), o("change", l.value), _ ? (I.transitionEnabled = !0, x.value && x.value.addEventListener("transitionend", () => {
305
- I.transitionEnabled = !1, y();
304
+ l.value = C($), u($), h(), o("change", l.value), _ ? (V.transitionEnabled = !0, x.value && x.value.addEventListener("transitionend", () => {
305
+ V.transitionEnabled = !1, y();
306
306
  }, {
307
307
  once: !0
308
308
  })) : y();
@@ -312,13 +312,13 @@ const R = (e) => isNaN(Number(e)) && typeof e == "string" ? e : `${e}px`, bt = (
312
312
  b(l.value + 1, $);
313
313
  };
314
314
  let E = null;
315
- const V = () => {
315
+ const P = () => {
316
316
  e.autoplayTime && E && clearInterval(E);
317
317
  }, D = () => {
318
318
  e.autoplayTime && r.length > 1 && (E && clearInterval(E), E = setInterval(() => {
319
319
  N();
320
320
  }, Number(e.autoplayTime)));
321
- }, I = F({
321
+ }, V = F({
322
322
  // 拖拽中
323
323
  isDragging: !1,
324
324
  // 是否首次拖动
@@ -336,38 +336,38 @@ const R = (e) => isNaN(Number(e)) && typeof e == "string" ? e : `${e}px`, bt = (
336
336
  // 当前次拖拽不满足翻页条件
337
337
  isDissatisfy: !1
338
338
  }), U = ($) => {
339
- if (!e.touchable || !g.value || I.transitionEnabled)
339
+ if (V.transitionEnabled)
340
340
  return;
341
341
  let _ = 0, W = 0;
342
- "touches" in $ ? (_ = $.touches[0].clientX, W = $.touches[0].clientY) : (_ = $.clientX, W = $.clientY), I.startX = _, I.startY = W, I.isDragging = !0, I.isFirstTouch = !0, I.startTime = /* @__PURE__ */ new Date(), V();
343
- }, Z = ($) => {
344
- if (!e.touchable || !g.value || !I.isDragging)
342
+ "touches" in $ ? (_ = $.touches[0].clientX, W = $.touches[0].clientY) : (_ = $.clientX, W = $.clientY), V.startX = _, V.startY = W, V.isDragging = !0, V.isFirstTouch = !0, V.startTime = /* @__PURE__ */ new Date(), P();
343
+ }, q = ($) => {
344
+ if (!V.isDragging)
345
345
  return;
346
346
  let _ = 0, W = 0;
347
347
  "touches" in $ ? (_ = $.touches[0].clientX, W = $.touches[0].clientY) : (_ = $.clientX, W = $.clientY);
348
- const q = _ - I.startX, X = W - I.startY;
349
- if (I.isFirstTouch && (I.isFirstTouch = !1, Math.abs(q) < Math.abs(X) !== e.vertical)) {
350
- I.isDragging = !1;
348
+ const G = _ - V.startX, X = W - V.startY;
349
+ if (V.isFirstTouch && (V.isFirstTouch = !1, Math.abs(G) < Math.abs(X) !== e.vertical)) {
350
+ V.isDragging = !1;
351
351
  return;
352
352
  }
353
- $.preventDefault(), I.offset = e.vertical ? X : q, h(), o("dragging", {
354
- percent: I.offset / (i.size + i.space),
355
- offset: I.offset
356
- }), I.isDissatisfy = !1;
357
- }, P = () => {
358
- if (!e.touchable || !g.value || !I.isDragging)
353
+ $.preventDefault(), V.offset = e.vertical ? X : G, h(), o("dragging", {
354
+ percent: V.offset / (i.size + i.space),
355
+ offset: V.offset
356
+ }), V.isDissatisfy = !1;
357
+ }, I = () => {
358
+ if (!V.isDragging)
359
359
  return;
360
- I.isDragging = !1;
361
- const _ = (/* @__PURE__ */ new Date()).getTime() - I.startTime.getTime();
362
- H() && (Math.abs(I.offset) > A.value || Math.abs(I.offset) / _ > 0.5) ? (I.offset > 0 ? T() : N(), I.offset = 0, I.isDissatisfy = !1) : (I.offset = 0, I.isDissatisfy = !0), D();
360
+ V.isDragging = !1;
361
+ const _ = (/* @__PURE__ */ new Date()).getTime() - V.startTime.getTime();
362
+ H() && (Math.abs(V.offset) > A.value || Math.abs(V.offset) / _ > 0.5) ? (V.offset > 0 ? T() : N(), V.offset = 0, V.isDissatisfy = !1) : (V.offset = 0, V.isDissatisfy = !0), D();
363
363
  }, A = B(() => bt(e.minSwipeDistance, i.size + i.space)), H = () => {
364
364
  if (v.value)
365
365
  return !0;
366
- const $ = I.offset > 0 ? l.value - 1 : l.value + 1;
366
+ const $ = V.offset > 0 ? l.value - 1 : l.value + 1;
367
367
  return $ >= 0 && $ < r.length;
368
- }, ue = B(() => {
369
- const $ = I.isDragging && !e.isFollowHand ? m.offset : m.offset + I.offset, _ = {};
370
- return e.vertical ? (_.transform = `translate3d(0, ${$}px, 0)`, _.transitionDuration = I.transitionEnabled || I.isDissatisfy ? `${e.duration}ms` : "0ms") : (_.transform = `translate3d(${$}px, 0, 0)`, _.transitionDuration = I.transitionEnabled || I.isDissatisfy ? `${e.duration}ms` : "0ms"), I.isDragging && (_.transition = "none"), e.vertical && (_.flexDirection = "column"), e.autoHeight && (_.display = "block", _.whiteSpace = "nowrap"), _;
368
+ }, se = B(() => {
369
+ const $ = V.isDragging && !e.isFollowHand ? m.offset : m.offset + V.offset, _ = {};
370
+ return e.vertical ? (_.transform = `translate3d(0, ${$}px, 0)`, _.transitionDuration = V.transitionEnabled || V.isDissatisfy ? `${e.duration}ms` : "0ms") : (_.transform = `translate3d(${$}px, 0, 0)`, _.transitionDuration = V.transitionEnabled || V.isDissatisfy ? `${e.duration}ms` : "0ms"), V.isDragging && (_.transition = "none"), e.vertical && (_.flexDirection = "column"), e.autoHeight && (_.display = "block", _.whiteSpace = "nowrap"), _;
371
371
  }), Q = B(() => ["y-swipe__dots", `y-swipe__dots--${e.dotsPosition || (e.vertical ? Je.left : Je.bottom)}`]);
372
372
  n({
373
373
  moveTo: b,
@@ -404,21 +404,21 @@ const R = (e) => isNaN(Number(e)) && typeof e == "string" ? e : `${e}px`, bt = (
404
404
  ref: g
405
405
  }, [f("div", {
406
406
  class: Ye("track"),
407
- style: ue.value,
407
+ style: se.value,
408
408
  ref: x
409
409
  }, [Array(m.cloneNodeCount).fill("").map((_, W) => {
410
410
  var J, re, $e;
411
- const q = C(W - m.cloneNodeCount), X = ($e = (J = r[q]) == null ? void 0 : (re = J.slots).default) == null ? void 0 : $e.call(re);
411
+ const G = C(W - m.cloneNodeCount), X = ($e = (J = r[G]) == null ? void 0 : (re = J.slots).default) == null ? void 0 : $e.call(re);
412
412
  return X ? f(Le, {
413
413
  clonenNode: X,
414
- index: q
414
+ index: G
415
415
  }, null) : null;
416
416
  }), ($ = t.default) == null ? void 0 : $.call(t), Array(m.cloneNodeCount).fill("").map((_, W) => {
417
417
  var J, re, $e;
418
- const q = C(W), X = ($e = (J = r[q]) == null ? void 0 : (re = J.slots).default) == null ? void 0 : $e.call(re);
418
+ const G = C(W), X = ($e = (J = r[G]) == null ? void 0 : (re = J.slots).default) == null ? void 0 : $e.call(re);
419
419
  return X ? f(Le, {
420
420
  clonenNode: X,
421
- index: q
421
+ index: G
422
422
  }, null) : null;
423
423
  })]), t.dots ? t.dots() : oe()]);
424
424
  };
@@ -607,11 +607,11 @@ var et = {}, Mn = {
607
607
  N = N > 1 ? 1 : N, C = h(N), b = u.startX + (u.x - u.startX) * C, T = u.startY + (u.y - u.startY) * C, u.method.call(u.scrollable, b, T), (b !== u.x || T !== u.y) && n.requestAnimationFrame(k.bind(n, u));
608
608
  }
609
609
  function v(u, y, C) {
610
- var b, T, N, E, V = m();
610
+ var b, T, N, E, P = m();
611
611
  u === a.body ? (b = n, T = n.scrollX || n.pageXOffset, N = n.scrollY || n.pageYOffset, E = i.scroll) : (b = u, T = u.scrollLeft, N = u.scrollTop, E = c), k({
612
612
  scrollable: b,
613
613
  method: E,
614
- startTime: V,
614
+ startTime: P,
615
615
  startX: T,
616
616
  startY: N,
617
617
  x: y,
@@ -735,37 +735,37 @@ const [tt, je] = O("tabs"), ft = tt, An = /* @__PURE__ */ z({
735
735
  }) {
736
736
  const {
737
737
  initProvide: a
738
- } = fe(ft), r = L(!1), l = F([]), i = L(), m = B(() => l.length > e.titleScrollThreshold), g = (E) => l.findIndex((V) => (V.$props ? V.$props.name : "") === E), x = L(e.initName ? g(e.initName) : e.initIndex), c = (E) => {
738
+ } = fe(ft), r = L(!1), l = F([]), i = L(), m = B(() => l.length > e.titleScrollThreshold), g = (E) => l.findIndex((P) => (P.$props ? P.$props.name : "") === E), x = L(e.initName ? g(e.initName) : e.initIndex), c = (E) => {
739
739
  x.value = E;
740
- const V = i.value;
741
- V && (V == null || V.moveTo(E, e.changeWithAnimation));
740
+ const P = i.value;
741
+ P && (P == null || P.moveTo(E, e.changeWithAnimation));
742
742
  };
743
743
  n({
744
744
  scrollToByIndex: (E) => {
745
745
  c(E);
746
746
  },
747
747
  scrollToByName: (E) => {
748
- const V = g(E);
749
- c(V);
748
+ const P = g(E);
749
+ c(P);
750
750
  }
751
751
  });
752
- const w = L([]), d = L(), p = (E) => (V) => {
753
- w.value[E] = V;
752
+ const w = L([]), d = L(), p = (E) => (P) => {
753
+ w.value[E] = P;
754
754
  }, S = (E) => {
755
755
  const {
756
- title: V,
756
+ title: P,
757
757
  name: D,
758
- disabled: I
758
+ disabled: V
759
759
  } = l[E].$props || {};
760
- x.value !== E && (o(I ? "disabledClick" : "click", E, V, D), !I && c(E));
760
+ x.value !== E && (o(V ? "disabledClick" : "click", E, P, D), !V && c(E));
761
761
  }, k = async () => {
762
- await ie(() => {
762
+ await ue(() => {
763
763
  if (!m.value || !d.value)
764
764
  return;
765
765
  const E = d.value;
766
766
  if (!E || !w.value[x.value])
767
767
  return;
768
- const V = w.value[x.value].$el, D = V.offsetLeft - (E.offsetWidth - V.offsetWidth) / 2;
768
+ const P = w.value[x.value].$el, D = P.offsetLeft - (E.offsetWidth - P.offsetWidth) / 2;
769
769
  E.scrollTo({
770
770
  left: D,
771
771
  behavior: "smooth"
@@ -779,24 +779,24 @@ const [tt, je] = O("tabs"), ft = tt, An = /* @__PURE__ */ z({
779
779
  transform: "translateX(50%)",
780
780
  transition: "all 0ms ease-out"
781
781
  }), u = async () => {
782
- await ie(() => {
782
+ await ue(() => {
783
783
  if (!w.value || w.value.length === 0)
784
784
  return;
785
- const E = x.value >= w.value.length ? 0 : x.value, V = w.value[E].$el, D = V.offsetLeft + V.offsetWidth / 2;
785
+ const E = x.value >= w.value.length ? 0 : x.value, P = w.value[E].$el, D = P.offsetLeft + P.offsetWidth / 2;
786
786
  v.transform = `translateX(${D}px) translateX(-50%)`, r.value && (v.transition = `all ${e.duration}ms ease-out`), r.value = !0;
787
787
  });
788
788
  }, y = (E) => {
789
789
  const {
790
- title: V,
790
+ title: P,
791
791
  name: D
792
792
  } = l[E].$props || {};
793
- o("change", E, V, D), x.value = E;
793
+ o("change", E, P, D), x.value = E;
794
794
  }, C = (E) => {
795
795
  const {
796
- title: V,
796
+ title: P,
797
797
  name: D
798
798
  } = l[E].$props || {};
799
- o("afterChange", E, V, D), x.value = E;
799
+ o("afterChange", E, P, D), x.value = E;
800
800
  }, b = F({
801
801
  children: l,
802
802
  activeIndex: x,
@@ -804,7 +804,7 @@ const [tt, je] = O("tabs"), ft = tt, An = /* @__PURE__ */ z({
804
804
  });
805
805
  a(b);
806
806
  const T = (E) => N(E) && /^\d+(\.\d+)?$/.test(E) ? `${E}px` : E, N = (E) => Object.prototype.toString.call(E) === "[object String]";
807
- return K(async () => {
807
+ return Z(async () => {
808
808
  et.polyfill(), await u();
809
809
  }), j(() => x.value, async () => {
810
810
  await u(), await k();
@@ -826,10 +826,10 @@ const [tt, je] = O("tabs"), ft = tt, An = /* @__PURE__ */ z({
826
826
  [e.size]: e.size,
827
827
  [e.align]: e.align
828
828
  })
829
- }, [l.length > 0 && l.map((V, D) => f(wt, {
830
- title: V.title,
831
- disabled: V.disabled,
832
- "title-slot": V.$slots.title,
829
+ }, [l.length > 0 && l.map((P, D) => f(wt, {
830
+ title: P.title,
831
+ disabled: P.disabled,
832
+ "title-slot": P.$slots.title,
833
833
  key: D,
834
834
  ref: p(D),
835
835
  active: x.value === D,
@@ -926,7 +926,7 @@ const [Fn] = O("tab"), Hn = /* @__PURE__ */ z({
926
926
  isVertical: m,
927
927
  isHorizontal: g
928
928
  };
929
- }, [qn, G] = O("slider"), Gn = /* @__PURE__ */ z({
929
+ }, [qn, K] = O("slider"), Gn = /* @__PURE__ */ z({
930
930
  name: qn,
931
931
  props: {
932
932
  modelValue: {
@@ -992,8 +992,8 @@ const [Fn] = O("tab"), Hn = /* @__PURE__ */ z({
992
992
  min: T,
993
993
  max: N,
994
994
  step: E
995
- } = e, V = Math.max(T, Math.min(b, N));
996
- return Math.round(V / E) * E;
995
+ } = e, P = Math.max(T, Math.min(b, N));
996
+ return Math.round(P / E) * E;
997
997
  }, x = (b) => {
998
998
  if (b.stopPropagation(), e.disabled)
999
999
  return;
@@ -1002,13 +1002,13 @@ const [Fn] = O("tab"), Hn = /* @__PURE__ */ z({
1002
1002
  modelValue: N
1003
1003
  } = e, {
1004
1004
  left: E,
1005
- width: V
1006
- } = n.value.getBoundingClientRect(), D = b.clientX - E, I = Math.floor(T + D / V * S.value);
1005
+ width: P
1006
+ } = n.value.getBoundingClientRect(), D = b.clientX - E, V = Math.floor(T + D / P * S.value);
1007
1007
  if (m.value) {
1008
- const U = N[0], Z = N[1], P = (U + Z) / 2;
1009
- I <= P ? s([I, Z]) : s([U, I]);
1008
+ const U = N[0], q = N[1], I = (U + q) / 2;
1009
+ V <= I ? s([V, q]) : s([U, V]);
1010
1010
  } else
1011
- s(I);
1011
+ s(V);
1012
1012
  }, c = (b) => b[0] > b[1] ? [b[1], b[0]] : b, h = (b, T) => JSON.stringify(b) === JSON.stringify(T), s = (b, T) => {
1013
1013
  let N = 0;
1014
1014
  m.value ? N = c(b).map(g) : N = g(b), t("update:modelValue", N), typeof T > "u" && !h(a.value, r.value) && t("change", N);
@@ -1036,19 +1036,19 @@ const [Fn] = O("tab"), Hn = /* @__PURE__ */ z({
1036
1036
  i.move(b), l.value === "startMove" && t("drag-start"), l.value = "moving";
1037
1037
  const {
1038
1038
  width: N
1039
- } = n.value.getBoundingClientRect(), E = i.deltaX.value, V = Math.floor(E / N * S.value);
1040
- Array.isArray(a.value) && Array.isArray(r.value) ? T === "left" ? r.value[0] = a.value[0] + V : r.value[1] = a.value[1] + V : r.value = a.value + V, s(r.value, !0);
1039
+ } = n.value.getBoundingClientRect(), E = i.deltaX.value, P = Math.floor(E / N * S.value);
1040
+ Array.isArray(a.value) && Array.isArray(r.value) ? T === "left" ? r.value[0] = a.value[0] + P : r.value[1] = a.value[1] + P : r.value = a.value + P, s(r.value, !0);
1041
1041
  }, u = () => {
1042
1042
  e.disabled || (l.value === "moving" && (s(r.value), t("drag-end")), l.value = "endMove");
1043
1043
  }, y = (b) => {
1044
- let T = "", N = {}, E = 0, V = G("button-wrapper");
1044
+ let T = "", N = {}, E = 0, P = K("button-wrapper");
1045
1045
  return b === 0 ? (T = "left", N = {
1046
1046
  left: d.value,
1047
1047
  backgroundColor: Array.isArray(e.buttonBgColor) ? e.buttonBgColor[0] : e.buttonBgColor
1048
- }, E = e.modelValue[b], V = G("button-wrapper", "left")) : b === 1 ? (T = "right", E = e.modelValue[b], N = {
1048
+ }, E = e.modelValue[b], P = K("button-wrapper", "left")) : b === 1 ? (T = "right", E = e.modelValue[b], N = {
1049
1049
  left: `${parseInt(w.value) + parseInt(d.value)}%`,
1050
1050
  backgroundColor: Array.isArray(e.buttonBgColor) ? e.buttonBgColor[1] : e.buttonBgColor
1051
- }, V = G("button-wrapper", "right")) : (E = e.modelValue, N = {
1051
+ }, P = K("button-wrapper", "right")) : (E = e.modelValue, N = {
1052
1052
  left: w.value,
1053
1053
  backgroundColor: e.buttonBgColor
1054
1054
  }), f("div", {
@@ -1056,7 +1056,7 @@ const [Fn] = O("tab"), Hn = /* @__PURE__ */ z({
1056
1056
  "aria-valuemin": e.min,
1057
1057
  "aria-valuemax": e.max,
1058
1058
  "aria-valuenow": E,
1059
- class: V,
1059
+ class: P,
1060
1060
  onTouchstart: k,
1061
1061
  onTouchmove: (D) => v(D, T),
1062
1062
  onTouchend: u,
@@ -1065,7 +1065,7 @@ const [Fn] = O("tab"), Hn = /* @__PURE__ */ z({
1065
1065
  transition: l.value === "moving" ? "none" : `${e.transitionTime}ms ease-in-out`
1066
1066
  }
1067
1067
  }, [o.button ? o.button() : f("div", {
1068
- class: G("inner-button"),
1068
+ class: K("inner-button"),
1069
1069
  style: N
1070
1070
  }, null)]);
1071
1071
  }, C = B(() => Array((e.max - e.min) / e.step).fill({}).map((T, N) => ({
@@ -1074,15 +1074,15 @@ const [Fn] = O("tab"), Hn = /* @__PURE__ */ z({
1074
1074
  return () => {
1075
1075
  var b;
1076
1076
  return f("div", {
1077
- class: G()
1077
+ class: K()
1078
1078
  }, [o.iconLeft && f("div", {
1079
- class: G("icon", {
1079
+ class: K("icon", {
1080
1080
  left: !0
1081
1081
  })
1082
1082
  }, [o.iconLeft()]), f("div", {
1083
1083
  role: "presentation",
1084
1084
  ref: n,
1085
- class: G("wrapper-main", {
1085
+ class: K("wrapper-main", {
1086
1086
  disabled: e.disabled
1087
1087
  }),
1088
1088
  style: {
@@ -1091,16 +1091,16 @@ const [Fn] = O("tab"), Hn = /* @__PURE__ */ z({
1091
1091
  },
1092
1092
  onClick: x
1093
1093
  }, [e.step !== 1 && f("div", {
1094
- class: G("dots")
1094
+ class: K("dots")
1095
1095
  }, [C.value.map((T) => f("div", {
1096
- class: G("dot"),
1096
+ class: K("dot"),
1097
1097
  style: {
1098
1098
  left: T.position,
1099
1099
  background: e.gapColor,
1100
1100
  width: R(e.gapWidth)
1101
1101
  }
1102
1102
  }, null))]), e.showTooltip && f("div", {
1103
- class: G("tooltip", {
1103
+ class: K("tooltip", {
1104
1104
  wrapper: o.toolTip
1105
1105
  }),
1106
1106
  style: p.value
@@ -1111,9 +1111,9 @@ const [Fn] = O("tab"), Hn = /* @__PURE__ */ z({
1111
1111
  background: e.activeColor,
1112
1112
  transition: l.value === "moving" ? "none" : `${e.transitionTime}ms ease-in-out`
1113
1113
  },
1114
- class: G("inner")
1114
+ class: K("inner")
1115
1115
  }, null), m.value ? [y(0), y(1)] : y()]), o.iconRight && f("div", {
1116
- class: G("icon", {
1116
+ class: K("icon", {
1117
1117
  right: !0
1118
1118
  })
1119
1119
  }, [o.iconRight()])]);
@@ -1247,7 +1247,7 @@ const Kn = M(Gn), [Zn, ge] = O("loading"), Qn = {
1247
1247
  }, [w])])]);
1248
1248
  };
1249
1249
  }
1250
- }), [Jn, se] = O("list"), el = /* @__PURE__ */ z({
1250
+ }), [Jn, ie] = O("list"), el = /* @__PURE__ */ z({
1251
1251
  name: Jn,
1252
1252
  props: {
1253
1253
  // 加载中 文案
@@ -1319,14 +1319,14 @@ const Kn = M(Gn), [Zn, ge] = O("loading"), Qn = {
1319
1319
  }) {
1320
1320
  const a = L(0), r = L(!1), l = L("normal"), i = L(), m = L(), g = L(), x = L([]), c = L(0), h = L(0), s = L([]), w = B(() => $n(e.height) ? `${e.height}px` : e.height), d = B(() => s.value.length ? s.value[s.value.length - 1].bottom : 0), p = B(() => {
1321
1321
  if (e.virtual) {
1322
- const P = c.value - S.value, A = h.value + k.value;
1323
- return u.value.slice(P, A);
1322
+ const I = c.value - S.value, A = h.value + k.value;
1323
+ return u.value.slice(I, A);
1324
1324
  }
1325
1325
  return u.value;
1326
- }), S = B(() => Math.min(c.value, e.bufferScale * v.value)), k = B(() => Math.min(e.dataSource.length - h.value, e.bufferScale * v.value)), v = B(() => Math.ceil(a.value / parseInt(String(e.itemHeight)))), u = B(() => e.dataSource.map((P, A) => (P[e.keyName] = A, P))), y = () => r.value ? document.documentElement.scrollTop || document.body.scrollTop : i.value.scrollTop, C = () => r.value ? document.documentElement.scrollHeight : i.value.scrollHeight, b = () => {
1327
- l.value !== "loading" && (l.value = "loading", o("load", (P) => {
1326
+ }), S = B(() => Math.min(c.value, e.bufferScale * v.value)), k = B(() => Math.min(e.dataSource.length - h.value, e.bufferScale * v.value)), v = B(() => Math.ceil(a.value / parseInt(String(e.itemHeight)))), u = B(() => e.dataSource.map((I, A) => (I[e.keyName] = A, I))), y = () => r.value ? document.documentElement.scrollTop || document.body.scrollTop : i.value.scrollTop, C = () => r.value ? document.documentElement.scrollHeight : i.value.scrollHeight, b = () => {
1327
+ l.value !== "loading" && (l.value = "loading", o("load", (I) => {
1328
1328
  if (l.value === "loading")
1329
- switch (P) {
1329
+ switch (I) {
1330
1330
  case "error":
1331
1331
  l.value = "error";
1332
1332
  break;
@@ -1340,7 +1340,7 @@ const Kn = M(Gn), [Zn, ge] = O("loading"), Qn = {
1340
1340
  }, T = () => {
1341
1341
  l.value === "normal" && C() - y() - a.value <= e.loadOffset && b();
1342
1342
  }, N = () => {
1343
- s.value = u.value.map((P, A) => {
1343
+ s.value = u.value.map((I, A) => {
1344
1344
  const H = parseInt(String(e.itemHeight));
1345
1345
  return {
1346
1346
  index: A,
@@ -1351,26 +1351,26 @@ const Kn = M(Gn), [Zn, ge] = O("loading"), Qn = {
1351
1351
  });
1352
1352
  }, E = () => {
1353
1353
  N();
1354
- for (let P = 1; P < s.value.length; P++)
1355
- s.value[P].top = s.value[P - 1].bottom, s.value[P].bottom = s.value[P].top + s.value[P].height;
1356
- }, V = (P, A) => {
1357
- let H = 0, ue = P.length - 1, Q = -1;
1358
- for (; H <= ue; ) {
1359
- const ae = Math.floor((H + ue) / 2), oe = P[ae].bottom;
1354
+ for (let I = 1; I < s.value.length; I++)
1355
+ s.value[I].top = s.value[I - 1].bottom, s.value[I].bottom = s.value[I].top + s.value[I].height;
1356
+ }, P = (I, A) => {
1357
+ let H = 0, se = I.length - 1, Q = -1;
1358
+ for (; H <= se; ) {
1359
+ const ae = Math.floor((H + se) / 2), oe = I[ae].bottom;
1360
1360
  if (oe === A)
1361
1361
  return ae + 1;
1362
- oe < A ? H = ae + 1 : oe > A && ((Q === -1 || Q > ae) && (Q = ae), ue = ae - 1);
1362
+ oe < A ? H = ae + 1 : oe > A && ((Q === -1 || Q > ae) && (Q = ae), se = ae - 1);
1363
1363
  }
1364
1364
  return Q;
1365
- }, D = (P) => V(s.value, P), I = () => {
1365
+ }, D = (I) => P(s.value, I), V = () => {
1366
1366
  if (T(), e.virtual) {
1367
- const P = y();
1368
- U(P);
1367
+ const I = y();
1368
+ U(I);
1369
1369
  }
1370
- }, U = (P) => {
1370
+ }, U = (I) => {
1371
1371
  if (!m.value)
1372
1372
  return;
1373
- const A = P || 0;
1373
+ const A = I || 0;
1374
1374
  if (e.dynamicItemHeight) {
1375
1375
  c.value = D(A), h.value = c.value + v.value;
1376
1376
  const H = s.value[c.value - S.value].top ? s.value[c.value - S.value].top : 0;
@@ -1380,17 +1380,17 @@ const Kn = M(Gn), [Zn, ge] = O("loading"), Qn = {
1380
1380
  const H = c.value * parseInt(String(e.itemHeight)) - S.value * parseInt(String(e.itemHeight));
1381
1381
  m.value.style.transform = `translate3d(0, ${H}px, 0)`;
1382
1382
  }
1383
- }, Z = () => {
1383
+ }, q = () => {
1384
1384
  if (!m.value || !g.value)
1385
1385
  return;
1386
- const P = m.value.children;
1387
- P && P.length > 0 && [...P].forEach((A) => {
1386
+ const I = m.value.children;
1387
+ I && I.length > 0 && [...I].forEach((A) => {
1388
1388
  if (A instanceof HTMLDivElement) {
1389
1389
  const H = A.getBoundingClientRect(), {
1390
- height: ue
1391
- } = H, Q = Number(A.dataset.index), oe = s.value[Q].height - ue;
1390
+ height: se
1391
+ } = H, Q = Number(A.dataset.index), oe = s.value[Q].height - se;
1392
1392
  if (oe) {
1393
- s.value[Q].bottom -= oe, s.value[Q].height = ue;
1393
+ s.value[Q].bottom -= oe, s.value[Q].height = se;
1394
1394
  for (let $ = Q + 1; $ < s.value.length; $++)
1395
1395
  s.value[$].top = s.value[$ - 1].bottom, s.value[$].bottom -= oe;
1396
1396
  }
@@ -1401,46 +1401,46 @@ const Kn = M(Gn), [Zn, ge] = O("loading"), Qn = {
1401
1401
  ...e,
1402
1402
  checkIsScrollToBottom: T,
1403
1403
  loadData: b
1404
- }), K(() => {
1405
- e.height !== "auto" ? (r.value = !1, a.value = i.value.clientHeight) : e.height === "auto" && (r.value = !0, a.value = document.documentElement.clientHeight, document.addEventListener("scroll", I)), e.virtual && (N(), U()), e.immediateCheck && T();
1404
+ }), Z(() => {
1405
+ e.height !== "auto" ? (r.value = !1, a.value = i.value.clientHeight) : e.height === "auto" && (r.value = !0, a.value = document.documentElement.clientHeight, document.addEventListener("scroll", V)), e.virtual && (N(), U()), e.immediateCheck && T();
1406
1406
  }), yn(async () => {
1407
- var P, A;
1407
+ var I, A;
1408
1408
  if (e.virtual && e.dynamicItemHeight) {
1409
- if (await ie(), !((A = (P = m.value) == null ? void 0 : P.children) != null && A.length))
1409
+ if (await ue(), !((A = (I = m.value) == null ? void 0 : I.children) != null && A.length))
1410
1410
  return;
1411
- Z();
1411
+ q();
1412
1412
  }
1413
1413
  }), we(() => {
1414
- r.value && document.removeEventListener("scroll", I);
1414
+ r.value && document.removeEventListener("scroll", V);
1415
1415
  }), () => f("div", {
1416
1416
  ref: i,
1417
- class: `${se()} ${e.virtual ? se({
1417
+ class: `${ie()} ${e.virtual ? ie({
1418
1418
  virtual: !0
1419
1419
  }) : ""}`,
1420
1420
  style: {
1421
1421
  height: w.value
1422
1422
  },
1423
- onScroll: I
1423
+ onScroll: V
1424
1424
  }, [e.virtual && f("div", {
1425
1425
  ref: g,
1426
- class: se("phantom"),
1426
+ class: ie("phantom"),
1427
1427
  style: {
1428
1428
  height: `${d.value}px`
1429
1429
  }
1430
1430
  }, null), f("div", {
1431
1431
  ref: m,
1432
- class: se("content")
1433
- }, [p.value.map((P) => {
1432
+ class: ie("content")
1433
+ }, [p.value.map((I) => {
1434
1434
  var A;
1435
1435
  return f("div", {
1436
1436
  ref: x,
1437
- class: se("item"),
1438
- "data-index": P._index
1437
+ class: ie("item"),
1438
+ "data-index": I._index
1439
1439
  }, [(A = t.default) == null ? void 0 : A.call(t, {
1440
- item: P
1440
+ item: I
1441
1441
  })]);
1442
1442
  })]), l.value === "loading" && f("div", {
1443
- class: se({
1443
+ class: ie({
1444
1444
  loading: !0
1445
1445
  })
1446
1446
  }, [t.loading ? t.loading() : f(mt, {
@@ -1448,14 +1448,18 @@ const Kn = M(Gn), [Zn, ge] = O("loading"), Qn = {
1448
1448
  }, {
1449
1449
  default: () => [bn("加载中...")]
1450
1450
  })]), l.value === "finished" && f("div", {
1451
- class: se({
1451
+ class: ie({
1452
1452
  finished: !0
1453
1453
  })
1454
1454
  }, [e.finishedText]), l.value === "error" && f("div", {
1455
- class: se("error"),
1455
+ class: ie("error"),
1456
1456
  role: "presentation",
1457
1457
  onClick: b
1458
- }, [e.errorText])]);
1458
+ }, [e.errorText]), l.value === "normal" && f("div", {
1459
+ class: ie({
1460
+ normal: !0
1461
+ })
1462
+ }, [t.normal ? t.normal() : null])]);
1459
1463
  }
1460
1464
  });
1461
1465
  const tl = M(el);
@@ -1923,7 +1927,7 @@ const hl = M(pl), yl = (e, t, o, n) => {
1923
1927
  }, S = (v) => {
1924
1928
  c.value === Y.LOOSING ? (g.value = e.statusHeight, x.value = kt, c.value = Y.LOADING, o("load", s, v)) : c.value === Y.PULLING && (g.value = 0, c.value = Y.DEFUALT);
1925
1929
  };
1926
- K(() => {
1930
+ Z(() => {
1927
1931
  const v = a == null ? void 0 : a.vnode.el;
1928
1932
  v == null || v.addEventListener("touchstart", d, {
1929
1933
  passive: !1
@@ -2510,7 +2514,7 @@ const Ul = M(jl), [ql, de] = O("progress"), Gl = /* @__PURE__ */ z({
2510
2514
  oldPercent: 0,
2511
2515
  timer: 0
2512
2516
  });
2513
- K(() => {
2517
+ Z(() => {
2514
2518
  m(), e.animation && i(), window.addEventListener("resize", m);
2515
2519
  }), st(() => {
2516
2520
  a.value = [];
@@ -2536,13 +2540,13 @@ const Ul = M(jl), [ql, de] = O("progress"), Gl = /* @__PURE__ */ z({
2536
2540
  const m = () => {
2537
2541
  g(), x();
2538
2542
  }, g = () => {
2539
- ie(() => {
2543
+ ue(() => {
2540
2544
  r.progressWidth = o.value && o.value.offsetWidth || 0, r.pivotContentWidth = n.value && n.value.offsetWidth || 0;
2541
2545
  }).catch((s) => {
2542
2546
  throw new Error(s);
2543
2547
  });
2544
2548
  }, x = () => {
2545
- ie(() => {
2549
+ ue(() => {
2546
2550
  e.mileages.forEach((s, w) => {
2547
2551
  r.mileageWidth[w] = a.value[w] && a.value[w].offsetWidth || 0;
2548
2552
  });
@@ -2680,7 +2684,7 @@ const Kl = M(Gl), [Zl, ze, Ql] = O("toast"), Jl = {
2680
2684
  o.visible = !1, clearTimeout(a);
2681
2685
  }, Number(e.duration));
2682
2686
  };
2683
- return K(() => {
2687
+ return Z(() => {
2684
2688
  o.visible = !0, n();
2685
2689
  }), () => {
2686
2690
  const {
@@ -2778,7 +2782,7 @@ const ia = /* @__PURE__ */ z({
2778
2782
  slots: t
2779
2783
  }) {
2780
2784
  const o = L("");
2781
- K(() => {
2785
+ Z(() => {
2782
2786
  o.value = `mask${Nt}`, Nt += 1, n(e.modelValue, !0);
2783
2787
  }), we(() => {
2784
2788
  const l = ee.findIndex((i) => i._id === o.value);
@@ -3481,7 +3485,7 @@ const wa = M(Sa), [xa, Ca] = O("input"), $a = 13, ka = /* @__PURE__ */ z({
3481
3485
  }, c = (s) => {
3482
3486
  s.keyCode === $a && (n != null && n.getProp("enterable") || s.preventDefault(), e.type === "search" && (o == null ? void 0 : o.vnode.el).blur()), t("keypress", s);
3483
3487
  };
3484
- K(() => {
3488
+ Z(() => {
3485
3489
  l(e.showWordLimit), r(e.maxLength);
3486
3490
  }), xe(() => {
3487
3491
  a && a.remove(), a = null;
@@ -3560,7 +3564,7 @@ const Ta = M(ka), at = 1e3, ot = 60 * at, rt = 60 * ot, It = 24 * rt, [Ea] = O("
3560
3564
  expose: n
3561
3565
  }) {
3562
3566
  const a = L(), r = L(!1), l = L(Number(e.time)), i = L(0), m = B(() => p(l.value));
3563
- K(() => {
3567
+ Z(() => {
3564
3568
  e.autoStart && g();
3565
3569
  });
3566
3570
  const g = () => {
@@ -3694,6 +3698,10 @@ const [Va, ne] = O("dialog"), Ia = {
3694
3698
  duration: {
3695
3699
  type: Number,
3696
3700
  default: 300
3701
+ },
3702
+ onClickMask: {
3703
+ type: Function,
3704
+ default: null
3697
3705
  }
3698
3706
  }, sn = /* @__PURE__ */ z({
3699
3707
  name: Va,
@@ -3759,16 +3767,18 @@ const [Va, ne] = O("dialog"), Ia = {
3759
3767
  imgSrc: b,
3760
3768
  circleImg: T,
3761
3769
  teleport: N,
3762
- duration: E
3770
+ duration: E,
3771
+ onClickMask: P
3763
3772
  } = e;
3764
3773
  return f(vt, Ie({
3765
3774
  modelValue: c.value,
3766
- "onUpdate:modelValue": (V) => c.value = V,
3775
+ "onUpdate:modelValue": (D) => c.value = D,
3767
3776
  customClass: ne(),
3768
3777
  customStyle: {
3769
3778
  width: R(h)
3770
3779
  }
3771
3780
  }, {
3781
+ onClickMask: P,
3772
3782
  "onUpdate:modelValue": a
3773
3783
  }, {
3774
3784
  isCloseOnClickMask: S,
@@ -3776,8 +3786,8 @@ const [Va, ne] = O("dialog"), Ia = {
3776
3786
  duration: E
3777
3787
  }), {
3778
3788
  default: () => {
3779
- var V, D, I, U;
3780
- return [((V = o.img) == null ? void 0 : V.call(o)) || b && f("div", {
3789
+ var D, V, U, q;
3790
+ return [((D = o.img) == null ? void 0 : D.call(o)) || b && f("div", {
3781
3791
  class: ne("img", {
3782
3792
  circle: T
3783
3793
  }),
@@ -3796,9 +3806,9 @@ const [Va, ne] = O("dialog"), Ia = {
3796
3806
  class: ne("container")
3797
3807
  }, [f("div", {
3798
3808
  style: {
3799
- height: T ? x(R(h), 4, (Z) => Z + 20) : "24px"
3809
+ height: T ? x(R(h), 4, (I) => I + 20) : "24px"
3800
3810
  }
3801
- }, null), ((D = o.title) == null ? void 0 : D.call(o)) || f("div", {
3811
+ }, null), ((V = o.title) == null ? void 0 : V.call(o)) || f("div", {
3802
3812
  class: ne("title"),
3803
3813
  style: {
3804
3814
  textAlign: w
@@ -3810,7 +3820,7 @@ const [Va, ne] = O("dialog"), Ia = {
3810
3820
  style: {
3811
3821
  textAlign: p
3812
3822
  }
3813
- }, [((I = o.default) == null ? void 0 : I.call(o)) || d]), ((U = o.footer) == null ? void 0 : U.call(o)) || f("div", {
3823
+ }, [((U = o.default) == null ? void 0 : U.call(o)) || d]), ((q = o.footer) == null ? void 0 : q.call(o)) || f("div", {
3814
3824
  class: ne("footer"),
3815
3825
  style: {
3816
3826
  paddingTop: v || y ? "20px" : "0px"
@@ -3993,13 +4003,13 @@ const Oa = M(sn), dn = {
3993
4003
  const [c, h] = e.position.split("-");
3994
4004
  a.align = h, a.placement = c;
3995
4005
  }, x = () => {
3996
- e.manual && (n.value = e.modelValue), e.modelValue || n.value ? ie(l).catch((c) => {
4006
+ e.manual && (n.value = e.modelValue), e.modelValue || n.value ? ue(l).catch((c) => {
3997
4007
  throw new Error(c);
3998
4008
  }) : (r.left = 0, r.top = 0);
3999
4009
  };
4000
4010
  return j(() => e.position, () => {
4001
4011
  g(), x();
4002
- }), j([() => n.value, () => e.modelValue, () => e.reference], x), K(() => {
4012
+ }), j([() => n.value, () => e.modelValue, () => e.reference], x), Z(() => {
4003
4013
  var c;
4004
4014
  g(), x(), e.manual || ((c = e.reference) == null || c.addEventListener("click", m), document.addEventListener("touchstart", i), document.addEventListener("mousedown", i));
4005
4015
  }), xe(() => {
@@ -4067,10 +4077,10 @@ const [Aa] = O("tooltip"), Ra = /* @__PURE__ */ z({
4067
4077
  const r = (l = o == null ? void 0 : o.proxy) == null ? void 0 : l.$el;
4068
4078
  return r == null ? void 0 : r.nextElementSibling;
4069
4079
  };
4070
- return K(() => {
4080
+ return Z(() => {
4071
4081
  n.value = a();
4072
4082
  }), st(() => {
4073
- ie(() => {
4083
+ ue(() => {
4074
4084
  n.value = a();
4075
4085
  }).catch((r) => {
4076
4086
  throw Error(r);
@@ -4349,7 +4359,7 @@ const Ua = M(ja), [mn, De] = O("dropdown"), vn = mn, qa = {
4349
4359
  return N && !N.contains(y.target);
4350
4360
  }) && e.isCloseOnClickOutside && S();
4351
4361
  };
4352
- K(() => {
4362
+ Z(() => {
4353
4363
  var y;
4354
4364
  a.value && (w.value = s(a.value)), (y = w.value) == null || y.addEventListener("scroll", p, {
4355
4365
  passive: !0
@@ -4365,7 +4375,7 @@ const Ua = M(ja), [mn, De] = O("dropdown"), vn = mn, qa = {
4365
4375
  T === y ? C[1] = T : N.state.showPopup && (C[0] = T);
4366
4376
  }), C[0] !== -1 && m[C[0]].exposed.toggle(!1, {
4367
4377
  immediate: !0
4368
- }), ie(() => {
4378
+ }), ue(() => {
4369
4379
  C[1] !== -1 && m[C[1]].exposed.toggle();
4370
4380
  }).catch((b) => {
4371
4381
  throw new Error(b);