y-design-ssr 1.1.16-alpha.1 → 1.1.16-alpha.2
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 +89 -85
- package/libs/index.umd.js +1 -1
- package/libs/list/index.mjs +95 -91
- package/libs/list/index.umd.js +1 -1
- package/package.json +1 -1
package/libs/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ref as M, reactive as H, getCurrentInstance as ie, provide as Dt, isVNode as Se, inject as At, onUnmounted as we, computed as P, defineComponent as O, createVNode as c, watch as
|
|
1
|
+
import { ref as M, reactive as H, getCurrentInstance as ie, provide as Dt, isVNode as Se, inject as At, onUnmounted as we, computed as P, defineComponent as O, createVNode as c, watch as G, onMounted as J, nextTick as q, onBeforeUnmount as xe, onBeforeUpdate as ct, onUpdated as Cn, createTextVNode as $n, Fragment as je, createApp as Ce, h as Pe, Transition as He, withDirectives as oe, vShow as Ie, Teleport as dt, vModelText as Wt, mergeProps as Me, vModelDynamic as kn, resolveDirective as ht, watchEffect as Tn, unref as pt } from "vue";
|
|
2
2
|
const En = {
|
|
3
3
|
"pull-refresh": {
|
|
4
4
|
pulling: "下拉刷新...",
|
|
@@ -244,7 +244,7 @@ const W = (e) => isNaN(Number(e)) && typeof e == "string" ? e : `${e}px`, St = (
|
|
|
244
244
|
}), w = () => {
|
|
245
245
|
d.list = v(), b();
|
|
246
246
|
};
|
|
247
|
-
|
|
247
|
+
G(() => [...i], w);
|
|
248
248
|
const f = (T, V) => {
|
|
249
249
|
T ? r.size = St(T, V) : r.size = V, r.space = Number(e.itemSpace) || 0, r.isFillViewport = r.size >= V, u.viewportSize = V, u.cloneNodeCount = g();
|
|
250
250
|
}, g = () => {
|
|
@@ -263,10 +263,10 @@ const W = (e) => isNaN(Number(e)) && typeof e == "string" ? e : `${e}px`, St = (
|
|
|
263
263
|
width: T,
|
|
264
264
|
height: V
|
|
265
265
|
} = h.value.getBoundingClientRect();
|
|
266
|
-
e.vertical ? f(e.itemSize, V) : f(e.itemSize, T), l.value = l.value >= i.length ? i.length - 1 : l.value, l.value < 0 && (l.value = 0), s(l.value), w(),
|
|
266
|
+
e.vertical ? f(e.itemSize, V) : f(e.itemSize, T), l.value = l.value >= i.length ? i.length - 1 : l.value, l.value < 0 && (l.value = 0), s(l.value), w(), A();
|
|
267
267
|
};
|
|
268
268
|
J(() => {
|
|
269
|
-
if (
|
|
269
|
+
if (q(y).catch(() => {
|
|
270
270
|
}), e.touchable && h.value) {
|
|
271
271
|
const T = h.value;
|
|
272
272
|
T.addEventListener("touchstart", X, !1), T.addEventListener("mousedown", X, !1), T.addEventListener("touchmove", j, !1), T.addEventListener("mousemove", j, !1), T.addEventListener("touchend", I, !1), T.addEventListener("mouseup", I, !1), T.addEventListener("mouseleave", I, !1), T.addEventListener("touchcancel", I, !1);
|
|
@@ -314,7 +314,7 @@ const W = (e) => isNaN(Number(e)) && typeof e == "string" ? e : `${e}px`, St = (
|
|
|
314
314
|
let E = null;
|
|
315
315
|
const B = () => {
|
|
316
316
|
e.autoplayTime && E && clearInterval(E);
|
|
317
|
-
},
|
|
317
|
+
}, A = () => {
|
|
318
318
|
e.autoplayTime && i.length > 1 && (E && clearInterval(E), E = setInterval(() => {
|
|
319
319
|
N();
|
|
320
320
|
}, Number(e.autoplayTime)));
|
|
@@ -359,8 +359,8 @@ const W = (e) => isNaN(Number(e)) && typeof e == "string" ? e : `${e}px`, St = (
|
|
|
359
359
|
return;
|
|
360
360
|
L.isDragging = !1;
|
|
361
361
|
const V = (/* @__PURE__ */ new Date()).getTime() - L.startTime.getTime();
|
|
362
|
-
Y() && (Math.abs(L.offset) >
|
|
363
|
-
},
|
|
362
|
+
Y() && (Math.abs(L.offset) > D.value || Math.abs(L.offset) / V > 0.5) ? (L.offset > 0 ? k() : N(), L.offset = 0, L.isDissatisfy = !1) : (L.offset = 0, L.isDissatisfy = !0), A();
|
|
363
|
+
}, D = P(() => St(e.minSwipeDistance, r.size + r.space)), Y = () => {
|
|
364
364
|
if (m.value)
|
|
365
365
|
return !0;
|
|
366
366
|
const T = L.offset > 0 ? l.value - 1 : l.value + 1;
|
|
@@ -368,7 +368,7 @@ const W = (e) => isNaN(Number(e)) && typeof e == "string" ? e : `${e}px`, St = (
|
|
|
368
368
|
}, le = P(() => {
|
|
369
369
|
const T = L.isDragging && !e.isFollowHand ? u.offset : u.offset + L.offset, V = {};
|
|
370
370
|
return e.vertical ? (V.transform = `translate3d(0, ${T}px, 0)`, V.transitionDuration = L.transitionEnabled || L.isDissatisfy ? `${e.duration}ms` : "0ms") : (V.transform = `translate3d(${T}px, 0, 0)`, V.transitionDuration = L.transitionEnabled || L.isDissatisfy ? `${e.duration}ms` : "0ms"), L.isDragging && (V.transition = "none"), e.vertical && (V.flexDirection = "column"), e.autoHeight && (V.display = "block", V.whiteSpace = "nowrap"), V;
|
|
371
|
-
}),
|
|
371
|
+
}), K = P(() => ["y-swipe__dots", `y-swipe__dots--${e.dotsPosition || (e.vertical ? tt.left : tt.bottom)}`]);
|
|
372
372
|
n({
|
|
373
373
|
moveTo: S,
|
|
374
374
|
next: N,
|
|
@@ -384,7 +384,7 @@ const W = (e) => isNaN(Number(e)) && typeof e == "string" ? e : `${e}px`, St = (
|
|
|
384
384
|
});
|
|
385
385
|
a(ee);
|
|
386
386
|
const re = () => e.dots ? c("div", {
|
|
387
|
-
class:
|
|
387
|
+
class: K.value
|
|
388
388
|
}, [i.map((T, V) => {
|
|
389
389
|
const F = Xe("dot", {
|
|
390
390
|
active: V === l.value
|
|
@@ -754,20 +754,20 @@ const [lt, Ue] = _("tabs"), mt = lt, jn = /* @__PURE__ */ O({
|
|
|
754
754
|
}, y = (E) => {
|
|
755
755
|
const {
|
|
756
756
|
title: B,
|
|
757
|
-
name:
|
|
757
|
+
name: A,
|
|
758
758
|
disabled: L
|
|
759
759
|
} = l[E].$props || {};
|
|
760
|
-
C.value !== E && (o(L ? "disabledClick" : "click", E, B,
|
|
760
|
+
C.value !== E && (o(L ? "disabledClick" : "click", E, B, A), !L && v(E));
|
|
761
761
|
}, $ = async () => {
|
|
762
|
-
await
|
|
762
|
+
await q(() => {
|
|
763
763
|
if (!u.value || !f.value)
|
|
764
764
|
return;
|
|
765
765
|
const E = f.value;
|
|
766
766
|
if (!E || !w.value[C.value])
|
|
767
767
|
return;
|
|
768
|
-
const B = w.value[C.value].$el,
|
|
768
|
+
const B = w.value[C.value].$el, A = B.offsetLeft - (E.offsetWidth - B.offsetWidth) / 2;
|
|
769
769
|
E.scrollTo({
|
|
770
|
-
left:
|
|
770
|
+
left: A,
|
|
771
771
|
behavior: "smooth"
|
|
772
772
|
});
|
|
773
773
|
});
|
|
@@ -779,24 +779,24 @@ const [lt, Ue] = _("tabs"), mt = lt, jn = /* @__PURE__ */ O({
|
|
|
779
779
|
transform: "translateX(50%)",
|
|
780
780
|
transition: "all 0ms ease-out"
|
|
781
781
|
}), s = async () => {
|
|
782
|
-
await
|
|
782
|
+
await q(() => {
|
|
783
783
|
if (!w.value || w.value.length === 0)
|
|
784
784
|
return;
|
|
785
|
-
const E = C.value >= w.value.length ? 0 : C.value, B = w.value[E].$el,
|
|
786
|
-
m.transform = `translateX(${
|
|
785
|
+
const E = C.value >= w.value.length ? 0 : C.value, B = w.value[E].$el, A = B.offsetLeft + B.offsetWidth / 2;
|
|
786
|
+
m.transform = `translateX(${A}px) translateX(-50%)`, i.value && (m.transition = `all ${e.duration}ms ease-out`), i.value = !0;
|
|
787
787
|
});
|
|
788
788
|
}, p = (E) => {
|
|
789
789
|
const {
|
|
790
790
|
title: B,
|
|
791
|
-
name:
|
|
791
|
+
name: A
|
|
792
792
|
} = l[E].$props || {};
|
|
793
|
-
o("change", E, B,
|
|
793
|
+
o("change", E, B, A), C.value = E;
|
|
794
794
|
}, x = (E) => {
|
|
795
795
|
const {
|
|
796
796
|
title: B,
|
|
797
|
-
name:
|
|
797
|
+
name: A
|
|
798
798
|
} = l[E].$props || {};
|
|
799
|
-
o("afterChange", E, B,
|
|
799
|
+
o("afterChange", E, B, A), C.value = E;
|
|
800
800
|
}, S = H({
|
|
801
801
|
children: l,
|
|
802
802
|
activeIndex: C,
|
|
@@ -806,9 +806,9 @@ const [lt, Ue] = _("tabs"), mt = lt, jn = /* @__PURE__ */ O({
|
|
|
806
806
|
const k = (E) => N(E) && /^\d+(\.\d+)?$/.test(E) ? `${E}px` : E, N = (E) => Object.prototype.toString.call(E) === "[object String]";
|
|
807
807
|
return J(async () => {
|
|
808
808
|
nt.polyfill(), await s();
|
|
809
|
-
}),
|
|
809
|
+
}), G(() => C.value, async () => {
|
|
810
810
|
await s(), await $();
|
|
811
|
-
}),
|
|
811
|
+
}), G(() => {
|
|
812
812
|
var E;
|
|
813
813
|
return (E = t.default) == null ? void 0 : E.length;
|
|
814
814
|
}, async () => {
|
|
@@ -826,15 +826,15 @@ const [lt, Ue] = _("tabs"), mt = lt, jn = /* @__PURE__ */ O({
|
|
|
826
826
|
[e.size]: e.size,
|
|
827
827
|
[e.align]: e.align
|
|
828
828
|
})
|
|
829
|
-
}, [l.length > 0 && l.map((B,
|
|
829
|
+
}, [l.length > 0 && l.map((B, A) => c(xt, {
|
|
830
830
|
title: B.title,
|
|
831
831
|
disabled: B.disabled,
|
|
832
832
|
"title-slot": B.$slots.title,
|
|
833
|
-
key:
|
|
834
|
-
ref: g(
|
|
835
|
-
active: C.value ===
|
|
833
|
+
key: A,
|
|
834
|
+
ref: g(A),
|
|
835
|
+
active: C.value === A,
|
|
836
836
|
scrollable: u.value,
|
|
837
|
-
onClick: () => y(
|
|
837
|
+
onClick: () => y(A)
|
|
838
838
|
}, null)), c("div", {
|
|
839
839
|
class: Ue("line"),
|
|
840
840
|
style: {
|
|
@@ -1003,7 +1003,7 @@ const [Un] = _("tab"), qn = /* @__PURE__ */ O({
|
|
|
1003
1003
|
} = e, {
|
|
1004
1004
|
left: E,
|
|
1005
1005
|
width: B
|
|
1006
|
-
} = n.value.getBoundingClientRect(),
|
|
1006
|
+
} = n.value.getBoundingClientRect(), A = S.clientX - E, L = Math.floor(k + A / B * y.value);
|
|
1007
1007
|
if (u.value) {
|
|
1008
1008
|
const X = N[0], j = N[1], I = (X + j) / 2;
|
|
1009
1009
|
L <= I ? d([L, j]) : d([X, L]);
|
|
@@ -1058,7 +1058,7 @@ const [Un] = _("tab"), qn = /* @__PURE__ */ O({
|
|
|
1058
1058
|
"aria-valuenow": E,
|
|
1059
1059
|
class: B,
|
|
1060
1060
|
onTouchstart: $,
|
|
1061
|
-
onTouchmove: (
|
|
1061
|
+
onTouchmove: (A) => m(A, k),
|
|
1062
1062
|
onTouchend: s,
|
|
1063
1063
|
style: {
|
|
1064
1064
|
...N,
|
|
@@ -1319,11 +1319,11 @@ const tl = z(el), [nl, ve] = _("loading"), ll = {
|
|
|
1319
1319
|
}) {
|
|
1320
1320
|
const a = M(0), i = M(!1), l = M("normal"), r = M(), u = M(), h = M(), C = M([]), v = M(0), b = M(0), d = M([]), w = P(() => Bn(e.height) ? `${e.height}px` : e.height), f = P(() => d.value.length ? d.value[d.value.length - 1].bottom : 0), g = P(() => {
|
|
1321
1321
|
if (e.virtual) {
|
|
1322
|
-
const I = v.value - y.value,
|
|
1323
|
-
return s.value.slice(I,
|
|
1322
|
+
const I = v.value - y.value, D = b.value + $.value;
|
|
1323
|
+
return s.value.slice(I, D);
|
|
1324
1324
|
}
|
|
1325
1325
|
return s.value;
|
|
1326
|
-
}), y = P(() => Math.min(v.value, e.bufferScale * m.value)), $ = P(() => Math.min(e.dataSource.length - b.value, e.bufferScale * m.value)), m = P(() => Math.ceil(a.value / parseInt(String(e.itemHeight)))), s = P(() => e.dataSource.map((I,
|
|
1326
|
+
}), y = P(() => Math.min(v.value, e.bufferScale * m.value)), $ = P(() => Math.min(e.dataSource.length - b.value, e.bufferScale * m.value)), m = P(() => Math.ceil(a.value / parseInt(String(e.itemHeight)))), s = P(() => e.dataSource.map((I, D) => (I[e.keyName] = D, I))), p = () => i.value ? document.documentElement.scrollTop || document.body.scrollTop : r.value.scrollTop, x = () => i.value ? document.documentElement.scrollHeight : r.value.scrollHeight, S = () => {
|
|
1327
1327
|
l.value !== "loading" && (l.value = "loading", o("load", (I) => {
|
|
1328
1328
|
if (l.value === "loading")
|
|
1329
1329
|
switch (I) {
|
|
@@ -1334,35 +1334,39 @@ const tl = z(el), [nl, ve] = _("loading"), ll = {
|
|
|
1334
1334
|
l.value = "finished", e.virtual && N(), e.virtual && e.dynamicItemHeight && E();
|
|
1335
1335
|
break;
|
|
1336
1336
|
default:
|
|
1337
|
-
l.value = "normal", e.virtual ? (E(), e.dataSource.length < m.value + $.value && S()) :
|
|
1337
|
+
l.value = "normal", e.virtual ? (E(), e.dataSource.length < m.value + $.value && S()) : q(() => {
|
|
1338
|
+
k();
|
|
1339
|
+
}).catch((D) => {
|
|
1340
|
+
throw new Error(D);
|
|
1341
|
+
});
|
|
1338
1342
|
}
|
|
1339
1343
|
}));
|
|
1340
1344
|
}, k = () => {
|
|
1341
1345
|
l.value === "normal" && x() - p() - a.value <= e.loadOffset && S();
|
|
1342
1346
|
}, N = () => {
|
|
1343
|
-
d.value = s.value.map((I,
|
|
1347
|
+
d.value = s.value.map((I, D) => {
|
|
1344
1348
|
const Y = parseInt(String(e.itemHeight));
|
|
1345
1349
|
return {
|
|
1346
|
-
index:
|
|
1350
|
+
index: D,
|
|
1347
1351
|
height: Y,
|
|
1348
|
-
top:
|
|
1349
|
-
bottom: (
|
|
1352
|
+
top: D * Y,
|
|
1353
|
+
bottom: (D + 1) * Y
|
|
1350
1354
|
};
|
|
1351
1355
|
});
|
|
1352
1356
|
}, E = () => {
|
|
1353
1357
|
N();
|
|
1354
1358
|
for (let I = 1; I < d.value.length; I++)
|
|
1355
1359
|
d.value[I].top = d.value[I - 1].bottom, d.value[I].bottom = d.value[I].top + d.value[I].height;
|
|
1356
|
-
}, B = (I,
|
|
1357
|
-
let Y = 0, le = I.length - 1,
|
|
1360
|
+
}, B = (I, D) => {
|
|
1361
|
+
let Y = 0, le = I.length - 1, K = -1;
|
|
1358
1362
|
for (; Y <= le; ) {
|
|
1359
1363
|
const ee = Math.floor((Y + le) / 2), re = I[ee].bottom;
|
|
1360
|
-
if (re ===
|
|
1364
|
+
if (re === D)
|
|
1361
1365
|
return ee + 1;
|
|
1362
|
-
re <
|
|
1366
|
+
re < D ? Y = ee + 1 : re > D && ((K === -1 || K > ee) && (K = ee), le = ee - 1);
|
|
1363
1367
|
}
|
|
1364
|
-
return
|
|
1365
|
-
},
|
|
1368
|
+
return K;
|
|
1369
|
+
}, A = (I) => B(d.value, I), L = () => {
|
|
1366
1370
|
if (k(), e.virtual) {
|
|
1367
1371
|
const I = p();
|
|
1368
1372
|
X(I);
|
|
@@ -1370,13 +1374,13 @@ const tl = z(el), [nl, ve] = _("loading"), ll = {
|
|
|
1370
1374
|
}, X = (I) => {
|
|
1371
1375
|
if (!u.value)
|
|
1372
1376
|
return;
|
|
1373
|
-
const
|
|
1377
|
+
const D = I || 0;
|
|
1374
1378
|
if (e.dynamicItemHeight) {
|
|
1375
|
-
v.value = D
|
|
1379
|
+
v.value = A(D), b.value = v.value + m.value;
|
|
1376
1380
|
const Y = d.value[v.value - y.value].top ? d.value[v.value - y.value].top : 0;
|
|
1377
1381
|
u.value.style.transform = `translate3d(0, ${Y}px, 0)`;
|
|
1378
1382
|
} else {
|
|
1379
|
-
v.value = Math.floor(
|
|
1383
|
+
v.value = Math.floor(D / parseInt(String(e.itemHeight))), b.value = v.value + m.value;
|
|
1380
1384
|
const Y = v.value * parseInt(String(e.itemHeight)) - y.value * parseInt(String(e.itemHeight));
|
|
1381
1385
|
u.value.style.transform = `translate3d(0, ${Y}px, 0)`;
|
|
1382
1386
|
}
|
|
@@ -1384,14 +1388,14 @@ const tl = z(el), [nl, ve] = _("loading"), ll = {
|
|
|
1384
1388
|
if (!u.value || !h.value)
|
|
1385
1389
|
return;
|
|
1386
1390
|
const I = u.value.children;
|
|
1387
|
-
I && I.length > 0 && [...I].forEach((
|
|
1388
|
-
if (
|
|
1389
|
-
const Y =
|
|
1391
|
+
I && I.length > 0 && [...I].forEach((D) => {
|
|
1392
|
+
if (D instanceof HTMLDivElement) {
|
|
1393
|
+
const Y = D.getBoundingClientRect(), {
|
|
1390
1394
|
height: le
|
|
1391
|
-
} = Y,
|
|
1395
|
+
} = Y, K = Number(D.dataset.index), re = d.value[K].height - le;
|
|
1392
1396
|
if (re) {
|
|
1393
|
-
d.value[
|
|
1394
|
-
for (let T =
|
|
1397
|
+
d.value[K].bottom -= re, d.value[K].height = le;
|
|
1398
|
+
for (let T = K + 1; T < d.value.length; T++)
|
|
1395
1399
|
d.value[T].top = d.value[T - 1].bottom, d.value[T].bottom -= re;
|
|
1396
1400
|
}
|
|
1397
1401
|
}
|
|
@@ -1404,9 +1408,9 @@ const tl = z(el), [nl, ve] = _("loading"), ll = {
|
|
|
1404
1408
|
}), J(() => {
|
|
1405
1409
|
e.height !== "auto" ? (i.value = !1, a.value = r.value.clientHeight) : e.height === "auto" && (i.value = !0, a.value = document.documentElement.clientHeight, document.addEventListener("scroll", L)), e.virtual && (N(), X()), e.immediateCheck && k();
|
|
1406
1410
|
}), Cn(async () => {
|
|
1407
|
-
var I,
|
|
1411
|
+
var I, D;
|
|
1408
1412
|
if (e.virtual && e.dynamicItemHeight) {
|
|
1409
|
-
if (await
|
|
1413
|
+
if (await q(), !((D = (I = u.value) == null ? void 0 : I.children) != null && D.length))
|
|
1410
1414
|
return;
|
|
1411
1415
|
j();
|
|
1412
1416
|
}
|
|
@@ -1431,12 +1435,12 @@ const tl = z(el), [nl, ve] = _("loading"), ll = {
|
|
|
1431
1435
|
ref: u,
|
|
1432
1436
|
class: ue("content")
|
|
1433
1437
|
}, [g.value.map((I) => {
|
|
1434
|
-
var
|
|
1438
|
+
var D;
|
|
1435
1439
|
return c("div", {
|
|
1436
1440
|
ref: C,
|
|
1437
1441
|
class: ue("item"),
|
|
1438
1442
|
"data-index": I._index
|
|
1439
|
-
}, [(
|
|
1443
|
+
}, [(D = t.default) == null ? void 0 : D.call(t, {
|
|
1440
1444
|
item: I
|
|
1441
1445
|
})]);
|
|
1442
1446
|
})]), l.value === "loading" && c("div", {
|
|
@@ -1482,7 +1486,7 @@ const sl = z(Le), Zt = "y-form-item", ul = () => {
|
|
|
1482
1486
|
const e = At(Zt, null), t = ie();
|
|
1483
1487
|
if (e && (t != null && t.proxy)) {
|
|
1484
1488
|
const { setField: o } = e, { resetValidation: n, change: a, validateWithTrigger: i } = e;
|
|
1485
|
-
return
|
|
1489
|
+
return G(
|
|
1486
1490
|
() => t.proxy.modelValue,
|
|
1487
1491
|
() => {
|
|
1488
1492
|
e.instance && e.instance.exposed && (n(), a(), i("onChange"));
|
|
@@ -2520,7 +2524,7 @@ const Ql = z(Zl), [Jl, de] = _("progress"), ea = /* @__PURE__ */ O({
|
|
|
2520
2524
|
a.value = [];
|
|
2521
2525
|
}), we(() => {
|
|
2522
2526
|
l.timer && cancelAnimationFrame(l.timer), window.removeEventListener("resize", u);
|
|
2523
|
-
}),
|
|
2527
|
+
}), G(() => e.percent, () => {
|
|
2524
2528
|
r(), h();
|
|
2525
2529
|
});
|
|
2526
2530
|
const r = () => {
|
|
@@ -2536,17 +2540,17 @@ const Ql = z(Zl), [Jl, de] = _("progress"), ea = /* @__PURE__ */ O({
|
|
|
2536
2540
|
};
|
|
2537
2541
|
l.timer && cancelAnimationFrame(l.timer), l.timer = requestAnimationFrame(y);
|
|
2538
2542
|
};
|
|
2539
|
-
|
|
2543
|
+
G(() => e.mileages, () => C);
|
|
2540
2544
|
const u = () => {
|
|
2541
2545
|
h(), C();
|
|
2542
2546
|
}, h = () => {
|
|
2543
|
-
|
|
2547
|
+
q(() => {
|
|
2544
2548
|
i.progressWidth = o.value && o.value.offsetWidth || 0, i.pivotContentWidth = n.value && n.value.offsetWidth || 0;
|
|
2545
2549
|
}).catch((d) => {
|
|
2546
2550
|
throw new Error(d);
|
|
2547
2551
|
});
|
|
2548
2552
|
}, C = () => {
|
|
2549
|
-
|
|
2553
|
+
q(() => {
|
|
2550
2554
|
e.mileages.forEach((d, w) => {
|
|
2551
2555
|
i.mileageWidth[w] = a.value[w] && a.value[w].offsetWidth || 0;
|
|
2552
2556
|
});
|
|
@@ -2787,7 +2791,7 @@ const fa = /* @__PURE__ */ O({
|
|
|
2787
2791
|
}), we(() => {
|
|
2788
2792
|
const l = ne.findIndex((r) => r._id === o.value);
|
|
2789
2793
|
l >= 0 && ne.splice(l, 1);
|
|
2790
|
-
}),
|
|
2794
|
+
}), G(() => e.modelValue, (l) => {
|
|
2791
2795
|
n(l);
|
|
2792
2796
|
});
|
|
2793
2797
|
const n = (l, r) => {
|
|
@@ -2946,7 +2950,7 @@ const ot = z(fa), [ma, Lt, Pt] = _("popup"), ga = {
|
|
|
2946
2950
|
get: () => e.modelValue,
|
|
2947
2951
|
set: (l) => o("update:modelValue", l)
|
|
2948
2952
|
});
|
|
2949
|
-
return
|
|
2953
|
+
return G(() => i.value, (l, r) => {
|
|
2950
2954
|
l !== r && (l && e.lockScroll ? document.body.style.overflow = "hidden" : document.body.style.overflow = "");
|
|
2951
2955
|
}), () => {
|
|
2952
2956
|
const {
|
|
@@ -3070,7 +3074,7 @@ const vt = z(va), [ha, ze, It] = _("stepper"), pa = /* @__PURE__ */ O({
|
|
|
3070
3074
|
const g = u(f);
|
|
3071
3075
|
a.value = g, o("update:modelValue", g), o("change", g);
|
|
3072
3076
|
};
|
|
3073
|
-
|
|
3077
|
+
G(() => e.modelValue, (f) => {
|
|
3074
3078
|
a.value = f;
|
|
3075
3079
|
});
|
|
3076
3080
|
const C = (f) => o("focus", f), v = (f) => {
|
|
@@ -3471,7 +3475,7 @@ const Ta = z(ka), [Ea, Na] = _("input"), Ba = 13, La = /* @__PURE__ */ O({
|
|
|
3471
3475
|
}, l = (d, w) => {
|
|
3472
3476
|
d !== w && (d ? (a = document.createElement("div"), a.className = "y-input__limit-num", (o == null ? void 0 : o.vnode.el).insertAdjacentElement("afterend", a), e.maxLength && i(e.maxLength)) : (a && a.remove(), a = null));
|
|
3473
3477
|
};
|
|
3474
|
-
|
|
3478
|
+
G(() => e.showWordLimit, l), G(() => e.modelValue, i), G(() => e.maxLength, i);
|
|
3475
3479
|
const r = (d) => t("focus", d), u = (d) => t("click", d), h = (d) => {
|
|
3476
3480
|
if (n) {
|
|
3477
3481
|
const {
|
|
@@ -3772,7 +3776,7 @@ const [_a, ae] = _("dialog"), za = {
|
|
|
3772
3776
|
} = e;
|
|
3773
3777
|
return c(vt, Me({
|
|
3774
3778
|
modelValue: v.value,
|
|
3775
|
-
"onUpdate:modelValue": (
|
|
3779
|
+
"onUpdate:modelValue": (A) => v.value = A,
|
|
3776
3780
|
customClass: ae(),
|
|
3777
3781
|
customStyle: {
|
|
3778
3782
|
width: W(b)
|
|
@@ -3786,8 +3790,8 @@ const [_a, ae] = _("dialog"), za = {
|
|
|
3786
3790
|
duration: E
|
|
3787
3791
|
}), {
|
|
3788
3792
|
default: () => {
|
|
3789
|
-
var
|
|
3790
|
-
return [((
|
|
3793
|
+
var A, L, X, j;
|
|
3794
|
+
return [((A = o.img) == null ? void 0 : A.call(o)) || S && c("div", {
|
|
3791
3795
|
class: ae("img", {
|
|
3792
3796
|
circle: k
|
|
3793
3797
|
}),
|
|
@@ -4161,7 +4165,7 @@ const ut = /* @__PURE__ */ O({
|
|
|
4161
4165
|
offsetTop: E
|
|
4162
4166
|
} = pn(k), {
|
|
4163
4167
|
bestPosition: B,
|
|
4164
|
-
maxWidth:
|
|
4168
|
+
maxWidth: A,
|
|
4165
4169
|
maxHeight: L
|
|
4166
4170
|
} = h({
|
|
4167
4171
|
referenceRect: $,
|
|
@@ -4171,30 +4175,30 @@ const ut = /* @__PURE__ */ O({
|
|
|
4171
4175
|
tipHeight: p,
|
|
4172
4176
|
autoFlipping: e.autoFlipping
|
|
4173
4177
|
});
|
|
4174
|
-
B || (a.maxWidth =
|
|
4178
|
+
B || (a.maxWidth = A, a.maxHeight = L), B && B !== x && (a.position = B), q(() => {
|
|
4175
4179
|
const {
|
|
4176
4180
|
width: j,
|
|
4177
4181
|
height: I
|
|
4178
|
-
} = u(),
|
|
4182
|
+
} = u(), D = B || x, Y = Ra({
|
|
4179
4183
|
referenceRect: $,
|
|
4180
4184
|
rectWidth: j,
|
|
4181
4185
|
rectHeight: I,
|
|
4182
|
-
preferredPosition:
|
|
4186
|
+
preferredPosition: D,
|
|
4183
4187
|
align: S,
|
|
4184
4188
|
marginToEdge: e.marginToEdge,
|
|
4185
4189
|
paddingToTarget: be
|
|
4186
4190
|
});
|
|
4187
|
-
l.left = Y.x - N, l.top = Y.y - E, a.position =
|
|
4191
|
+
l.left = Y.x - N, l.top = Y.y - E, a.position = D, a.maxWidth = A, a.maxHeight = L;
|
|
4188
4192
|
const le = {
|
|
4189
4193
|
x: Y.x,
|
|
4190
4194
|
y: Y.y,
|
|
4191
4195
|
width: j,
|
|
4192
4196
|
height: I
|
|
4193
4197
|
}, {
|
|
4194
|
-
arrowPositionInfo:
|
|
4198
|
+
arrowPositionInfo: K,
|
|
4195
4199
|
arrowClassName: ee
|
|
4196
|
-
} = qa($, le,
|
|
4197
|
-
i.position =
|
|
4200
|
+
} = qa($, le, D, S);
|
|
4201
|
+
i.position = K, i.className = ee;
|
|
4198
4202
|
}).catch((j) => {
|
|
4199
4203
|
throw new Error(j);
|
|
4200
4204
|
});
|
|
@@ -4211,25 +4215,25 @@ const ut = /* @__PURE__ */ O({
|
|
|
4211
4215
|
const [g, y] = e.position.split("-");
|
|
4212
4216
|
a.align = y, a.position = g;
|
|
4213
4217
|
}, f = () => {
|
|
4214
|
-
e.manual && (n.value = e.modelValue), e.modelValue || n.value ?
|
|
4218
|
+
e.manual && (n.value = e.modelValue), e.modelValue || n.value ? q(C).catch((g) => {
|
|
4215
4219
|
throw new Error(g);
|
|
4216
4220
|
}) : (l.left = 0, l.top = 0);
|
|
4217
4221
|
};
|
|
4218
|
-
return
|
|
4219
|
-
w(),
|
|
4222
|
+
return G(() => e.position, () => {
|
|
4223
|
+
w(), q(() => {
|
|
4220
4224
|
f();
|
|
4221
4225
|
}).catch((g) => {
|
|
4222
4226
|
throw new Error(g);
|
|
4223
4227
|
});
|
|
4224
|
-
}),
|
|
4225
|
-
w(),
|
|
4228
|
+
}), G([() => n.value, () => e.modelValue, () => e.reference], () => {
|
|
4229
|
+
w(), q(() => {
|
|
4226
4230
|
f();
|
|
4227
4231
|
}).catch((g) => {
|
|
4228
4232
|
throw new Error(g);
|
|
4229
4233
|
});
|
|
4230
4234
|
}), J(() => {
|
|
4231
4235
|
var g;
|
|
4232
|
-
w(),
|
|
4236
|
+
w(), q(() => f()).catch((y) => {
|
|
4233
4237
|
throw new Error(y);
|
|
4234
4238
|
}), e.manual || ((g = e.reference) == null || g.addEventListener("click", b), document.addEventListener("touchstart", v));
|
|
4235
4239
|
}), xe(() => {
|
|
@@ -4304,7 +4308,7 @@ const [Ka] = _("tooltip"), Za = /* @__PURE__ */ O({
|
|
|
4304
4308
|
return J(() => {
|
|
4305
4309
|
n.value = a();
|
|
4306
4310
|
}), ct(() => {
|
|
4307
|
-
|
|
4311
|
+
q(() => {
|
|
4308
4312
|
n.value = a();
|
|
4309
4313
|
}).catch((i) => {
|
|
4310
4314
|
throw Error(i);
|
|
@@ -4599,7 +4603,7 @@ const ao = z(lo), [yn, Ae] = _("dropdown"), bn = yn, oo = {
|
|
|
4599
4603
|
k === p ? x[1] = k : N.state.showPopup && (x[0] = k);
|
|
4600
4604
|
}), x[0] !== -1 && u[x[0]].exposed.toggle(!1, {
|
|
4601
4605
|
immediate: !0
|
|
4602
|
-
}),
|
|
4606
|
+
}), q(() => {
|
|
4603
4607
|
x[1] !== -1 && u[x[1]].exposed.toggle();
|
|
4604
4608
|
}).catch((S) => {
|
|
4605
4609
|
throw new Error(S);
|