ss-component-new 1.3.496 → 1.3.498
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{array-C06o53Yl.js → array-BzLo9FoD.js} +2 -2
- package/dist/{array-Cj_51HQg.cjs → array-D97z0nJZ.cjs} +1 -1
- package/dist/{index-DWfVwgfW.js → index-7_EcwGcL.js} +7 -7
- package/dist/{index-C_pZ5_Rr.js → index-89NCtw1f.js} +1 -1
- package/dist/{index-C63WgolW.js → index-B3bhdvYB.js} +2 -2
- package/dist/{index-8ojpIkjk.cjs → index-BBFeM4OJ.cjs} +1 -1
- package/dist/index-BRf391bW.js +25040 -0
- package/dist/{index-CX4TTz13.js → index-BXpHEHQK.js} +1 -1
- package/dist/{index-DgHgr6o3.cjs → index-BYk8W1jo.cjs} +1 -1
- package/dist/{index-D19kpGlM.cjs → index-BZWnLO_1.cjs} +1 -1
- package/dist/index-BxqV6K8a.cjs +39 -0
- package/dist/{index-C2RFvRnz.cjs → index-C8Gs2kb9.cjs} +1 -1
- package/dist/{index-CFXOJ9On.js → index-C9ymYFoj.js} +1 -1
- package/dist/{index-bdJ6Rv_b.cjs → index-CXzyIaKS.cjs} +1 -1
- package/dist/{index-CIBLDYUr.cjs → index-D61oefkm.cjs} +1 -1
- package/dist/{index-gU0NjccR.js → index-DOTzO0oC.js} +1 -1
- package/dist/{index-1io6qGUF.cjs → index-DYfyGCzh.cjs} +1 -1
- package/dist/{index-Dz5sgTgm.cjs → index-DZE8ct-a.cjs} +1 -1
- package/dist/{index-ZgqPuX7q.cjs → index-DcVTdbvL.cjs} +1 -1
- package/dist/{index-CKKhk7r7.js → index-Dd1I1FpL.js} +2 -2
- package/dist/{index-B80uGb97.js → index-DrNcZwW9.js} +3 -3
- package/dist/{index-B4P4-6XS.js → index-DvALRudH.js} +1 -1
- package/dist/{index-u58HGJ-V.js → index-O8ibsut4.js} +2 -2
- package/dist/{index-PgA-t00-.cjs → index-XFWr2jDi.cjs} +1 -1
- package/dist/{index-Bqfi_lg2.cjs → index-ZGugCcFS.cjs} +1 -1
- package/dist/{index-C8Nd5lVx.js → index-yDS_g8Zg.js} +1 -1
- package/dist/{main-DWisOrSP.js → main-BYr0zGF7.js} +2 -2
- package/dist/{main-sCnkGFZB.cjs → main-DkUGanos.cjs} +1 -1
- package/dist/ss-component.cjs +1 -14
- package/dist/ss-component.css +1 -1
- package/dist/ss-component.js +54 -958
- package/dist/ss-component2.cjs +1 -1
- package/dist/ss-component2.js +8 -8
- package/dist/{threeModel-CQSHt2TL.cjs → threeModel-C_hzvL0g.cjs} +1 -1
- package/dist/{threeModel-Dv9sgokW.js → threeModel-DJufegTZ.js} +1 -1
- package/dist/{threeSceneView-BdUq3MMn.js → threeSceneView-D7W8LkVN.js} +3 -3
- package/dist/{threeSceneView-BfbtVvon.cjs → threeSceneView-DP3w9PCW.cjs} +1 -1
- package/dist/{threeSceneViewForCPMPIP-DvT_6wlE.js → threeSceneViewForCPMPIP-BCE-01xK.js} +1 -1
- package/dist/{threeSceneViewForCPMPIP-D0Wf1B1n.cjs → threeSceneViewForCPMPIP-DLA4I3u-.cjs} +1 -1
- package/dist/{threeViewerHost-C4bcTMG5.cjs → threeViewerHost-BZFm839b.cjs} +1 -1
- package/dist/{threeViewerHost-CK0krO72.js → threeViewerHost-DNxvuNKu.js} +1 -1
- package/package.json +1 -1
- package/dist/index-ByA0_yBV.cjs +0 -26
- package/dist/index-Dwc8LN6-.js +0 -24136
package/dist/ss-component.js
CHANGED
|
@@ -1,978 +1,74 @@
|
|
|
1
|
-
import { defineAsyncComponent as
|
|
1
|
+
import { defineAsyncComponent as o } from "vue";
|
|
2
2
|
import "./index.vue_vue_type_style_index_0_scoped_07c75c98_lang-DFyt9sBY.js";
|
|
3
|
-
import { S as
|
|
4
|
-
import { u as
|
|
3
|
+
import { S as j } from "./index-BHtNKL1L.js";
|
|
4
|
+
import { u as C } from "./index-CwJwXVns.js";
|
|
5
5
|
import "./index-CI4RP047.js";
|
|
6
6
|
import "./request-XJsZ4h2T.js";
|
|
7
7
|
/* empty css */
|
|
8
|
-
import
|
|
9
|
-
import { t as
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
|
|
8
|
+
import u from "./ss-component2.js";
|
|
9
|
+
import { t as g, c as T, b as P } from "./index-ChNfRlIP.js";
|
|
10
|
+
const n = o(() => import("./main-BYr0zGF7.js"));
|
|
11
|
+
n.install = (t) => {
|
|
12
|
+
t.component("ssComponent", n);
|
|
13
13
|
};
|
|
14
|
-
const
|
|
15
|
-
|
|
16
|
-
|
|
14
|
+
const s = o(() => import("./index-BXpHEHQK.js").then((t) => t.q));
|
|
15
|
+
s.install = (t) => {
|
|
16
|
+
t.component("ssTab", s);
|
|
17
17
|
};
|
|
18
|
-
const
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
const r = o(() => import("./index-DrNcZwW9.js").then((t) => t.i));
|
|
19
|
+
r.install = (t) => {
|
|
20
|
+
t.component("ssMenu", r);
|
|
21
21
|
};
|
|
22
|
-
const
|
|
23
|
-
|
|
24
|
-
|
|
22
|
+
const m = o(() => import("./index-ClG8FDQH.js"));
|
|
23
|
+
m.install = (t) => {
|
|
24
|
+
t.component("ssMenuComponent", m);
|
|
25
25
|
};
|
|
26
|
-
const
|
|
27
|
-
|
|
28
|
-
|
|
26
|
+
const i = o(() => import("./index-C8ORIDjr.js"));
|
|
27
|
+
i.install = (t) => {
|
|
28
|
+
t.component("ssCanvas", i);
|
|
29
29
|
};
|
|
30
|
-
const
|
|
31
|
-
|
|
32
|
-
|
|
30
|
+
const c = o(() => import("./index-rlStojTL.js"));
|
|
31
|
+
c.install = (t) => {
|
|
32
|
+
t.component("ssFold", c);
|
|
33
33
|
};
|
|
34
|
-
const
|
|
35
|
-
|
|
36
|
-
|
|
34
|
+
const a = o(() => import("./index-BDGxsSv8.js").then((t) => t.i));
|
|
35
|
+
a.install = (t) => {
|
|
36
|
+
t.component("ssAvatar", a);
|
|
37
37
|
};
|
|
38
|
-
const
|
|
39
|
-
|
|
40
|
-
|
|
38
|
+
const l = o(() => import("./threeModel-DJufegTZ.js"));
|
|
39
|
+
l.install = (t) => {
|
|
40
|
+
t.component("ssThree", l);
|
|
41
41
|
};
|
|
42
|
-
const
|
|
43
|
-
|
|
44
|
-
|
|
42
|
+
const p = o(() => import("./threeViewerHost-DNxvuNKu.js").then((t) => t.t));
|
|
43
|
+
p.install = (t) => {
|
|
44
|
+
t.component("threeViewerHost", p);
|
|
45
45
|
};
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
}
|
|
53
|
-
function Pe() {
|
|
54
|
-
return "xxxxxxxxxxxxaxxxyxxxxxxxxxxxxxxx".replace(/[xy]/g, function(S) {
|
|
55
|
-
const C = Math.random() * 16 | 0;
|
|
56
|
-
return (S === "x" ? C : C & 3 | 8).toString(16);
|
|
57
|
-
});
|
|
58
|
-
}
|
|
59
|
-
const ee = () => Pe().replaceAll("-", "");
|
|
60
|
-
function $e(e) {
|
|
61
|
-
const S = /* @__PURE__ */ new Set(), C = /* @__PURE__ */ new Set();
|
|
62
|
-
return e.forEach((o) => {
|
|
63
|
-
S.has(o.id) ? C.add(o) : S.add(o.id);
|
|
64
|
-
}), C.size > 0 && e.forEach((o) => {
|
|
65
|
-
o.id = ee();
|
|
66
|
-
}), e;
|
|
67
|
-
}
|
|
68
|
-
function oe(e) {
|
|
69
|
-
return e.map((S, C) => ({
|
|
70
|
-
id: ee(),
|
|
71
|
-
index: C,
|
|
72
|
-
data: S
|
|
73
|
-
}));
|
|
74
|
-
}
|
|
75
|
-
var we = We({
|
|
76
|
-
name: "VerticalScroll",
|
|
77
|
-
emits: ["offset", "count"],
|
|
78
|
-
inheritAttrs: !1,
|
|
79
|
-
props: {
|
|
80
|
-
// 是否开启自动滚动
|
|
81
|
-
modelValue: {
|
|
82
|
-
type: Boolean,
|
|
83
|
-
default: !0
|
|
84
|
-
},
|
|
85
|
-
list: {
|
|
86
|
-
type: Array,
|
|
87
|
-
required: !0
|
|
88
|
-
},
|
|
89
|
-
// 是否开启鼠标悬停
|
|
90
|
-
hover: {
|
|
91
|
-
type: Boolean,
|
|
92
|
-
default: !1
|
|
93
|
-
},
|
|
94
|
-
// 单步停止等待时间 (默认值 1000ms)
|
|
95
|
-
singleWaitTime: {
|
|
96
|
-
type: Number,
|
|
97
|
-
default: 1e3
|
|
98
|
-
},
|
|
99
|
-
// 开启鼠标悬停时支持滚轮滚动
|
|
100
|
-
wheel: {
|
|
101
|
-
type: Boolean,
|
|
102
|
-
default: !1
|
|
103
|
-
},
|
|
104
|
-
// 启用单行滚动
|
|
105
|
-
singleLine: {
|
|
106
|
-
type: Boolean,
|
|
107
|
-
default: !1
|
|
108
|
-
},
|
|
109
|
-
step: {
|
|
110
|
-
type: Number,
|
|
111
|
-
default: 0.5
|
|
112
|
-
},
|
|
113
|
-
visibleCount: {
|
|
114
|
-
type: Number
|
|
115
|
-
},
|
|
116
|
-
ease: {
|
|
117
|
-
type: String,
|
|
118
|
-
default: "cubic-bezier(0.03, 0.76, 1, 0.16)"
|
|
119
|
-
},
|
|
120
|
-
direction: {
|
|
121
|
-
type: String,
|
|
122
|
-
default: "up"
|
|
123
|
-
},
|
|
124
|
-
delay: {
|
|
125
|
-
type: Number,
|
|
126
|
-
default: 0
|
|
127
|
-
}
|
|
128
|
-
},
|
|
129
|
-
setup(e, { expose: S, emit: C }) {
|
|
130
|
-
const o = b(null), d = b(null), c = b([]), u = b(0), F = b(!1), L = b(e.direction), y = ae(() => e.hover ? !F.value && e.modelValue : e.modelValue), x = b([]), i = oe(e.list), s = b(e.visibleCount === void 0 ? 0 : e.visibleCount);
|
|
131
|
-
let f = 0, z = 0, R = 0, M = [], X = 0, E = 0, r = -1, m = 0, W = null, k = !1, B = 0, w = 0, I = !1;
|
|
132
|
-
const Y = () => {
|
|
133
|
-
cancelAnimationFrame(W), W = null;
|
|
134
|
-
}, te = () => {
|
|
135
|
-
const t = r + E;
|
|
136
|
-
if (t >= i.length) {
|
|
137
|
-
const n = t - i.length, v = [
|
|
138
|
-
"splice",
|
|
139
|
-
[0, E],
|
|
140
|
-
[r],
|
|
141
|
-
[0, n]
|
|
142
|
-
];
|
|
143
|
-
c.value = v, n > i.length ? r = i.length : r = n;
|
|
144
|
-
} else {
|
|
145
|
-
const n = ["splice", [0, E], [r, t]];
|
|
146
|
-
c.value = n, r = t;
|
|
147
|
-
}
|
|
148
|
-
}, N = () => {
|
|
149
|
-
const t = Array.from(o.value.children);
|
|
150
|
-
M = (L.value === "up" ? t.slice(0, E) : t.slice(H.value.length - E, H.value.length)).map((v) => v.offsetHeight), X = M.reduce((v, l) => v + l, 0);
|
|
151
|
-
}, $ = (t, n) => {
|
|
152
|
-
if (Y(), !I)
|
|
153
|
-
return;
|
|
154
|
-
const v = () => {
|
|
155
|
-
const l = M[0];
|
|
156
|
-
let a = !1;
|
|
157
|
-
B >= l && (a = !0), a && (M.shift(), B = 0, z += 1), z === f && (R += 1, C("count", R), z = 0), e.singleLine && a ? (k = !0, setTimeout(() => {
|
|
158
|
-
k = !1, t || $(!1, e.step);
|
|
159
|
-
}, e.singleWaitTime)) : t || $(!1, e.step);
|
|
160
|
-
};
|
|
161
|
-
(y.value && !k || t) && (W = requestAnimationFrame(() => {
|
|
162
|
-
w += n, B += n, L.value === "up" ? u.value += n : u.value -= n, w > X ? (C("offset", E, i), te(), g(() => {
|
|
163
|
-
u.value = L.value === "up" ? 0 : P() - m, w = 0, N(), v();
|
|
164
|
-
})) : v();
|
|
165
|
-
}));
|
|
166
|
-
}, D = () => {
|
|
167
|
-
F.value = !0;
|
|
168
|
-
}, j = () => {
|
|
169
|
-
F.value = !1, e.hover && $(!1, e.step);
|
|
170
|
-
}, O = Ie(30, (t) => {
|
|
171
|
-
$(!0, 10);
|
|
172
|
-
}), Z = (t) => {
|
|
173
|
-
e.hover && e.wheel && (O(t), t.preventDefault(), t.stopPropagation());
|
|
174
|
-
}, H = ae(() => {
|
|
175
|
-
let t = [];
|
|
176
|
-
return c.value.length === 0 ? t = i.slice(0, s.value) : c.value[0] === "splice" ? (t = L.value === "up" ? H.value : H.value.reverse(), t.splice(...c.value[1]), c.value.slice(2).forEach((n) => {
|
|
177
|
-
t.push(...i.slice(...n));
|
|
178
|
-
})) : c.value.slice(1).forEach((n) => {
|
|
179
|
-
t.push(...i.slice(...n));
|
|
180
|
-
}), L.value !== "up" && t.reverse(), $e(t);
|
|
181
|
-
}), U = () => {
|
|
182
|
-
if (r = s.value + E, r >= i.length) {
|
|
183
|
-
const t = r - i.length, n = ["slice", [0, r], [0, t]];
|
|
184
|
-
return t > i.length ? r = i.length : r = t, n;
|
|
185
|
-
} else
|
|
186
|
-
return ["slice", [0, r]];
|
|
187
|
-
}, P = () => Array.from(o.value.children).map((t) => t.offsetHeight).reduce((t, n) => t + n, 0), T = (t) => {
|
|
188
|
-
e.visibleCount === void 0 ? (x.value = oe([e.list[0]]), g(() => {
|
|
189
|
-
s.value = Math.ceil(m / d.value.offsetHeight) + 2, x.value = i.slice(0, s.value), g(() => {
|
|
190
|
-
t();
|
|
191
|
-
});
|
|
192
|
-
})) : (x.value = i.slice(0, s.value), g(() => {
|
|
193
|
-
t();
|
|
194
|
-
}));
|
|
195
|
-
};
|
|
196
|
-
Ve(() => {
|
|
197
|
-
o.value && (o.value.parentElement.addEventListener("mouseenter", D), o.value.parentElement.addEventListener("mouseleave", j), o.value.parentElement.addEventListener("wheel", Z), m = o.value.parentElement.offsetHeight, e.list.length > 0 && T(() => {
|
|
198
|
-
d.value.offsetHeight > m ? (E = _(), c.value = U(), g(() => {
|
|
199
|
-
u.value = L.value === "up" ? 0 : P() - m, N(), I = !0, setTimeout(() => {
|
|
200
|
-
$(!1, e.step);
|
|
201
|
-
}, e.delay);
|
|
202
|
-
})) : A(), x.value = [];
|
|
203
|
-
})), f = i.length;
|
|
204
|
-
});
|
|
205
|
-
const A = () => {
|
|
206
|
-
z = 0, R = 0, I = !1, E = 0, c.value = [], g(() => {
|
|
207
|
-
u.value = L.value === "up" ? 0 : P() - m, w = 0, B = 0;
|
|
208
|
-
});
|
|
209
|
-
}, _ = () => {
|
|
210
|
-
let t = i.length - s.value;
|
|
211
|
-
return t = Math.max(1, t), t = Math.min(5, t), t;
|
|
212
|
-
};
|
|
213
|
-
return S({ add: (t, n, v) => {
|
|
214
|
-
if (n && n.length > 0) {
|
|
215
|
-
t > i.length && (t = i.length), t < 0 && (t = 0);
|
|
216
|
-
const l = [];
|
|
217
|
-
n.length === 1 && H.value.forEach((h, V) => {
|
|
218
|
-
h.index === t && l.push(V);
|
|
219
|
-
});
|
|
220
|
-
const a = [];
|
|
221
|
-
n.forEach((h) => {
|
|
222
|
-
a.push({
|
|
223
|
-
id: ee(),
|
|
224
|
-
data: h
|
|
225
|
-
});
|
|
226
|
-
}), i.splice(t, 0, ...a), i.forEach((h, V) => {
|
|
227
|
-
h.index = V;
|
|
228
|
-
});
|
|
229
|
-
const p = _();
|
|
230
|
-
if (I)
|
|
231
|
-
t < r && (r += 1, r > i.length && (r = 0)), n.length === 1 && l.length > 0 && l.forEach((h) => {
|
|
232
|
-
H.value[h] = a[0];
|
|
233
|
-
}), p !== E && (E = p);
|
|
234
|
-
else {
|
|
235
|
-
const h = () => {
|
|
236
|
-
d.value.offsetHeight > m ? (E = p, c.value = U(), g(() => {
|
|
237
|
-
u.value = L.value === "up" ? 0 : P() - m, w = 0, B = 0, N(), I = !0, $(!1, e.step);
|
|
238
|
-
})) : (e.visibleCount === void 0 && (s.value = 0), A()), x.value = [];
|
|
239
|
-
};
|
|
240
|
-
s.value === 0 && e.visibleCount === void 0 ? T(() => {
|
|
241
|
-
h();
|
|
242
|
-
}) : (x.value = i.slice(0, s.value), g(() => {
|
|
243
|
-
h();
|
|
244
|
-
}));
|
|
245
|
-
}
|
|
246
|
-
}
|
|
247
|
-
v && typeof v == "function" && v(i), f = i.length;
|
|
248
|
-
}, remove: (t, n = 1, v) => {
|
|
249
|
-
t >= 0 && t < i.length && (i.splice(t, n), I ? (x.value = i.slice(0, s.value), g(() => {
|
|
250
|
-
if (d.value.offsetHeight > m) {
|
|
251
|
-
const a = _();
|
|
252
|
-
a !== E && (E = a), c.value = U();
|
|
253
|
-
} else
|
|
254
|
-
A();
|
|
255
|
-
x.value = [];
|
|
256
|
-
})) : A()), v && typeof v == "function" && v(i), f = i.length;
|
|
257
|
-
}, update: (t, n, v) => {
|
|
258
|
-
if (t >= 0 && t < i.length) {
|
|
259
|
-
const l = [];
|
|
260
|
-
H.value.forEach((p, h) => {
|
|
261
|
-
p.index === t && l.push(h);
|
|
262
|
-
});
|
|
263
|
-
const a = {
|
|
264
|
-
id: ee(),
|
|
265
|
-
index: t,
|
|
266
|
-
data: n
|
|
267
|
-
};
|
|
268
|
-
i[t] = a, l.length > 0 && l.forEach((p) => {
|
|
269
|
-
H.value[p] = a;
|
|
270
|
-
});
|
|
271
|
-
}
|
|
272
|
-
v && typeof v == "function" && v(i);
|
|
273
|
-
}, reset: () => {
|
|
274
|
-
g(() => {
|
|
275
|
-
x.value = i.slice(0, s.value), g(() => {
|
|
276
|
-
d.value.offsetHeight > m ? c.value[0] === "splice" ? (te(), g(() => {
|
|
277
|
-
N();
|
|
278
|
-
})) : (c.value = U(), g(() => {
|
|
279
|
-
N();
|
|
280
|
-
})) : A();
|
|
281
|
-
});
|
|
282
|
-
});
|
|
283
|
-
} }), He(() => e.modelValue, (t) => {
|
|
284
|
-
t && $(!1, e.step);
|
|
285
|
-
}), Le(() => {
|
|
286
|
-
cancelAnimationFrame(W), o.value && (o.value.parentElement.removeEventListener("mouseenter", D), o.value.parentElement.removeEventListener("mouseleave", j), o.value.parentElement.removeEventListener("wheel", Z));
|
|
287
|
-
}), {
|
|
288
|
-
realWrapperRef: o,
|
|
289
|
-
visibleItems: H,
|
|
290
|
-
offset: u,
|
|
291
|
-
testList: x,
|
|
292
|
-
realWrapperHiddenRef: d
|
|
293
|
-
};
|
|
294
|
-
}
|
|
295
|
-
});
|
|
296
|
-
const qe = {
|
|
297
|
-
style: { position: "absolute !important", top: "-999999px !important" },
|
|
298
|
-
ref: "realWrapperHiddenRef"
|
|
299
|
-
};
|
|
300
|
-
function De(e, S, C, o, d, c) {
|
|
301
|
-
return J(), G(
|
|
302
|
-
K,
|
|
303
|
-
null,
|
|
304
|
-
[
|
|
305
|
-
ie(
|
|
306
|
-
"div",
|
|
307
|
-
{
|
|
308
|
-
class: "vue3-seamless-vertical-wrapper",
|
|
309
|
-
ref: "realWrapperRef",
|
|
310
|
-
style: ze({ transition: `transform ${e.ease}`, transform: `translateY(-${e.offset}px)` })
|
|
311
|
-
},
|
|
312
|
-
[
|
|
313
|
-
(J(!0), G(
|
|
314
|
-
K,
|
|
315
|
-
null,
|
|
316
|
-
ue(e.visibleItems, (u) => re(e.$slots, "default", {
|
|
317
|
-
key: u.id,
|
|
318
|
-
data: u.data,
|
|
319
|
-
index: u.index
|
|
320
|
-
})),
|
|
321
|
-
128
|
|
322
|
-
/* KEYED_FRAGMENT */
|
|
323
|
-
))
|
|
324
|
-
],
|
|
325
|
-
4
|
|
326
|
-
/* STYLE */
|
|
327
|
-
),
|
|
328
|
-
ie(
|
|
329
|
-
"div",
|
|
330
|
-
qe,
|
|
331
|
-
[
|
|
332
|
-
(J(!0), G(
|
|
333
|
-
K,
|
|
334
|
-
null,
|
|
335
|
-
ue(e.testList, (u) => re(e.$slots, "default", {
|
|
336
|
-
key: u.id,
|
|
337
|
-
data: u.data,
|
|
338
|
-
index: u.index
|
|
339
|
-
})),
|
|
340
|
-
128
|
|
341
|
-
/* KEYED_FRAGMENT */
|
|
342
|
-
))
|
|
343
|
-
],
|
|
344
|
-
512
|
|
345
|
-
/* NEED_PATCH */
|
|
346
|
-
)
|
|
347
|
-
],
|
|
348
|
-
64
|
|
349
|
-
/* STABLE_FRAGMENT */
|
|
350
|
-
);
|
|
351
|
-
}
|
|
352
|
-
function Ae(e, S) {
|
|
353
|
-
S === void 0 && (S = {});
|
|
354
|
-
var C = S.insertAt;
|
|
355
|
-
if (!(!e || typeof document > "u")) {
|
|
356
|
-
var o = document.head || document.getElementsByTagName("head")[0], d = document.createElement("style");
|
|
357
|
-
d.type = "text/css", C === "top" && o.firstChild ? o.insertBefore(d, o.firstChild) : o.appendChild(d), d.styleSheet ? d.styleSheet.cssText = e : d.appendChild(document.createTextNode(e));
|
|
358
|
-
}
|
|
359
|
-
}
|
|
360
|
-
var Oe = `
|
|
361
|
-
.vue3-seamless-vertical-wrapper[data-v-70134dc7] {\r
|
|
362
|
-
width: 100%;
|
|
363
|
-
}\r
|
|
364
|
-
`;
|
|
365
|
-
Ae(Oe);
|
|
366
|
-
we.render = De;
|
|
367
|
-
we.__scopeId = "data-v-70134dc7";
|
|
368
|
-
we.__file = "packages/VerticalScroll.vue";
|
|
369
|
-
var Fe = We({
|
|
370
|
-
name: "HorizontalScroll",
|
|
371
|
-
emits: ["offset", "count"],
|
|
372
|
-
inheritAttrs: !1,
|
|
373
|
-
props: {
|
|
374
|
-
// 是否开启自动滚动
|
|
375
|
-
modelValue: {
|
|
376
|
-
type: Boolean,
|
|
377
|
-
default: !0
|
|
378
|
-
},
|
|
379
|
-
list: {
|
|
380
|
-
type: Array,
|
|
381
|
-
required: !0
|
|
382
|
-
},
|
|
383
|
-
// 是否开启鼠标悬停
|
|
384
|
-
hover: {
|
|
385
|
-
type: Boolean,
|
|
386
|
-
default: !1
|
|
387
|
-
},
|
|
388
|
-
// 单步停止等待时间 (默认值 1000ms)
|
|
389
|
-
singleWaitTime: {
|
|
390
|
-
type: Number,
|
|
391
|
-
default: 1e3
|
|
392
|
-
},
|
|
393
|
-
// 开启鼠标悬停时支持滚轮滚动
|
|
394
|
-
wheel: {
|
|
395
|
-
type: Boolean,
|
|
396
|
-
default: !1
|
|
397
|
-
},
|
|
398
|
-
// 启用单行滚动
|
|
399
|
-
singleLine: {
|
|
400
|
-
type: Boolean,
|
|
401
|
-
default: !1
|
|
402
|
-
},
|
|
403
|
-
step: {
|
|
404
|
-
type: Number,
|
|
405
|
-
default: 0.5
|
|
406
|
-
},
|
|
407
|
-
visibleCount: {
|
|
408
|
-
type: Number
|
|
409
|
-
},
|
|
410
|
-
ease: {
|
|
411
|
-
type: String,
|
|
412
|
-
default: "cubic-bezier(0.03, 0.76, 1, 0.16)"
|
|
413
|
-
},
|
|
414
|
-
direction: {
|
|
415
|
-
type: String,
|
|
416
|
-
default: "left"
|
|
417
|
-
},
|
|
418
|
-
delay: {
|
|
419
|
-
type: Number,
|
|
420
|
-
default: 0
|
|
421
|
-
}
|
|
422
|
-
},
|
|
423
|
-
setup(e, { emit: S, expose: C }) {
|
|
424
|
-
const o = b(null), d = b(null), c = b([]), u = b(0), F = b(!1), L = b(e.direction), y = ae(() => e.hover ? !F.value && e.modelValue : e.modelValue), x = b([]), i = b(e.visibleCount === void 0 ? 0 : e.visibleCount), s = oe(e.list);
|
|
425
|
-
let f = 0, z = 0, R = 0, M = [], X = 0, E = 0, r = -1, m = 0, W = null, k = !1, B = 0, w = 0, I = !1;
|
|
426
|
-
const Y = () => {
|
|
427
|
-
cancelAnimationFrame(W), W = null;
|
|
428
|
-
}, te = () => {
|
|
429
|
-
const t = r + E;
|
|
430
|
-
if (t >= s.length) {
|
|
431
|
-
const n = t - s.length, v = [
|
|
432
|
-
"splice",
|
|
433
|
-
[0, E],
|
|
434
|
-
[r],
|
|
435
|
-
[0, n]
|
|
436
|
-
];
|
|
437
|
-
c.value = v, n > s.length ? r = s.length : r = n;
|
|
438
|
-
} else {
|
|
439
|
-
const n = ["splice", [0, E], [r, t]];
|
|
440
|
-
c.value = n, r = t;
|
|
441
|
-
}
|
|
442
|
-
}, N = () => {
|
|
443
|
-
const t = Array.from(o.value.children);
|
|
444
|
-
M = (L.value === "left" ? t.slice(0, E) : t.slice(H.value.length - E, H.value.length)).map((v) => v.offsetWidth), X = M.reduce((v, l) => v + l, 0);
|
|
445
|
-
}, $ = (t, n) => {
|
|
446
|
-
if (Y(), !I)
|
|
447
|
-
return;
|
|
448
|
-
const v = () => {
|
|
449
|
-
const l = M[0];
|
|
450
|
-
let a = !1;
|
|
451
|
-
B >= l && (a = !0), a && (M.shift(), B = 0, z += 1), z === f && (R += 1, S("count", R), z = 0), e.singleLine && a ? (k = !0, setTimeout(() => {
|
|
452
|
-
k = !1, t || $(!1, e.step);
|
|
453
|
-
}, e.singleWaitTime)) : t || $(!1, e.step);
|
|
454
|
-
};
|
|
455
|
-
(y.value && !k || t) && (W = requestAnimationFrame(() => {
|
|
456
|
-
w += n, B += n, e ? u.value += n : u.value -= n, w > X ? (S("offset", E, s), te(), g(() => {
|
|
457
|
-
u.value = L.value === "left" ? 0 : P() - m, w = 0, N(), v();
|
|
458
|
-
})) : v();
|
|
459
|
-
}));
|
|
460
|
-
}, D = () => {
|
|
461
|
-
F.value = !0;
|
|
462
|
-
}, j = () => {
|
|
463
|
-
F.value = !1, e.hover && $(!1, e.step);
|
|
464
|
-
}, O = Ie(30, (t) => {
|
|
465
|
-
$(!0, 10);
|
|
466
|
-
}), Z = (t) => {
|
|
467
|
-
e.hover && e.wheel && (O(t), t.preventDefault(), t.stopPropagation());
|
|
468
|
-
}, H = ae(() => {
|
|
469
|
-
let t = [];
|
|
470
|
-
return c.value.length === 0 ? t = s.slice(0, i.value) : c.value[0] === "splice" ? (t = L.value === "left" ? H.value : H.value.reverse(), t.splice(...c.value[1]), c.value.slice(2).forEach((n) => {
|
|
471
|
-
t.push(...s.slice(...n));
|
|
472
|
-
})) : c.value.slice(1).forEach((n) => {
|
|
473
|
-
t.push(...s.slice(...n));
|
|
474
|
-
}), L.value !== "left" && t.reverse(), $e(t);
|
|
475
|
-
}), U = () => {
|
|
476
|
-
if (r = i.value + E, r >= s.length) {
|
|
477
|
-
const t = r - s.length, n = ["slice", [0, r], [0, t]];
|
|
478
|
-
return t > s.length ? r = s.length : r = t, n;
|
|
479
|
-
} else
|
|
480
|
-
return ["slice", [0, r]];
|
|
481
|
-
}, P = () => Array.from(o.value.children).map((t) => t.offsetWidth).reduce((t, n) => t + n, 0), T = (t) => {
|
|
482
|
-
e.visibleCount === void 0 ? (x.value = oe([e.list[0]]), g(() => {
|
|
483
|
-
i.value = Math.ceil(m / d.value.offsetWidth) + 2, x.value = s.slice(0, i.value), g(() => {
|
|
484
|
-
t();
|
|
485
|
-
});
|
|
486
|
-
})) : (x.value = s.slice(0, i.value), g(() => {
|
|
487
|
-
t();
|
|
488
|
-
}));
|
|
489
|
-
};
|
|
490
|
-
Ve(() => {
|
|
491
|
-
o.value && (o.value.parentElement.addEventListener("mouseenter", D), o.value.parentElement.addEventListener("mouseleave", j), o.value.parentElement.addEventListener("wheel", Z), m = o.value.parentElement.offsetWidth, e.list.length > 0 && T(() => {
|
|
492
|
-
d.value.offsetWidth > m ? (E = _(), c.value = U(), g(() => {
|
|
493
|
-
u.value = L.value === "left" ? 0 : P() - m, N(), I = !0, setTimeout(() => {
|
|
494
|
-
$(!1, e.step);
|
|
495
|
-
}, e.delay);
|
|
496
|
-
})) : A(), x.value = [];
|
|
497
|
-
})), f = s.length;
|
|
498
|
-
});
|
|
499
|
-
const A = () => {
|
|
500
|
-
z = 0, R = 0, I = !1, E = 0, c.value = [], g(() => {
|
|
501
|
-
u.value = L.value === "left" ? 0 : P() - m, w = 0, B = 0;
|
|
502
|
-
});
|
|
503
|
-
}, _ = () => {
|
|
504
|
-
let t = s.length - i.value;
|
|
505
|
-
return t = Math.max(1, t), t = Math.min(5, t), t;
|
|
506
|
-
};
|
|
507
|
-
return C({ add: (t, n, v) => {
|
|
508
|
-
if (n && n.length > 0) {
|
|
509
|
-
t > s.length && (t = s.length), t < 0 && (t = 0);
|
|
510
|
-
const l = [];
|
|
511
|
-
n.length === 1 && H.value.forEach((h, V) => {
|
|
512
|
-
h.index === t && l.push(V);
|
|
513
|
-
});
|
|
514
|
-
const a = [];
|
|
515
|
-
n.forEach((h) => {
|
|
516
|
-
a.push({
|
|
517
|
-
id: ee(),
|
|
518
|
-
data: h
|
|
519
|
-
});
|
|
520
|
-
}), s.splice(t, 0, ...a), s.forEach((h, V) => {
|
|
521
|
-
h.index = V;
|
|
522
|
-
});
|
|
523
|
-
const p = _();
|
|
524
|
-
if (I)
|
|
525
|
-
t < r && (r += 1, r > s.length && (r = 0)), n.length === 1 && l.forEach((h) => {
|
|
526
|
-
H.value[h] = a[0];
|
|
527
|
-
}), p !== E && (E = p);
|
|
528
|
-
else {
|
|
529
|
-
const h = () => {
|
|
530
|
-
d.value.offsetWidth > m ? (E = p, c.value = U(), g(() => {
|
|
531
|
-
u.value = L.value === "left" ? 0 : P() - m, w = 0, B = 0, N(), I = !0, $(!1, e.step);
|
|
532
|
-
})) : (e.visibleCount === void 0 && (i.value = 0), A()), x.value = [];
|
|
533
|
-
};
|
|
534
|
-
i.value === 0 && e.visibleCount === void 0 ? T(() => {
|
|
535
|
-
h();
|
|
536
|
-
}) : (x.value = s.slice(0, i.value), g(() => {
|
|
537
|
-
h();
|
|
538
|
-
}));
|
|
539
|
-
}
|
|
540
|
-
}
|
|
541
|
-
v && typeof v == "function" && v(s), f = s.length;
|
|
542
|
-
}, remove: (t, n = 1, v) => {
|
|
543
|
-
t >= 0 && t < s.length && (s.splice(t, n), I ? (x.value = s.slice(0, i.value), g(() => {
|
|
544
|
-
if (d.value.offsetWidth > m) {
|
|
545
|
-
const a = _();
|
|
546
|
-
a !== E && (E = a), c.value = U();
|
|
547
|
-
} else
|
|
548
|
-
A();
|
|
549
|
-
x.value = [];
|
|
550
|
-
})) : A()), v && typeof v == "function" && v(s), f = s.length;
|
|
551
|
-
}, update: (t, n, v) => {
|
|
552
|
-
if (t >= 0 && t < s.length) {
|
|
553
|
-
const l = [];
|
|
554
|
-
H.value.forEach((p, h) => {
|
|
555
|
-
p.index === t && l.push(h);
|
|
556
|
-
});
|
|
557
|
-
const a = {
|
|
558
|
-
id: ee(),
|
|
559
|
-
index: t,
|
|
560
|
-
data: n
|
|
561
|
-
};
|
|
562
|
-
s[t] = a, l.length > 0 && l.forEach((p) => {
|
|
563
|
-
H[p] = a;
|
|
564
|
-
});
|
|
565
|
-
}
|
|
566
|
-
v && typeof v == "function" && v(s);
|
|
567
|
-
}, reset: () => {
|
|
568
|
-
g(() => {
|
|
569
|
-
x.value = s.slice(0, i.value), g(() => {
|
|
570
|
-
d.value.offsetWidth > m ? c.value[0] === "splice" ? (te(), g(() => {
|
|
571
|
-
N();
|
|
572
|
-
})) : (c.value = U(), g(() => {
|
|
573
|
-
N();
|
|
574
|
-
})) : A();
|
|
575
|
-
});
|
|
576
|
-
});
|
|
577
|
-
} }), He(() => e.modelValue, (t) => {
|
|
578
|
-
t && $(!1, e.step);
|
|
579
|
-
}), Le(() => {
|
|
580
|
-
cancelAnimationFrame(W), o.value && (o.value.parentElement.removeEventListener("mouseenter", D), o.value.parentElement.removeEventListener("mouseleave", j), o.value.parentElement.removeEventListener("wheel", Z));
|
|
581
|
-
}), {
|
|
582
|
-
visibleItems: H,
|
|
583
|
-
offset: u,
|
|
584
|
-
testList: x,
|
|
585
|
-
realWrapperRef: o,
|
|
586
|
-
realWrapperHiddenRef: d
|
|
587
|
-
};
|
|
588
|
-
}
|
|
589
|
-
});
|
|
590
|
-
function Ue(e, S, C, o, d, c) {
|
|
591
|
-
return J(), G(
|
|
592
|
-
K,
|
|
593
|
-
null,
|
|
594
|
-
[
|
|
595
|
-
ie(
|
|
596
|
-
"div",
|
|
597
|
-
ve({
|
|
598
|
-
class: "vue3-seamless-horizontal-wrapper",
|
|
599
|
-
ref: "realWrapperRef",
|
|
600
|
-
style: { transition: `transform ${e.ease}`, transform: `translateX(-${e.offset}px)` }
|
|
601
|
-
}, e.$attrs),
|
|
602
|
-
[
|
|
603
|
-
(J(!0), G(
|
|
604
|
-
K,
|
|
605
|
-
null,
|
|
606
|
-
ue(e.visibleItems, (u) => re(e.$slots, "default", {
|
|
607
|
-
key: u.id,
|
|
608
|
-
data: u.data,
|
|
609
|
-
index: u.index,
|
|
610
|
-
style: "color: brown;"
|
|
611
|
-
})),
|
|
612
|
-
128
|
|
613
|
-
/* KEYED_FRAGMENT */
|
|
614
|
-
))
|
|
615
|
-
],
|
|
616
|
-
16
|
|
617
|
-
/* FULL_PROPS */
|
|
618
|
-
),
|
|
619
|
-
ie(
|
|
620
|
-
"div",
|
|
621
|
-
ve({
|
|
622
|
-
style: { position: "absolute !important", top: "-999999px !important" },
|
|
623
|
-
ref: "realWrapperHiddenRef"
|
|
624
|
-
}, e.$attrs),
|
|
625
|
-
[
|
|
626
|
-
(J(!0), G(
|
|
627
|
-
K,
|
|
628
|
-
null,
|
|
629
|
-
ue(e.testList, (u) => re(e.$slots, "default", {
|
|
630
|
-
key: u.id,
|
|
631
|
-
data: u.data,
|
|
632
|
-
index: u.index
|
|
633
|
-
})),
|
|
634
|
-
128
|
|
635
|
-
/* KEYED_FRAGMENT */
|
|
636
|
-
))
|
|
637
|
-
],
|
|
638
|
-
16
|
|
639
|
-
/* FULL_PROPS */
|
|
640
|
-
)
|
|
641
|
-
],
|
|
642
|
-
64
|
|
643
|
-
/* STABLE_FRAGMENT */
|
|
644
|
-
);
|
|
645
|
-
}
|
|
646
|
-
var Xe = `
|
|
647
|
-
.vue3-seamless-horizontal-wrapper[data-v-530d6df5] {
|
|
648
|
-
height: 100%;
|
|
649
|
-
}
|
|
650
|
-
`;
|
|
651
|
-
Ae(Xe);
|
|
652
|
-
Fe.render = Ue;
|
|
653
|
-
Fe.__scopeId = "data-v-530d6df5";
|
|
654
|
-
Fe.__file = "packages/HorizontalScroll.vue";
|
|
655
|
-
var de = We({
|
|
656
|
-
name: "Vue3SeamlessScroll",
|
|
657
|
-
emits: ["offset", "count"],
|
|
658
|
-
inheritAttrs: !1,
|
|
659
|
-
props: {
|
|
660
|
-
// 是否开启自动滚动
|
|
661
|
-
modelValue: {
|
|
662
|
-
type: Boolean,
|
|
663
|
-
default: !0
|
|
664
|
-
},
|
|
665
|
-
list: {
|
|
666
|
-
type: Array,
|
|
667
|
-
required: !0
|
|
668
|
-
},
|
|
669
|
-
// 是否开启鼠标悬停
|
|
670
|
-
hover: {
|
|
671
|
-
type: Boolean,
|
|
672
|
-
default: !1
|
|
673
|
-
},
|
|
674
|
-
// 单步停止等待时间 (默认值 1000ms)
|
|
675
|
-
singleWaitTime: {
|
|
676
|
-
type: Number,
|
|
677
|
-
default: 1e3
|
|
678
|
-
},
|
|
679
|
-
// 开启鼠标悬停时支持滚轮滚动
|
|
680
|
-
wheel: {
|
|
681
|
-
type: Boolean,
|
|
682
|
-
default: !1
|
|
683
|
-
},
|
|
684
|
-
// 启用单行滚动
|
|
685
|
-
singleLine: {
|
|
686
|
-
type: Boolean,
|
|
687
|
-
default: !1
|
|
688
|
-
},
|
|
689
|
-
step: {
|
|
690
|
-
type: Number,
|
|
691
|
-
default: 0.5
|
|
692
|
-
},
|
|
693
|
-
visibleCount: {
|
|
694
|
-
type: Number
|
|
695
|
-
},
|
|
696
|
-
ease: {
|
|
697
|
-
type: String,
|
|
698
|
-
default: "cubic-bezier(0.03, 0.76, 1, 0.16)"
|
|
699
|
-
},
|
|
700
|
-
// up,down,left,right
|
|
701
|
-
direction: {
|
|
702
|
-
type: String,
|
|
703
|
-
default: "up"
|
|
704
|
-
},
|
|
705
|
-
delay: {
|
|
706
|
-
type: Number,
|
|
707
|
-
default: 0
|
|
708
|
-
}
|
|
709
|
-
},
|
|
710
|
-
setup(e, { expose: S, emit: C }) {
|
|
711
|
-
const o = b(null), d = b(null), c = b(null), u = b([]), F = b(0), L = b(!1), y = b(e.direction), x = ae(() => e.hover ? !L.value && e.modelValue : e.modelValue), i = b([]), s = b(e.visibleCount === void 0 ? 0 : e.visibleCount), f = oe(e.list);
|
|
712
|
-
let z = 0, R = 0, M = 0, X = [], E = 0, r = 0, m = -1, W = 0, k = null, B = !1, w = 0, I = 0, Y = !1;
|
|
713
|
-
const te = ae(() => y.value === "up" || y.value === "down" ? `translateY(-${F.value}px)` : `translateX(-${F.value}px)`), N = () => {
|
|
714
|
-
cancelAnimationFrame(k), k = null;
|
|
715
|
-
}, $ = () => {
|
|
716
|
-
const l = m + r;
|
|
717
|
-
if (l >= f.length) {
|
|
718
|
-
const a = l - f.length, p = [
|
|
719
|
-
"splice",
|
|
720
|
-
[0, r],
|
|
721
|
-
[m],
|
|
722
|
-
[0, a]
|
|
723
|
-
];
|
|
724
|
-
u.value = p, a > f.length ? m = f.length : m = a;
|
|
725
|
-
} else {
|
|
726
|
-
const a = ["splice", [0, r], [m, l]];
|
|
727
|
-
u.value = a, m = l;
|
|
728
|
-
}
|
|
729
|
-
}, D = () => {
|
|
730
|
-
const l = Array.from(d.value.children);
|
|
731
|
-
X = (y.value === "up" || y.value === "left" ? l.slice(0, r) : l.slice(T.value.length - r, T.value.length)).map((p) => y.value === "left" || y.value === "right" ? p.offsetWidth : p.offsetHeight), E = X.reduce((p, h) => p + h, 0);
|
|
732
|
-
}, j = () => {
|
|
733
|
-
y.value === "up" || y.value === "left" ? F.value = 0 : F.value = _() - W;
|
|
734
|
-
}, O = (l, a) => {
|
|
735
|
-
if (N(), !Y)
|
|
736
|
-
return;
|
|
737
|
-
const p = () => {
|
|
738
|
-
const h = X[0];
|
|
739
|
-
let V = !1;
|
|
740
|
-
w >= h && (V = !0), V && (X.shift(), w = 0, R += 1), R === z && (M += 1, C("count", M), R = 0), e.singleLine && V ? (B = !0, setTimeout(() => {
|
|
741
|
-
B = !1, l || O(!1, e.step);
|
|
742
|
-
}, e.singleWaitTime)) : l || O(!1, e.step);
|
|
743
|
-
};
|
|
744
|
-
(x.value && !B || l) && (k = requestAnimationFrame(() => {
|
|
745
|
-
I += a, w += a, y.value === "up" || y.value === "left" ? F.value += a : F.value -= a, I > E ? (C("offset", r, f), $(), g(() => {
|
|
746
|
-
j(), I = 0, D(), p();
|
|
747
|
-
})) : p();
|
|
748
|
-
}));
|
|
749
|
-
}, Z = () => {
|
|
750
|
-
L.value = !0;
|
|
751
|
-
}, H = () => {
|
|
752
|
-
L.value = !1, e.hover && O(!1, e.step);
|
|
753
|
-
}, U = Ie(30, (l) => {
|
|
754
|
-
O(!0, 10);
|
|
755
|
-
}), P = (l) => {
|
|
756
|
-
e.hover && e.wheel && (U(l), l.preventDefault(), l.stopPropagation());
|
|
757
|
-
}, T = ae(() => {
|
|
758
|
-
let l = [];
|
|
759
|
-
return u.value.length === 0 ? l = f.slice(0, s.value) : u.value[0] === "splice" ? (l = y.value === "up" || y.value === "left" ? T.value : T.value.reverse(), l.splice(...u.value[1]), u.value.slice(2).forEach((a) => {
|
|
760
|
-
l.push(...f.slice(...a));
|
|
761
|
-
})) : u.value.slice(1).forEach((a) => {
|
|
762
|
-
l.push(...f.slice(...a));
|
|
763
|
-
}), y.value === "up" || y.value === "left" || l.reverse(), $e(l);
|
|
764
|
-
}), A = () => {
|
|
765
|
-
if (m = s.value + r, m >= f.length) {
|
|
766
|
-
const l = m - f.length, a = ["slice", [0, m], [0, l]];
|
|
767
|
-
return l > f.length ? m = f.length : m = l, a;
|
|
768
|
-
} else
|
|
769
|
-
return ["slice", [0, m]];
|
|
770
|
-
}, _ = () => Array.from(d.value.children).map((a) => y.value === "left" || y.value === "right" ? a.offsetWidth : a.offsetHeight).reduce((a, p) => a + p, 0), ce = (l) => {
|
|
771
|
-
e.visibleCount === void 0 ? (i.value = oe([e.list[0]]), g(() => {
|
|
772
|
-
y.value === "left" || y.value === "right" ? s.value = Math.ceil(W / c.value.offsetWidth) + 2 : s.value = Math.ceil(W / c.value.offsetHeight) + 2, i.value = f.slice(0, s.value), g(() => {
|
|
773
|
-
l();
|
|
774
|
-
});
|
|
775
|
-
})) : (i.value = f.slice(0, s.value), g(() => {
|
|
776
|
-
l();
|
|
777
|
-
}));
|
|
778
|
-
};
|
|
779
|
-
Ve(() => {
|
|
780
|
-
d.value && (d.value.parentElement.addEventListener("mouseenter", Z), d.value.parentElement.addEventListener("mouseleave", H), d.value.parentElement.addEventListener("wheel", P), W = d.value.parentElement.offsetHeight, (y.value === "left" || y.value === "right") && (W = d.value.parentElement.offsetWidth), ce(() => {
|
|
781
|
-
let l = c.value.offsetHeight > W;
|
|
782
|
-
(y.value === "left" || y.value === "right") && (l = c.value.offsetWidth > W), l ? (r = fe(), u.value = A(), g(() => {
|
|
783
|
-
j(), D(), Y = !0, setTimeout(() => {
|
|
784
|
-
O(!1, e.step);
|
|
785
|
-
}, e.delay);
|
|
786
|
-
})) : le(), i.value = [];
|
|
787
|
-
})), z = f.length;
|
|
788
|
-
});
|
|
789
|
-
const le = () => {
|
|
790
|
-
R = 0, M = 0, Y = !1, r = 0, u.value = [], g(() => {
|
|
791
|
-
j(), I = 0, w = 0;
|
|
792
|
-
});
|
|
793
|
-
}, fe = () => {
|
|
794
|
-
let l = f.length - s.value;
|
|
795
|
-
return l = Math.max(1, l), l = Math.min(5, l), l;
|
|
796
|
-
};
|
|
797
|
-
return S({ add: (l, a, p) => {
|
|
798
|
-
if (a && a.length > 0) {
|
|
799
|
-
l > f.length && (l = f.length), l < 0 && (l = 0);
|
|
800
|
-
const h = [];
|
|
801
|
-
a.length === 1 && T.value.forEach((q, se) => {
|
|
802
|
-
q.index === l && h.push(se);
|
|
803
|
-
});
|
|
804
|
-
const V = [];
|
|
805
|
-
a.forEach((q) => {
|
|
806
|
-
V.push({
|
|
807
|
-
id: ee(),
|
|
808
|
-
data: q
|
|
809
|
-
});
|
|
810
|
-
}), f.splice(l, 0, ...V), f.forEach((q, se) => {
|
|
811
|
-
q.index = se;
|
|
812
|
-
});
|
|
813
|
-
const ne = fe();
|
|
814
|
-
if (Y)
|
|
815
|
-
l < m && (m += 1, m > f.length && (m = 0)), a.length === 1 && h.length > 0 && h.forEach((q) => {
|
|
816
|
-
T[q] = V[0];
|
|
817
|
-
}), ne !== r && (r = ne);
|
|
818
|
-
else {
|
|
819
|
-
const q = () => {
|
|
820
|
-
let se = c.value.offsetHeight > W;
|
|
821
|
-
(y.value === "left" || y.value === "right") && (se = c.value.offsetWidth > W), se ? (r = ne, u.value = A(), g(() => {
|
|
822
|
-
j(), I = 0, w = 0, D(), Y = !0, O(!1, e.step);
|
|
823
|
-
})) : (e.visibleCount === void 0 && (s.value = 0), le()), i.value = [];
|
|
824
|
-
};
|
|
825
|
-
s.value === 0 && e.visibleCount === void 0 ? ce(() => {
|
|
826
|
-
q();
|
|
827
|
-
}) : (i.value = f.slice(0, s.value), g(() => {
|
|
828
|
-
q();
|
|
829
|
-
}));
|
|
830
|
-
}
|
|
831
|
-
}
|
|
832
|
-
p && typeof p == "function" && p(f), z = f.length;
|
|
833
|
-
}, remove: (l, a = 1, p) => {
|
|
834
|
-
l >= 0 && l < f.length && (f.splice(l, a), Y ? (i.value = f.slice(0, s.value), g(() => {
|
|
835
|
-
let h = c.value.offsetHeight > W;
|
|
836
|
-
if ((y.value === "left" || y.value === "right") && (h = c.value.offsetWidth > W), h) {
|
|
837
|
-
const V = fe();
|
|
838
|
-
V !== r && (r = V), u.value = A();
|
|
839
|
-
} else
|
|
840
|
-
le();
|
|
841
|
-
i.value = [];
|
|
842
|
-
})) : le()), p && typeof p == "function" && p(f), z = f.length;
|
|
843
|
-
}, update: (l, a, p) => {
|
|
844
|
-
if (l >= 0 && l < f.length) {
|
|
845
|
-
const h = [];
|
|
846
|
-
T.value.forEach((ne, q) => {
|
|
847
|
-
ne.index === l && h.push(q);
|
|
848
|
-
});
|
|
849
|
-
const V = {
|
|
850
|
-
id: ee(),
|
|
851
|
-
index: l,
|
|
852
|
-
data: a
|
|
853
|
-
};
|
|
854
|
-
f[l] = V, h.length > 0 && h.forEach((ne) => {
|
|
855
|
-
T[ne] = V;
|
|
856
|
-
});
|
|
857
|
-
}
|
|
858
|
-
p && typeof p == "function" && p(f);
|
|
859
|
-
}, reset: () => {
|
|
860
|
-
g(() => {
|
|
861
|
-
i.value = f.slice(0, s.value), g(() => {
|
|
862
|
-
let l = c.value.offsetHeight > W;
|
|
863
|
-
(y.value === "left" || y.value === "right") && (l = c.value.offsetWidth > W), l ? u.value[0] === "splice" ? ($(), g(() => {
|
|
864
|
-
D();
|
|
865
|
-
})) : (u.value = A(), g(() => {
|
|
866
|
-
D();
|
|
867
|
-
})) : le();
|
|
868
|
-
});
|
|
869
|
-
});
|
|
870
|
-
} }), He(() => e.modelValue, (l) => {
|
|
871
|
-
l && O(!1, e.step);
|
|
872
|
-
}), Le(() => {
|
|
873
|
-
cancelAnimationFrame(k), d.value && (d.value.parentElement.removeEventListener("mouseenter", Z), d.value.parentElement.removeEventListener("mouseleave", H), d.value.parentElement.removeEventListener("wheel", P));
|
|
874
|
-
}), {
|
|
875
|
-
realBoxRef: o,
|
|
876
|
-
realWrapperRef: d,
|
|
877
|
-
visibleItems: T,
|
|
878
|
-
offset: F,
|
|
879
|
-
testList: i,
|
|
880
|
-
realWrapperHiddenRef: c,
|
|
881
|
-
transform: te
|
|
882
|
-
};
|
|
883
|
-
}
|
|
884
|
-
});
|
|
885
|
-
function Ye(e, S, C, o, d, c) {
|
|
886
|
-
return J(), G(
|
|
887
|
-
K,
|
|
888
|
-
null,
|
|
889
|
-
[
|
|
890
|
-
ie(
|
|
891
|
-
"div",
|
|
892
|
-
ve({
|
|
893
|
-
class: "vue3-seamless-wrapper",
|
|
894
|
-
ref: "realWrapperRef",
|
|
895
|
-
style: { transition: `transform ${e.ease}`, transform: e.transform }
|
|
896
|
-
}, e.$attrs),
|
|
897
|
-
[
|
|
898
|
-
(J(!0), G(
|
|
899
|
-
K,
|
|
900
|
-
null,
|
|
901
|
-
ue(e.visibleItems, (u) => re(e.$slots, "default", {
|
|
902
|
-
key: u.id,
|
|
903
|
-
data: u.data,
|
|
904
|
-
index: u.index
|
|
905
|
-
})),
|
|
906
|
-
128
|
|
907
|
-
/* KEYED_FRAGMENT */
|
|
908
|
-
))
|
|
909
|
-
],
|
|
910
|
-
16
|
|
911
|
-
/* FULL_PROPS */
|
|
912
|
-
),
|
|
913
|
-
ie(
|
|
914
|
-
"div",
|
|
915
|
-
ve({
|
|
916
|
-
style: { position: "absolute !important", left: "-999999px !important" },
|
|
917
|
-
ref: "realWrapperHiddenRef"
|
|
918
|
-
}, e.$attrs),
|
|
919
|
-
[
|
|
920
|
-
(J(!0), G(
|
|
921
|
-
K,
|
|
922
|
-
null,
|
|
923
|
-
ue(e.testList, (u) => re(e.$slots, "default", {
|
|
924
|
-
key: u.id,
|
|
925
|
-
data: u.data,
|
|
926
|
-
index: u.index
|
|
927
|
-
})),
|
|
928
|
-
128
|
|
929
|
-
/* KEYED_FRAGMENT */
|
|
930
|
-
))
|
|
931
|
-
],
|
|
932
|
-
16
|
|
933
|
-
/* FULL_PROPS */
|
|
934
|
-
)
|
|
935
|
-
],
|
|
936
|
-
64
|
|
937
|
-
/* STABLE_FRAGMENT */
|
|
938
|
-
);
|
|
939
|
-
}
|
|
940
|
-
var je = `
|
|
941
|
-
.vue3-seamless-wrapper[data-v-b156a416] {\r
|
|
942
|
-
width: 100%;\r
|
|
943
|
-
height: 100%;
|
|
944
|
-
}\r
|
|
945
|
-
`;
|
|
946
|
-
Ae(je);
|
|
947
|
-
de.render = Ye;
|
|
948
|
-
de.__scopeId = "data-v-b156a416";
|
|
949
|
-
de.__file = "packages/Vue3SeamlessScroll.vue";
|
|
950
|
-
const xe = Me(), _e = [he, me, pe, ge, ye, Ee, Se, Ce, be], it = (e) => {
|
|
951
|
-
_e.forEach((S) => {
|
|
952
|
-
e.use(S);
|
|
953
|
-
}), e.use(Te), e.component("vue3-seamless-scroll", de), e.config.globalProperties.$router = Te;
|
|
954
|
-
}, Ge = (e) => {
|
|
955
|
-
switch (e) {
|
|
46
|
+
const f = C(), d = [n, s, r, m, i, c, a, l, p], V = (t) => {
|
|
47
|
+
d.forEach((e) => {
|
|
48
|
+
t.use(e);
|
|
49
|
+
}), t.use(u), t.config.globalProperties.$router = u;
|
|
50
|
+
}, b = (t) => {
|
|
51
|
+
switch (t) {
|
|
956
52
|
case "browser":
|
|
957
|
-
return
|
|
53
|
+
return P;
|
|
958
54
|
case "client":
|
|
959
|
-
return
|
|
55
|
+
return T;
|
|
960
56
|
case "three":
|
|
961
|
-
return
|
|
57
|
+
return g;
|
|
962
58
|
}
|
|
963
|
-
},
|
|
964
|
-
const
|
|
965
|
-
|
|
966
|
-
|
|
59
|
+
}, v = (t) => {
|
|
60
|
+
const e = document.documentElement;
|
|
61
|
+
t == null || t.forEach((h) => {
|
|
62
|
+
e.style.setProperty(h.name, h.value);
|
|
967
63
|
});
|
|
968
|
-
},
|
|
969
|
-
|
|
970
|
-
const
|
|
971
|
-
|
|
972
|
-
},
|
|
64
|
+
}, w = (t) => {
|
|
65
|
+
f.setPlatform(t);
|
|
66
|
+
const e = b(t);
|
|
67
|
+
v(e);
|
|
68
|
+
}, q = { getPlatform: f.getPlatform, setPlatform: f.setPlatform, initPlatform: w };
|
|
973
69
|
export {
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
70
|
+
j as SvgIcon,
|
|
71
|
+
V as default,
|
|
72
|
+
q as platformApi,
|
|
73
|
+
u as router
|
|
978
74
|
};
|