y-design-ssr 0.2.2 → 0.2.4
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/button/index.css +1 -579
- package/libs/button/index.mjs +66 -111
- package/libs/button/index.umd.js +2 -203
- package/libs/button/package.json +5 -0
- package/libs/cell/index.css +1 -1077
- package/libs/cell/index.mjs +104 -167
- package/libs/cell/index.umd.js +2 -300
- package/libs/cell/package.json +5 -0
- package/libs/checkbox/index.css +1 -1053
- package/libs/checkbox/index.mjs +127 -242
- package/libs/checkbox/index.umd.js +2 -369
- package/libs/checkbox/package.json +5 -0
- package/libs/checkboxGroup/index.css +1 -422
- package/libs/checkboxGroup/index.mjs +87 -173
- package/libs/checkboxGroup/index.umd.js +2 -265
- package/libs/checkboxGroup/package.json +5 -0
- package/libs/col/index.css +1 -615
- package/libs/col/index.mjs +81 -246
- package/libs/col/index.umd.js +2 -305
- package/libs/col/package.json +5 -0
- package/libs/countdown/index.css +1 -417
- package/libs/countdown/index.mjs +71 -179
- package/libs/countdown/index.umd.js +2 -231
- package/libs/countdown/package.json +5 -0
- package/libs/dialog/index.css +1 -1405
- package/libs/dialog/index.mjs +476 -646
- package/libs/dialog/index.umd.js +2 -1128
- package/libs/dialog/package.json +5 -0
- package/libs/empty/index.css +1 -457
- package/libs/empty/index.mjs +44 -91
- package/libs/empty/index.umd.js +2 -139
- package/libs/empty/package.json +5 -0
- package/libs/form/index.css +1 -477
- package/libs/form/index.mjs +126 -226
- package/libs/form/index.umd.js +2 -319
- package/libs/form/package.json +5 -0
- package/libs/formItem/index.css +1 -477
- package/libs/formItem/index.mjs +126 -276
- package/libs/formItem/index.umd.js +2 -372
- package/libs/formItem/package.json +5 -0
- package/libs/icon/index.css +1 -982
- package/libs/icon/index.mjs +58 -107
- package/libs/icon/index.umd.js +2 -186
- package/libs/icon/package.json +5 -0
- package/libs/index.css +1 -2902
- package/libs/index.mjs +2348 -3789
- package/libs/index.umd.js +2 -5509
- package/libs/input/index.css +1 -483
- package/libs/input/index.mjs +92 -183
- package/libs/input/index.umd.js +2 -274
- package/libs/input/package.json +5 -0
- package/libs/layout/index.css +1 -684
- package/libs/layout/index.mjs +130 -230
- package/libs/layout/index.umd.js +2 -318
- package/libs/layout/package.json +5 -0
- package/libs/list/index.css +1 -440
- package/libs/list/index.mjs +207 -388
- package/libs/list/index.umd.js +2 -571
- package/libs/list/package.json +5 -0
- package/libs/loading/index.css +1 -548
- package/libs/loading/index.mjs +118 -196
- package/libs/loading/index.umd.js +2 -321
- package/libs/loading/package.json +5 -0
- package/libs/mask/index.css +1 -426
- package/libs/mask/index.mjs +70 -131
- package/libs/mask/index.umd.js +2 -201
- package/libs/mask/package.json +5 -0
- package/libs/popup/index.css +1 -465
- package/libs/popup/index.mjs +134 -210
- package/libs/popup/index.umd.js +2 -358
- package/libs/popup/package.json +5 -0
- package/libs/progress/index.css +1 -488
- package/libs/progress/index.mjs +128 -200
- package/libs/progress/index.umd.js +2 -322
- package/libs/progress/package.json +5 -0
- package/libs/pullrefresh/index.css +1 -441
- package/libs/pullrefresh/index.mjs +111 -241
- package/libs/pullrefresh/index.umd.js +2 -302
- package/libs/pullrefresh/package.json +5 -0
- package/libs/row/index.css +1 -485
- package/libs/row/index.mjs +89 -181
- package/libs/row/index.umd.js +2 -237
- package/libs/row/package.json +5 -0
- package/libs/slider/index.css +1 -558
- package/libs/slider/index.mjs +160 -356
- package/libs/slider/index.umd.js +2 -453
- package/libs/slider/package.json +5 -0
- package/libs/stepper/index.css +1 -489
- package/libs/stepper/index.mjs +101 -181
- package/libs/stepper/index.umd.js +2 -269
- package/libs/stepper/package.json +5 -0
- package/libs/swipe/index.css +1 -506
- package/libs/swipe/index.mjs +259 -542
- package/libs/swipe/index.umd.js +2 -703
- package/libs/swipe/package.json +5 -0
- package/libs/swipeItem/index.css +1 -424
- package/libs/swipeItem/index.mjs +52 -111
- package/libs/swipeItem/index.umd.js +2 -154
- package/libs/swipeItem/package.json +5 -0
- package/libs/switch/index.css +1 -472
- package/libs/switch/index.mjs +62 -121
- package/libs/switch/index.umd.js +2 -200
- package/libs/switch/package.json +5 -0
- package/libs/tab/index.mjs +68 -131
- package/libs/tab/index.umd.js +1 -190
- package/libs/tab/package.json +5 -0
- package/libs/tabs/index.css +1 -514
- package/libs/tabs/index.mjs +410 -751
- package/libs/tabs/index.umd.js +2 -1020
- package/libs/tabs/package.json +5 -0
- package/libs/toast/index.css +1 -1050
- package/libs/toast/index.mjs +114 -183
- package/libs/toast/index.umd.js +2 -306
- package/libs/toast/package.json +5 -0
- package/libs/tooltip/index.css +1 -514
- package/libs/tooltip/index.mjs +155 -293
- package/libs/tooltip/index.umd.js +2 -416
- package/libs/tooltip/package.json +5 -0
- package/package.json +5 -12
package/libs/swipe/index.mjs
CHANGED
|
@@ -1,40 +1,11 @@
|
|
|
1
|
-
import { ref, reactive, getCurrentInstance, provide, isVNode, inject, onUnmounted, computed, defineComponent, createVNode, watch, onMounted, nextTick, onBeforeUnmount } from "vue";
|
|
2
|
-
const
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
if (Array.isArray(mods)) {
|
|
10
|
-
return mods.reduce((acc, cur) => acc + getMods(el, cur), "");
|
|
11
|
-
}
|
|
12
|
-
return Object.keys(mods).reduce(
|
|
13
|
-
(acc, cur) => acc + (mods[cur] ? getMods(el, cur) : ""),
|
|
14
|
-
""
|
|
15
|
-
);
|
|
16
|
-
};
|
|
17
|
-
const createBEM = (block) => {
|
|
18
|
-
return (el, mods) => {
|
|
19
|
-
let _el = el;
|
|
20
|
-
let _mods = mods;
|
|
21
|
-
if (_el && typeof _el !== "string") {
|
|
22
|
-
_mods = _el;
|
|
23
|
-
_el = "";
|
|
24
|
-
}
|
|
25
|
-
_el = _el ? `${block}__${_el}` : block;
|
|
26
|
-
return `${_el}${getMods(_el, _mods)}`;
|
|
27
|
-
};
|
|
28
|
-
};
|
|
29
|
-
const createGlobalBem = () => {
|
|
30
|
-
return (el, mods) => {
|
|
31
|
-
if (!mods) {
|
|
32
|
-
return `y-${el}`;
|
|
33
|
-
}
|
|
34
|
-
return `${getMods(`y-${el}`, mods)}`;
|
|
35
|
-
};
|
|
36
|
-
};
|
|
37
|
-
const defaultLang = {
|
|
1
|
+
import { ref as x, reactive as w, getCurrentInstance as V, provide as ce, isVNode as ue, inject as fe, onUnmounted as de, computed as p, defineComponent as J, createVNode as S, watch as ve, onMounted as me, nextTick as he, onBeforeUnmount as ge } from "vue";
|
|
2
|
+
const I = (t, o) => o ? typeof o == "string" ? ` ${t}--${o}` : Array.isArray(o) ? o.reduce((s, n) => s + I(t, n), "") : Object.keys(o).reduce(
|
|
3
|
+
(s, n) => s + (o[n] ? I(t, n) : ""),
|
|
4
|
+
""
|
|
5
|
+
) : "", ye = (t) => (o, s) => {
|
|
6
|
+
let n = o, d = s;
|
|
7
|
+
return n && typeof n != "string" && (d = n, n = ""), n = n ? `${t}__${n}` : t, `${n}${I(n, d)}`;
|
|
8
|
+
}, we = () => (t, o) => o ? `${I(`y-${t}`, o)}` : `y-${t}`, pe = {
|
|
38
9
|
"pull-refresh": {
|
|
39
10
|
pulling: "下拉刷新...",
|
|
40
11
|
loosing: "释放刷新...",
|
|
@@ -46,94 +17,57 @@ const defaultLang = {
|
|
|
46
17
|
validateMessage: "请输入正确内容"
|
|
47
18
|
}
|
|
48
19
|
};
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
"zh-CN":
|
|
20
|
+
x("zh-CN");
|
|
21
|
+
w({
|
|
22
|
+
"zh-CN": pe
|
|
52
23
|
});
|
|
53
|
-
const
|
|
54
|
-
const
|
|
55
|
-
return [
|
|
56
|
-
}
|
|
57
|
-
const
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
return baseNumber * Number(val.replace(/%/g, "")) / 100;
|
|
62
|
-
}
|
|
63
|
-
return Number(val);
|
|
64
|
-
};
|
|
65
|
-
const filterChildren = (children) => {
|
|
66
|
-
const vnodes = [];
|
|
67
|
-
const _filterChildren = (childrens) => {
|
|
68
|
-
if (Array.isArray(childrens)) {
|
|
69
|
-
childrens.forEach((child) => {
|
|
70
|
-
var _a;
|
|
71
|
-
if (isVNode(child)) {
|
|
72
|
-
vnodes.push(child);
|
|
73
|
-
if ((_a = child.component) == null ? void 0 : _a.subTree) {
|
|
74
|
-
_filterChildren(child.component.subTree.children);
|
|
75
|
-
}
|
|
76
|
-
if (child.children) {
|
|
77
|
-
_filterChildren(child.children);
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
});
|
|
81
|
-
}
|
|
82
|
-
};
|
|
83
|
-
_filterChildren(children);
|
|
84
|
-
return vnodes;
|
|
85
|
-
};
|
|
86
|
-
const sortChildren = (childrens, instance) => {
|
|
87
|
-
const vnodes = filterChildren(instance.subTree.children);
|
|
88
|
-
childrens.sort((a, b) => vnodes.indexOf(a.vnode) - vnodes.indexOf(b.vnode));
|
|
89
|
-
};
|
|
90
|
-
const setRelation = (key) => {
|
|
91
|
-
const instance = getCurrentInstance();
|
|
92
|
-
const childrens = reactive([]);
|
|
93
|
-
const initProvide = (value) => {
|
|
94
|
-
const addChild = (child) => {
|
|
95
|
-
if (child.proxy) {
|
|
96
|
-
childrens.push(child);
|
|
97
|
-
instance && sortChildren(childrens, instance);
|
|
98
|
-
}
|
|
99
|
-
};
|
|
100
|
-
const removeChild = (child) => {
|
|
101
|
-
const index = childrens.indexOf(child);
|
|
102
|
-
childrens.splice(index, 1);
|
|
103
|
-
};
|
|
104
|
-
provide(key, {
|
|
105
|
-
addChild,
|
|
106
|
-
removeChild,
|
|
107
|
-
childrens,
|
|
108
|
-
...value
|
|
24
|
+
const Q = (t) => {
|
|
25
|
+
const o = `y-${t}`;
|
|
26
|
+
return [o, ye(o), we()];
|
|
27
|
+
}, q = (t, o) => typeof t == "string" && t.includes("%") && t.includes("%") ? o * Number(t.replace(/%/g, "")) / 100 : Number(t), be = (t) => {
|
|
28
|
+
const o = [], s = (n) => {
|
|
29
|
+
Array.isArray(n) && n.forEach((d) => {
|
|
30
|
+
var c;
|
|
31
|
+
ue(d) && (o.push(d), (c = d.component) != null && c.subTree && s(d.component.subTree.children), d.children && s(d.children));
|
|
109
32
|
});
|
|
110
33
|
};
|
|
34
|
+
return s(t), o;
|
|
35
|
+
}, Se = (t, o) => {
|
|
36
|
+
const s = be(o.subTree.children);
|
|
37
|
+
t.sort((n, d) => s.indexOf(n.vnode) - s.indexOf(d.vnode));
|
|
38
|
+
}, Ee = (t) => {
|
|
39
|
+
const o = V(), s = w([]);
|
|
111
40
|
return {
|
|
112
|
-
childrens,
|
|
113
|
-
initProvide
|
|
41
|
+
childrens: s,
|
|
42
|
+
initProvide: (d) => {
|
|
43
|
+
ce(t, {
|
|
44
|
+
addChild: (r) => {
|
|
45
|
+
r.proxy && (s.push(r), o && Se(s, o));
|
|
46
|
+
},
|
|
47
|
+
removeChild: (r) => {
|
|
48
|
+
const l = s.indexOf(r);
|
|
49
|
+
s.splice(l, 1);
|
|
50
|
+
},
|
|
51
|
+
childrens: s,
|
|
52
|
+
...d
|
|
53
|
+
});
|
|
54
|
+
}
|
|
114
55
|
};
|
|
115
|
-
}
|
|
116
|
-
const
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
onUnmounted(() => removeChild(currentInstance));
|
|
123
|
-
const index = computed(() => childrens.indexOf(currentInstance));
|
|
124
|
-
return {
|
|
125
|
-
index,
|
|
126
|
-
parent
|
|
56
|
+
}, ze = (t) => {
|
|
57
|
+
const o = fe(t, null), s = V();
|
|
58
|
+
if (o && s) {
|
|
59
|
+
const { childrens: n, addChild: d, removeChild: c } = o;
|
|
60
|
+
return d(s), de(() => c(s)), {
|
|
61
|
+
index: p(() => n.indexOf(s)),
|
|
62
|
+
parent: o
|
|
127
63
|
};
|
|
128
64
|
}
|
|
129
65
|
return {
|
|
130
66
|
parent: null,
|
|
131
|
-
index:
|
|
67
|
+
index: x(-1)
|
|
132
68
|
};
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
const YSwipeItem = /* @__PURE__ */ defineComponent({
|
|
136
|
-
name: name$1,
|
|
69
|
+
}, [Ne, xe] = Q("swipe-item"), F = /* @__PURE__ */ J({
|
|
70
|
+
name: Ne,
|
|
137
71
|
props: {
|
|
138
72
|
clonenNode: {
|
|
139
73
|
type: Object,
|
|
@@ -144,66 +78,39 @@ const YSwipeItem = /* @__PURE__ */ defineComponent({
|
|
|
144
78
|
default: -1
|
|
145
79
|
}
|
|
146
80
|
},
|
|
147
|
-
setup(
|
|
148
|
-
slots
|
|
81
|
+
setup(t, {
|
|
82
|
+
slots: o
|
|
149
83
|
}) {
|
|
150
|
-
const
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
const spacing = `${(parent == null ? void 0 : parent.itemDetail.space) || 0}px`;
|
|
167
|
-
if ((parent == null ? void 0 : parent.props.autoHeight) && (parent == null ? void 0 : parent.activeIndex) !== index.value) {
|
|
168
|
-
height = "0";
|
|
169
|
-
}
|
|
170
|
-
if (parent == null ? void 0 : parent.props.vertical) {
|
|
171
|
-
return {
|
|
172
|
-
height: width,
|
|
173
|
-
width: height,
|
|
174
|
-
marginBottom: spacing
|
|
175
|
-
};
|
|
176
|
-
}
|
|
177
|
-
return {
|
|
178
|
-
width,
|
|
179
|
-
height,
|
|
180
|
-
marginRight: spacing
|
|
84
|
+
const s = V(), {
|
|
85
|
+
parent: n
|
|
86
|
+
} = ze(ee);
|
|
87
|
+
!t.clonenNode && s && (n == null || n.children.push(s));
|
|
88
|
+
const d = p(() => t.clonenNode ? t.index : n == null ? void 0 : n.children.findIndex((u) => u.proxy === (s == null ? void 0 : s.proxy))), c = p(() => {
|
|
89
|
+
const u = `${(n == null ? void 0 : n.itemDetail.size) || 0}px`;
|
|
90
|
+
let r = "auto";
|
|
91
|
+
const l = `${(n == null ? void 0 : n.itemDetail.space) || 0}px`;
|
|
92
|
+
return n != null && n.props.autoHeight && (n == null ? void 0 : n.activeIndex) !== d.value && (r = "0"), n != null && n.props.vertical ? {
|
|
93
|
+
height: u,
|
|
94
|
+
width: r,
|
|
95
|
+
marginBottom: l
|
|
96
|
+
} : {
|
|
97
|
+
width: u,
|
|
98
|
+
height: r,
|
|
99
|
+
marginRight: l
|
|
181
100
|
};
|
|
182
101
|
});
|
|
183
102
|
return () => {
|
|
184
|
-
var
|
|
185
|
-
const
|
|
186
|
-
return
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
}, [
|
|
103
|
+
var r, l;
|
|
104
|
+
const u = ((r = n == null ? void 0 : n.itemShowedList) == null ? void 0 : r.list[d.value || 0]) || !1;
|
|
105
|
+
return S("div", {
|
|
106
|
+
class: xe(),
|
|
107
|
+
style: c.value
|
|
108
|
+
}, [u ? t.clonenNode || ((l = o.default) == null ? void 0 : l.call(o)) : null]);
|
|
190
109
|
};
|
|
191
110
|
}
|
|
192
111
|
});
|
|
193
|
-
var
|
|
194
|
-
|
|
195
|
-
Position2["top"] = "top";
|
|
196
|
-
Position2["bottom"] = "bottom";
|
|
197
|
-
Position2["right"] = "right";
|
|
198
|
-
return Position2;
|
|
199
|
-
})(Position || {});
|
|
200
|
-
var Align = /* @__PURE__ */ ((Align2) => {
|
|
201
|
-
Align2["start"] = "start";
|
|
202
|
-
Align2["center"] = "center";
|
|
203
|
-
Align2["end"] = "end";
|
|
204
|
-
return Align2;
|
|
205
|
-
})(Align || {});
|
|
206
|
-
const swipeProps = {
|
|
112
|
+
var P = /* @__PURE__ */ ((t) => (t.left = "left", t.top = "top", t.bottom = "bottom", t.right = "right", t))(P || {}), D = /* @__PURE__ */ ((t) => (t.start = "start", t.center = "center", t.end = "end", t))(D || {});
|
|
113
|
+
const Ce = {
|
|
207
114
|
autoplayTime: {
|
|
208
115
|
type: Number,
|
|
209
116
|
default: 0
|
|
@@ -218,11 +125,11 @@ const swipeProps = {
|
|
|
218
125
|
},
|
|
219
126
|
loop: {
|
|
220
127
|
type: Boolean,
|
|
221
|
-
default:
|
|
128
|
+
default: !0
|
|
222
129
|
},
|
|
223
130
|
dots: {
|
|
224
131
|
type: Boolean,
|
|
225
|
-
default:
|
|
132
|
+
default: !0
|
|
226
133
|
},
|
|
227
134
|
dotsPosition: {
|
|
228
135
|
type: String,
|
|
@@ -234,15 +141,15 @@ const swipeProps = {
|
|
|
234
141
|
},
|
|
235
142
|
lazy: {
|
|
236
143
|
type: Boolean,
|
|
237
|
-
default:
|
|
144
|
+
default: !1
|
|
238
145
|
},
|
|
239
146
|
vertical: {
|
|
240
147
|
type: Boolean,
|
|
241
|
-
default:
|
|
148
|
+
default: !1
|
|
242
149
|
},
|
|
243
150
|
autoHeight: {
|
|
244
151
|
type: Boolean,
|
|
245
|
-
default:
|
|
152
|
+
default: !1
|
|
246
153
|
},
|
|
247
154
|
itemSize: {
|
|
248
155
|
type: [Number, String],
|
|
@@ -258,253 +165,144 @@ const swipeProps = {
|
|
|
258
165
|
},
|
|
259
166
|
touchable: {
|
|
260
167
|
type: Boolean,
|
|
261
|
-
default:
|
|
168
|
+
default: !0
|
|
262
169
|
},
|
|
263
170
|
isFollowHand: {
|
|
264
171
|
type: Boolean,
|
|
265
|
-
default:
|
|
172
|
+
default: !0
|
|
266
173
|
},
|
|
267
174
|
align: {
|
|
268
175
|
type: String,
|
|
269
176
|
default: "center"
|
|
270
177
|
}
|
|
271
|
-
}
|
|
272
|
-
|
|
273
|
-
const SWIPE_PROVIDE_KEY = name;
|
|
274
|
-
const Swipe = /* @__PURE__ */ defineComponent({
|
|
275
|
-
name,
|
|
178
|
+
}, [Z, O] = Q("swipe"), ee = Z, R = /* @__PURE__ */ J({
|
|
179
|
+
name: Z,
|
|
276
180
|
components: {
|
|
277
|
-
YSwipeItem
|
|
181
|
+
YSwipeItem: F
|
|
278
182
|
},
|
|
279
|
-
props:
|
|
280
|
-
setup(
|
|
281
|
-
slots,
|
|
282
|
-
emit,
|
|
283
|
-
expose
|
|
183
|
+
props: Ce,
|
|
184
|
+
setup(t, {
|
|
185
|
+
slots: o,
|
|
186
|
+
emit: s,
|
|
187
|
+
expose: n
|
|
284
188
|
}) {
|
|
285
189
|
const {
|
|
286
|
-
initProvide
|
|
287
|
-
} =
|
|
288
|
-
const itemList = reactive([]);
|
|
289
|
-
const activeIndex = ref(Number(props.initIndex));
|
|
290
|
-
const itemDetail = reactive({
|
|
190
|
+
initProvide: d
|
|
191
|
+
} = Ee(ee), c = w([]), u = x(Number(t.initIndex)), r = w({
|
|
291
192
|
// 元素尺寸
|
|
292
193
|
size: 0,
|
|
293
194
|
// 间距
|
|
294
195
|
space: 0,
|
|
295
196
|
// 元素宽度比swipe小,占满整个视窗
|
|
296
|
-
isFillViewport:
|
|
297
|
-
})
|
|
298
|
-
const trackDetail = reactive({
|
|
197
|
+
isFillViewport: !1
|
|
198
|
+
}), l = w({
|
|
299
199
|
// 偏移量
|
|
300
200
|
offset: 0,
|
|
301
201
|
// 视窗大小
|
|
302
202
|
viewportSize: 0,
|
|
303
203
|
// 重复节点个数
|
|
304
204
|
cloneNodeCount: 0
|
|
305
|
-
})
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
result.push(!props.lazy);
|
|
313
|
-
}
|
|
314
|
-
return result;
|
|
315
|
-
};
|
|
316
|
-
const checkItemShowed = () => {
|
|
317
|
-
if (!props.lazy)
|
|
205
|
+
}), b = x(), $ = x(), A = () => {
|
|
206
|
+
const e = c.length, i = [];
|
|
207
|
+
for (let f = 0; f < e; f++)
|
|
208
|
+
i.push(!t.lazy);
|
|
209
|
+
return i;
|
|
210
|
+
}, _ = () => {
|
|
211
|
+
if (!t.lazy)
|
|
318
212
|
return;
|
|
319
|
-
const
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
if (!itemShowedList.list[i]) {
|
|
328
|
-
const left = itemSizeSpace * i;
|
|
329
|
-
const right = left + itemDetail.size;
|
|
330
|
-
if (left >= viewportLeft && left < viewportRight || right > viewportLeft && right < viewportRight || left < viewportLeft && right > viewportRight) {
|
|
331
|
-
itemShowedList.list[i] = true;
|
|
332
|
-
}
|
|
213
|
+
const e = r.size + r.space, i = c.length * e;
|
|
214
|
+
let f = -(l.offset + a.offset) - l.cloneNodeCount * e;
|
|
215
|
+
f < 0 && (f += i);
|
|
216
|
+
const m = f + l.viewportSize;
|
|
217
|
+
for (let v = 0; v < c.length; v++)
|
|
218
|
+
if (!C.list[v]) {
|
|
219
|
+
const h = e * v, g = h + r.size;
|
|
220
|
+
(h >= f && h < m || g > f && g < m || h < f && g > m) && (C.list[v] = !0);
|
|
333
221
|
}
|
|
334
|
-
|
|
222
|
+
}, C = w({
|
|
223
|
+
list: A()
|
|
224
|
+
}), H = () => {
|
|
225
|
+
C.list = A(), _();
|
|
335
226
|
};
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
watch(() => [...itemList], initItemShowList);
|
|
344
|
-
const setItemSize = (itemSize, viewportSize) => {
|
|
345
|
-
if (itemSize) {
|
|
346
|
-
itemDetail.size = parsePercent(itemSize, viewportSize);
|
|
347
|
-
} else {
|
|
348
|
-
itemDetail.size = viewportSize;
|
|
349
|
-
}
|
|
350
|
-
itemDetail.space = Number(props.itemSpace) || 0;
|
|
351
|
-
itemDetail.isFillViewport = itemDetail.size >= viewportSize;
|
|
352
|
-
trackDetail.viewportSize = viewportSize;
|
|
353
|
-
trackDetail.cloneNodeCount = getCloneNodeCount();
|
|
354
|
-
};
|
|
355
|
-
const getCloneNodeCount = () => {
|
|
356
|
-
if (needLoop.value) {
|
|
357
|
-
const sizeSpace = itemDetail.size + itemDetail.space;
|
|
358
|
-
if (sizeSpace === 0)
|
|
227
|
+
ve(() => [...c], H);
|
|
228
|
+
const j = (e, i) => {
|
|
229
|
+
e ? r.size = q(e, i) : r.size = i, r.space = Number(t.itemSpace) || 0, r.isFillViewport = r.size >= i, l.viewportSize = i, l.cloneNodeCount = te();
|
|
230
|
+
}, te = () => {
|
|
231
|
+
if (k.value) {
|
|
232
|
+
const e = r.size + r.space;
|
|
233
|
+
if (e === 0)
|
|
359
234
|
return 0;
|
|
360
|
-
const
|
|
361
|
-
|
|
362
|
-
return Math.min(count, itemList.length - 1);
|
|
235
|
+
const i = l.viewportSize * 2 - e, f = Math.ceil(i / e);
|
|
236
|
+
return Math.min(f, c.length - 1);
|
|
363
237
|
}
|
|
364
238
|
return 0;
|
|
365
|
-
}
|
|
366
|
-
|
|
367
|
-
if (!swipeRef.value)
|
|
239
|
+
}, E = () => {
|
|
240
|
+
if (!b.value)
|
|
368
241
|
return;
|
|
369
242
|
const {
|
|
370
|
-
width,
|
|
371
|
-
height
|
|
372
|
-
} =
|
|
373
|
-
|
|
374
|
-
setItemSize(props.itemSize, height);
|
|
375
|
-
} else {
|
|
376
|
-
setItemSize(props.itemSize, width);
|
|
377
|
-
}
|
|
378
|
-
activeIndex.value = activeIndex.value >= itemList.length ? itemList.length - 1 : activeIndex.value;
|
|
379
|
-
if (activeIndex.value < 0) {
|
|
380
|
-
activeIndex.value = 0;
|
|
381
|
-
}
|
|
382
|
-
updateTransform(activeIndex.value);
|
|
383
|
-
initItemShowList();
|
|
384
|
-
startAutoplay();
|
|
243
|
+
width: e,
|
|
244
|
+
height: i
|
|
245
|
+
} = b.value.getBoundingClientRect();
|
|
246
|
+
t.vertical ? j(t.itemSize, i) : j(t.itemSize, e), u.value = u.value >= c.length ? c.length - 1 : u.value, u.value < 0 && (u.value = 0), B(u.value), H(), W();
|
|
385
247
|
};
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
})
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
swipeEl.addEventListener("touchstart", onTouchStart, false);
|
|
392
|
-
swipeEl.addEventListener("mousedown", onTouchStart, false);
|
|
393
|
-
swipeEl.addEventListener("touchmove", onTouch, false);
|
|
394
|
-
swipeEl.addEventListener("mousemove", onTouch, false);
|
|
395
|
-
swipeEl.addEventListener("touchend", onTouchEnd, false);
|
|
396
|
-
swipeEl.addEventListener("mouseup", onTouchEnd, false);
|
|
397
|
-
swipeEl.addEventListener("mouseleave", onTouchEnd, false);
|
|
398
|
-
swipeEl.addEventListener("touchcancel", onTouchEnd, false);
|
|
248
|
+
me(() => {
|
|
249
|
+
if (he(E).catch(() => {
|
|
250
|
+
}), t.touchable && b.value) {
|
|
251
|
+
const e = b.value;
|
|
252
|
+
e.addEventListener("touchstart", L, !1), e.addEventListener("mousedown", L, !1), e.addEventListener("touchmove", T, !1), e.addEventListener("mousemove", T, !1), e.addEventListener("touchend", y, !1), e.addEventListener("mouseup", y, !1), e.addEventListener("mouseleave", y, !1), e.addEventListener("touchcancel", y, !1);
|
|
399
253
|
}
|
|
400
|
-
window.addEventListener("resize",
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
if (props.touchable && swipeRef.value) {
|
|
406
|
-
const swipeEl = swipeRef.value;
|
|
407
|
-
swipeEl.removeEventListener("touchstart", onTouchStart, false);
|
|
408
|
-
swipeEl.removeEventListener("mousedown", onTouchStart, false);
|
|
409
|
-
swipeEl.removeEventListener("mousemove", onTouch, false);
|
|
410
|
-
swipeEl.removeEventListener("touchmove", onTouch, false);
|
|
411
|
-
swipeEl.removeEventListener("mouseup", onTouchEnd, false);
|
|
412
|
-
swipeEl.removeEventListener("touchend", onTouchEnd, false);
|
|
413
|
-
swipeEl.removeEventListener("mouseleave", onTouchEnd, false);
|
|
414
|
-
swipeEl.removeEventListener("touchcancel", onTouchEnd, false);
|
|
254
|
+
window.addEventListener("resize", E, !1), window.addEventListener("orientationchange", E, !1);
|
|
255
|
+
}), ge(() => {
|
|
256
|
+
if (ne(), t.touchable && b.value) {
|
|
257
|
+
const e = b.value;
|
|
258
|
+
e.removeEventListener("touchstart", L, !1), e.removeEventListener("mousedown", L, !1), e.removeEventListener("mousemove", T, !1), e.removeEventListener("touchmove", T, !1), e.removeEventListener("mouseup", y, !1), e.removeEventListener("touchend", y, !1), e.removeEventListener("mouseleave", y, !1), e.removeEventListener("touchcancel", y, !1);
|
|
415
259
|
}
|
|
416
|
-
window.removeEventListener("resize",
|
|
417
|
-
window.removeEventListener("orientationchange", resize, false);
|
|
260
|
+
window.removeEventListener("resize", E, !1), window.removeEventListener("orientationchange", E, !1);
|
|
418
261
|
});
|
|
419
|
-
const
|
|
420
|
-
let
|
|
421
|
-
switch (
|
|
422
|
-
case
|
|
423
|
-
|
|
262
|
+
const G = p(() => {
|
|
263
|
+
let e = 0;
|
|
264
|
+
switch (t.align) {
|
|
265
|
+
case D.start:
|
|
266
|
+
e = 0;
|
|
424
267
|
break;
|
|
425
|
-
case
|
|
426
|
-
|
|
268
|
+
case D.center:
|
|
269
|
+
e = (l.viewportSize - r.size) / 2;
|
|
427
270
|
break;
|
|
428
|
-
case
|
|
429
|
-
|
|
271
|
+
case D.end:
|
|
272
|
+
e = l.viewportSize - r.size;
|
|
430
273
|
break;
|
|
431
274
|
default:
|
|
432
|
-
|
|
433
|
-
}
|
|
434
|
-
return offset;
|
|
435
|
-
});
|
|
436
|
-
const needLoop = computed(() => {
|
|
437
|
-
return props.loop && itemList.length > 1;
|
|
438
|
-
});
|
|
439
|
-
const updateTransform = (index) => {
|
|
440
|
-
const itemSizeSpace = itemDetail.size + itemDetail.space;
|
|
441
|
-
if (needLoop.value) {
|
|
442
|
-
trackDetail.offset = -itemSizeSpace * (index + trackDetail.cloneNodeCount) + positionOffset.value;
|
|
443
|
-
} else {
|
|
444
|
-
trackDetail.offset = -itemSizeSpace * index + positionOffset.value;
|
|
445
|
-
if (props.align !== "center") {
|
|
446
|
-
if (index === 0) {
|
|
447
|
-
trackDetail.offset = 0;
|
|
448
|
-
}
|
|
449
|
-
if (index === itemList.length - 1) {
|
|
450
|
-
trackDetail.offset = -itemSizeSpace * index + trackDetail.viewportSize - itemDetail.size;
|
|
451
|
-
}
|
|
452
|
-
}
|
|
453
|
-
}
|
|
454
|
-
};
|
|
455
|
-
const afterChange = () => {
|
|
456
|
-
updateTransform(activeIndex.value);
|
|
457
|
-
emit("afterChange", activeIndex.value);
|
|
458
|
-
};
|
|
459
|
-
const getIndex = (index) => {
|
|
460
|
-
return (itemList.length + index) % itemList.length;
|
|
461
|
-
};
|
|
462
|
-
const moveTo = (index, withAnimation = true) => {
|
|
463
|
-
activeIndex.value = getIndex(index);
|
|
464
|
-
updateTransform(index);
|
|
465
|
-
checkItemShowed();
|
|
466
|
-
emit("change", activeIndex.value);
|
|
467
|
-
if (withAnimation) {
|
|
468
|
-
dragDetail.transitionEnabled = true;
|
|
469
|
-
if (swipeTrackRef.value) {
|
|
470
|
-
swipeTrackRef.value.addEventListener("transitionend", () => {
|
|
471
|
-
dragDetail.transitionEnabled = false;
|
|
472
|
-
afterChange();
|
|
473
|
-
}, {
|
|
474
|
-
once: true
|
|
475
|
-
});
|
|
476
|
-
}
|
|
477
|
-
} else {
|
|
478
|
-
afterChange();
|
|
479
|
-
}
|
|
480
|
-
};
|
|
481
|
-
const prev = (withAnimation = true) => {
|
|
482
|
-
moveTo(activeIndex.value - 1, withAnimation);
|
|
483
|
-
};
|
|
484
|
-
const next = (withAnimation = true) => {
|
|
485
|
-
moveTo(activeIndex.value + 1, withAnimation);
|
|
486
|
-
};
|
|
487
|
-
let timer = null;
|
|
488
|
-
const stopAutoPlay = () => {
|
|
489
|
-
if (props.autoplayTime && timer) {
|
|
490
|
-
clearInterval(timer);
|
|
275
|
+
e = 0;
|
|
491
276
|
}
|
|
277
|
+
return e;
|
|
278
|
+
}), k = p(() => t.loop && c.length > 1), B = (e) => {
|
|
279
|
+
const i = r.size + r.space;
|
|
280
|
+
k.value ? l.offset = -i * (e + l.cloneNodeCount) + G.value : (l.offset = -i * e + G.value, t.align !== "center" && (e === 0 && (l.offset = 0), e === c.length - 1 && (l.offset = -i * e + l.viewportSize - r.size)));
|
|
281
|
+
}, U = () => {
|
|
282
|
+
B(u.value), s("afterChange", u.value);
|
|
283
|
+
}, Y = (e) => (c.length + e) % c.length, M = (e, i = !0) => {
|
|
284
|
+
u.value = Y(e), B(e), _(), s("change", u.value), i ? (a.transitionEnabled = !0, $.value && $.value.addEventListener("transitionend", () => {
|
|
285
|
+
a.transitionEnabled = !1, U();
|
|
286
|
+
}, {
|
|
287
|
+
once: !0
|
|
288
|
+
})) : U();
|
|
289
|
+
}, K = (e = !0) => {
|
|
290
|
+
M(u.value - 1, e);
|
|
291
|
+
}, X = (e = !0) => {
|
|
292
|
+
M(u.value + 1, e);
|
|
492
293
|
};
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
}
|
|
502
|
-
};
|
|
503
|
-
const dragDetail = reactive({
|
|
294
|
+
let z = null;
|
|
295
|
+
const ne = () => {
|
|
296
|
+
t.autoplayTime && z && clearInterval(z);
|
|
297
|
+
}, W = () => {
|
|
298
|
+
t.autoplayTime && c.length > 1 && (z && clearInterval(z), z = setInterval(() => {
|
|
299
|
+
X();
|
|
300
|
+
}, Number(t.autoplayTime)));
|
|
301
|
+
}, a = w({
|
|
504
302
|
// 拖拽中
|
|
505
|
-
isDragging:
|
|
303
|
+
isDragging: !1,
|
|
506
304
|
// 是否首次拖动
|
|
507
|
-
isFirstTouch:
|
|
305
|
+
isFirstTouch: !0,
|
|
508
306
|
// 拖拽起始位置X
|
|
509
307
|
startX: 0,
|
|
510
308
|
// 拖拽起始位置Y
|
|
@@ -514,184 +312,103 @@ const Swipe = /* @__PURE__ */ defineComponent({
|
|
|
514
312
|
// 开始拖动时间
|
|
515
313
|
startTime: /* @__PURE__ */ new Date(),
|
|
516
314
|
// 是否在执行动画
|
|
517
|
-
transitionEnabled:
|
|
518
|
-
})
|
|
519
|
-
|
|
520
|
-
if (dragDetail.transitionEnabled) {
|
|
315
|
+
transitionEnabled: !1
|
|
316
|
+
}), L = (e) => {
|
|
317
|
+
if (a.transitionEnabled)
|
|
521
318
|
return;
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
if (
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
dragDetail.startX = clientX;
|
|
533
|
-
dragDetail.startY = clientY;
|
|
534
|
-
dragDetail.isDragging = true;
|
|
535
|
-
dragDetail.isFirstTouch = true;
|
|
536
|
-
dragDetail.startTime = /* @__PURE__ */ new Date();
|
|
537
|
-
};
|
|
538
|
-
const onTouch = (e) => {
|
|
539
|
-
if (!dragDetail.isDragging) {
|
|
319
|
+
let i = 0, f = 0;
|
|
320
|
+
"touches" in e ? (i = e.touches[0].clientX, f = e.touches[0].clientY) : (i = e.clientX, f = e.clientY), a.startX = i, a.startY = f, a.isDragging = !0, a.isFirstTouch = !0, a.startTime = /* @__PURE__ */ new Date();
|
|
321
|
+
}, T = (e) => {
|
|
322
|
+
if (!a.isDragging)
|
|
323
|
+
return;
|
|
324
|
+
let i = 0, f = 0;
|
|
325
|
+
"touches" in e ? (i = e.touches[0].clientX, f = e.touches[0].clientY) : (i = e.clientX, f = e.clientY);
|
|
326
|
+
const m = i - a.startX, v = f - a.startY;
|
|
327
|
+
if (a.isFirstTouch && (a.isFirstTouch = !1, Math.abs(m) < Math.abs(v) !== t.vertical)) {
|
|
328
|
+
a.isDragging = !1;
|
|
540
329
|
return;
|
|
541
330
|
}
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
clientX = e.touches[0].clientX;
|
|
546
|
-
clientY = e.touches[0].clientY;
|
|
547
|
-
} else {
|
|
548
|
-
clientX = e.clientX;
|
|
549
|
-
clientY = e.clientY;
|
|
550
|
-
}
|
|
551
|
-
const offsetX = clientX - dragDetail.startX;
|
|
552
|
-
const offsetY = clientY - dragDetail.startY;
|
|
553
|
-
if (dragDetail.isFirstTouch) {
|
|
554
|
-
dragDetail.isFirstTouch = false;
|
|
555
|
-
const isVerticalTouch = Math.abs(offsetX) < Math.abs(offsetY);
|
|
556
|
-
if (isVerticalTouch !== props.vertical) {
|
|
557
|
-
dragDetail.isDragging = false;
|
|
558
|
-
return;
|
|
559
|
-
}
|
|
560
|
-
}
|
|
561
|
-
e.preventDefault();
|
|
562
|
-
dragDetail.offset = props.vertical ? offsetY : offsetX;
|
|
563
|
-
checkItemShowed();
|
|
564
|
-
emit("dragging", {
|
|
565
|
-
percent: dragDetail.offset / (itemDetail.size + itemDetail.space),
|
|
566
|
-
offset: dragDetail.offset
|
|
331
|
+
e.preventDefault(), a.offset = t.vertical ? v : m, _(), s("dragging", {
|
|
332
|
+
percent: a.offset / (r.size + r.space),
|
|
333
|
+
offset: a.offset
|
|
567
334
|
});
|
|
568
|
-
}
|
|
569
|
-
|
|
570
|
-
if (!dragDetail.isDragging) {
|
|
335
|
+
}, y = () => {
|
|
336
|
+
if (!a.isDragging)
|
|
571
337
|
return;
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
if (
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
}
|
|
582
|
-
|
|
583
|
-
};
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
return true;
|
|
590
|
-
}
|
|
591
|
-
const nextIndex = dragDetail.offset > 0 ? activeIndex.value - 1 : activeIndex.value + 1;
|
|
592
|
-
return nextIndex >= 0 && nextIndex < itemList.length;
|
|
593
|
-
};
|
|
594
|
-
const trackStyle = computed(() => {
|
|
595
|
-
const offset = dragDetail.isDragging && !props.isFollowHand ? trackDetail.offset : trackDetail.offset + dragDetail.offset;
|
|
596
|
-
const style2 = {};
|
|
597
|
-
if (props.vertical) {
|
|
598
|
-
style2.transform = `translate3d(0, ${offset}px, 0)`;
|
|
599
|
-
style2.transitionDuration = dragDetail.transitionEnabled ? `${props.duration}ms` : "0ms";
|
|
600
|
-
} else {
|
|
601
|
-
style2.transform = `translate3d(${offset}px, 0, 0)`;
|
|
602
|
-
style2.transitionDuration = dragDetail.transitionEnabled ? `${props.duration}ms` : "0ms";
|
|
603
|
-
}
|
|
604
|
-
if (dragDetail.isDragging) {
|
|
605
|
-
style2.transition = "none";
|
|
606
|
-
}
|
|
607
|
-
if (props.vertical) {
|
|
608
|
-
style2.flexDirection = "column";
|
|
609
|
-
}
|
|
610
|
-
if (props.autoHeight) {
|
|
611
|
-
style2.display = "block";
|
|
612
|
-
style2.whiteSpace = "nowrap";
|
|
613
|
-
}
|
|
614
|
-
return style2;
|
|
338
|
+
a.isDragging = !1;
|
|
339
|
+
const i = (/* @__PURE__ */ new Date()).getTime() - a.startTime.getTime();
|
|
340
|
+
oe() && (Math.abs(a.offset) > ie.value || Math.abs(a.offset) / i > 0.5) && (a.offset > 0 ? K() : X()), a.offset = 0, W();
|
|
341
|
+
}, ie = p(() => q(t.minSwipeDistance, r.size + r.space)), oe = () => {
|
|
342
|
+
if (k.value)
|
|
343
|
+
return !0;
|
|
344
|
+
const e = a.offset > 0 ? u.value - 1 : u.value + 1;
|
|
345
|
+
return e >= 0 && e < c.length;
|
|
346
|
+
}, se = p(() => {
|
|
347
|
+
const e = a.isDragging && !t.isFollowHand ? l.offset : l.offset + a.offset, i = {};
|
|
348
|
+
return t.vertical ? (i.transform = `translate3d(0, ${e}px, 0)`, i.transitionDuration = a.transitionEnabled ? `${t.duration}ms` : "0ms") : (i.transform = `translate3d(${e}px, 0, 0)`, i.transitionDuration = a.transitionEnabled ? `${t.duration}ms` : "0ms"), a.isDragging && (i.transition = "none"), t.vertical && (i.flexDirection = "column"), t.autoHeight && (i.display = "block", i.whiteSpace = "nowrap"), i;
|
|
349
|
+
}), re = p(() => ["y-swipe__dots", `y-swipe__dots--${t.dotsPosition || (t.vertical ? P.left : P.bottom)}`]);
|
|
350
|
+
n({
|
|
351
|
+
moveTo: M,
|
|
352
|
+
next: X,
|
|
353
|
+
prev: K,
|
|
354
|
+
resize: E
|
|
615
355
|
});
|
|
616
|
-
const
|
|
617
|
-
|
|
618
|
-
|
|
356
|
+
const ae = w({
|
|
357
|
+
children: c,
|
|
358
|
+
activeIndex: u,
|
|
359
|
+
props: t,
|
|
360
|
+
itemDetail: r,
|
|
361
|
+
itemShowedList: C
|
|
619
362
|
});
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
if (props.dots) {
|
|
636
|
-
return createVNode("div", {
|
|
637
|
-
"class": dotsClass.value
|
|
638
|
-
}, [itemList.map((_, index) => {
|
|
639
|
-
const className = bem("dot", {
|
|
640
|
-
active: index === activeIndex.value
|
|
641
|
-
});
|
|
642
|
-
return createVNode("div", {
|
|
643
|
-
"class": className,
|
|
644
|
-
"style": {
|
|
645
|
-
backgroundColor: props.dotsColor
|
|
646
|
-
},
|
|
647
|
-
"key": index
|
|
648
|
-
}, null);
|
|
649
|
-
})]);
|
|
650
|
-
}
|
|
651
|
-
return null;
|
|
652
|
-
};
|
|
363
|
+
d(ae);
|
|
364
|
+
const le = () => t.dots ? S("div", {
|
|
365
|
+
class: re.value
|
|
366
|
+
}, [c.map((e, i) => {
|
|
367
|
+
const f = O("dot", {
|
|
368
|
+
active: i === u.value
|
|
369
|
+
});
|
|
370
|
+
return S("div", {
|
|
371
|
+
class: f,
|
|
372
|
+
style: {
|
|
373
|
+
backgroundColor: t.dotsColor
|
|
374
|
+
},
|
|
375
|
+
key: i
|
|
376
|
+
}, null);
|
|
377
|
+
})]) : null;
|
|
653
378
|
return () => {
|
|
654
|
-
var
|
|
655
|
-
return
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
}, [
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
}, [Array(
|
|
663
|
-
var
|
|
664
|
-
const
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
"index": nodeIndex
|
|
379
|
+
var e;
|
|
380
|
+
return S("div", {
|
|
381
|
+
class: O(),
|
|
382
|
+
ref: b
|
|
383
|
+
}, [S("div", {
|
|
384
|
+
class: O("track"),
|
|
385
|
+
style: se.value,
|
|
386
|
+
ref: $
|
|
387
|
+
}, [Array(l.cloneNodeCount).fill("").map((i, f) => {
|
|
388
|
+
var h, g, N;
|
|
389
|
+
const m = Y(f - l.cloneNodeCount), v = (N = (h = c[m]) == null ? void 0 : (g = h.slots).default) == null ? void 0 : N.call(g);
|
|
390
|
+
return v ? S(F, {
|
|
391
|
+
clonenNode: v,
|
|
392
|
+
index: m
|
|
669
393
|
}, null) : null;
|
|
670
|
-
}), (
|
|
671
|
-
var
|
|
672
|
-
const
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
"index": nodeIndex
|
|
394
|
+
}), (e = o.default) == null ? void 0 : e.call(o), Array(l.cloneNodeCount).fill("").map((i, f) => {
|
|
395
|
+
var h, g, N;
|
|
396
|
+
const m = Y(f), v = (N = (h = c[m]) == null ? void 0 : (g = h.slots).default) == null ? void 0 : N.call(g);
|
|
397
|
+
return v ? S(F, {
|
|
398
|
+
clonenNode: v,
|
|
399
|
+
index: m
|
|
677
400
|
}, null) : null;
|
|
678
|
-
})]),
|
|
401
|
+
})]), o.dots ? o.dots() : le()]);
|
|
679
402
|
};
|
|
680
403
|
}
|
|
681
404
|
});
|
|
682
|
-
|
|
683
|
-
const
|
|
684
|
-
|
|
685
|
-
const animation = "";
|
|
686
|
-
const theme = "";
|
|
687
|
-
const style = "";
|
|
688
|
-
Swipe.install = (Vue) => {
|
|
689
|
-
const { name: name2 } = Swipe;
|
|
690
|
-
Vue.component(name2, Swipe);
|
|
405
|
+
R.install = (t) => {
|
|
406
|
+
const { name: o } = R;
|
|
407
|
+
t.component(o, R);
|
|
691
408
|
};
|
|
692
409
|
export {
|
|
693
|
-
Align,
|
|
694
|
-
Position,
|
|
695
|
-
|
|
696
|
-
swipeProps
|
|
410
|
+
D as Align,
|
|
411
|
+
P as Position,
|
|
412
|
+
R as default,
|
|
413
|
+
Ce as swipeProps
|
|
697
414
|
};
|