@seresweb/website-component 2.3.6 → 2.3.8
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/cjs/config-provider.cjs +1 -1
- package/dist/cjs/date-picker.cjs +1 -1
- package/dist/cjs/date-select.cjs +1 -1
- package/dist/cjs/horizontal-viewer.cjs +1 -1
- package/dist/cjs/image-indicator.cjs +1 -1
- package/dist/cjs/index.cjs +1 -1
- package/dist/cjs/locales.cjs +1 -1
- package/dist/cjs/swiper-normal.cjs +1 -1
- package/dist/cjs/swiper-showcase.cjs +1 -1
- package/dist/css/swiper-normal.css +1 -1
- package/dist/css/swiper-showcase.css +1 -1
- package/dist/dayjs.min-B_s8lXoY.js +288 -0
- package/dist/dayjs.min-Bs4YQaH1.cjs +1 -0
- package/dist/{en-US-BBTWftdk.js → en-US-DRY37Ke3.js} +1 -0
- package/dist/en-US-DYuJmmdF.cjs +1 -0
- package/dist/es/config-provider.mjs +53 -10
- package/dist/es/date-picker.mjs +354 -4
- package/dist/es/date-select.mjs +42 -37
- package/dist/es/horizontal-viewer.mjs +1 -1
- package/dist/es/image-indicator.mjs +1 -1
- package/dist/es/index.mjs +3 -3
- package/dist/es/locales.mjs +2 -1
- package/dist/es/swiper-normal.mjs +1 -1
- package/dist/es/swiper-showcase.mjs +90 -118
- package/dist/index-0n3E5pgL.cjs +1 -0
- package/dist/{index-BPpds5EG.js → index-Dzp0ckB8.js} +1 -1
- package/dist/index.css +1 -1
- package/dist/scss/swiper-normal.scss +4 -0
- package/dist/scss/swiper-showcase.scss +3 -4
- package/dist/types/components/date-picker/date-picker.vue.d.ts +8 -8
- package/dist/types/components/date-picker/index.d.ts +22 -22
- package/dist/types/components/date-picker/type.d.ts +6 -6
- package/dist/types/components/date-select/date-select.vue.d.ts +6 -6
- package/dist/types/components/date-select/type.d.ts +7 -7
- package/dist/types/components/locales/ar-SA.d.ts +1 -0
- package/dist/types/components/locales/en-US.d.ts +1 -0
- package/dist/types/components/locales/index.d.ts +2 -0
- package/package.json +1 -1
- package/dist/en-US-UkqgG0fb.cjs +0 -1
- package/dist/index-B-0yM6xR.cjs +0 -1
- package/dist/index-CMZ8zDDd.js +0 -644
- package/dist/index-D6pYBGfZ.cjs +0 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { defineComponent as V, ref as f, computed as
|
|
2
|
-
import { S as
|
|
1
|
+
import { defineComponent as V, ref as f, computed as C, watch as E, nextTick as M, onMounted as N, onBeforeUnmount as O, createElementBlock as l, createCommentVNode as d, openBlock as o, normalizeClass as i, unref as s, createElementVNode as n, Fragment as R, renderList as I, createVNode as z, toDisplayString as p } from "vue";
|
|
2
|
+
import { S as D } from "../swiper-bundle-DOQ1LV4x.js";
|
|
3
3
|
import { P as e } from "../_vars-BV4QQF-p.js";
|
|
4
|
-
import { ScLayzImage as
|
|
5
|
-
const
|
|
4
|
+
import { ScLayzImage as F } from "./layz-image.mjs";
|
|
5
|
+
const T = { class: "swiper-wrapper" }, Z = ["href"], U = ["disabled"], X = ["disabled"], g = /* @__PURE__ */ V({
|
|
6
6
|
__name: "swiper-showcase",
|
|
7
7
|
props: {
|
|
8
8
|
dataList: { default: () => [] },
|
|
@@ -12,102 +12,102 @@ const F = { class: "swiper-wrapper" }, T = ["href"], U = ["disabled"], X = ["dis
|
|
|
12
12
|
placeholder: {}
|
|
13
13
|
},
|
|
14
14
|
emits: ["slideChange"],
|
|
15
|
-
setup(
|
|
16
|
-
const
|
|
17
|
-
let
|
|
18
|
-
const
|
|
15
|
+
setup(u, { emit: B }) {
|
|
16
|
+
const a = u, y = B;
|
|
17
|
+
let r = null;
|
|
18
|
+
const v = f(), h = f(!0), _ = f(!0), $ = C(() => a.dataList && a.dataList.length > 0), m = (w) => [
|
|
19
19
|
`${e}-swiper-showcase__nav-btn`,
|
|
20
20
|
w ? `${e}-swiper-showcase__nav-btn--prev` : `${e}-swiper-showcase__nav-btn--next`
|
|
21
|
-
],
|
|
22
|
-
if (!
|
|
23
|
-
|
|
21
|
+
], k = () => {
|
|
22
|
+
if (!r) {
|
|
23
|
+
h.value = !0, _.value = !0;
|
|
24
24
|
return;
|
|
25
25
|
}
|
|
26
|
-
|
|
27
|
-
}, m = () => {
|
|
28
|
-
n && (n.destroy(), n = null);
|
|
26
|
+
h.value = r.isBeginning, _.value = r.isEnd, y("slideChange", r.activeIndex);
|
|
29
27
|
}, L = () => {
|
|
28
|
+
r && (r.destroy(), r = null);
|
|
29
|
+
}, b = () => {
|
|
30
30
|
var c;
|
|
31
|
-
if (
|
|
31
|
+
if (L(), !v.value || !$.value) return;
|
|
32
32
|
const w = {
|
|
33
33
|
0: { slidesPerView: 1, spaceBetween: 12 },
|
|
34
|
-
768: { slidesPerView: Math.min(2,
|
|
35
|
-
1024: { slidesPerView:
|
|
34
|
+
768: { slidesPerView: Math.min(2, a.slidesPerView), spaceBetween: 16 },
|
|
35
|
+
1024: { slidesPerView: a.slidesPerView, spaceBetween: a.spaceBetween }
|
|
36
36
|
};
|
|
37
|
-
|
|
38
|
-
slidesPerView:
|
|
39
|
-
spaceBetween:
|
|
37
|
+
r = new D(v.value, {
|
|
38
|
+
slidesPerView: a.slidesPerView,
|
|
39
|
+
spaceBetween: a.spaceBetween,
|
|
40
40
|
observer: !0,
|
|
41
41
|
observeParents: !0,
|
|
42
|
-
...
|
|
42
|
+
...a.swiperOptions,
|
|
43
43
|
breakpoints: {
|
|
44
44
|
...w,
|
|
45
|
-
...((c =
|
|
45
|
+
...((c = a.swiperOptions) == null ? void 0 : c.breakpoints) || {}
|
|
46
46
|
}
|
|
47
|
-
}),
|
|
48
|
-
},
|
|
49
|
-
|
|
47
|
+
}), r.on("slideChange", k), k();
|
|
48
|
+
}, P = () => {
|
|
49
|
+
r && r.slideNext();
|
|
50
50
|
}, S = () => {
|
|
51
|
-
|
|
51
|
+
r && r.slidePrev();
|
|
52
52
|
};
|
|
53
|
-
return
|
|
54
|
-
() => [
|
|
53
|
+
return E(
|
|
54
|
+
() => [a.dataList, a.slidesPerView, a.spaceBetween, a.swiperOptions],
|
|
55
55
|
() => {
|
|
56
|
-
|
|
56
|
+
M(b);
|
|
57
57
|
},
|
|
58
58
|
{ deep: !0 }
|
|
59
|
-
),
|
|
59
|
+
), N(() => {
|
|
60
|
+
b();
|
|
61
|
+
}), O(() => {
|
|
60
62
|
L();
|
|
61
|
-
}),
|
|
62
|
-
m();
|
|
63
|
-
}), (w, c) => k.value ? (o(), l(
|
|
63
|
+
}), (w, c) => $.value ? (o(), l(
|
|
64
64
|
"div",
|
|
65
65
|
{
|
|
66
66
|
key: 0,
|
|
67
67
|
class: i(`${s(e)}-swiper-showcase`)
|
|
68
68
|
},
|
|
69
69
|
[
|
|
70
|
-
|
|
70
|
+
n(
|
|
71
71
|
"div",
|
|
72
72
|
{
|
|
73
73
|
ref_key: "swiperRef",
|
|
74
|
-
ref:
|
|
74
|
+
ref: v,
|
|
75
75
|
class: i(`${s(e)}-swiper-showcase__main`)
|
|
76
76
|
},
|
|
77
77
|
[
|
|
78
|
-
|
|
78
|
+
n("div", T, [
|
|
79
79
|
(o(!0), l(
|
|
80
|
-
|
|
80
|
+
R,
|
|
81
81
|
null,
|
|
82
|
-
|
|
83
|
-
key: `${
|
|
82
|
+
I(w.dataList, (t, x) => (o(), l("div", {
|
|
83
|
+
key: `${t.title}-${x}`,
|
|
84
84
|
class: "swiper-slide"
|
|
85
85
|
}, [
|
|
86
|
-
|
|
86
|
+
n(
|
|
87
87
|
"div",
|
|
88
88
|
{
|
|
89
89
|
class: i(`${s(e)}-swiper-showcase__card`)
|
|
90
90
|
},
|
|
91
91
|
[
|
|
92
|
-
|
|
92
|
+
n(
|
|
93
93
|
"div",
|
|
94
94
|
{
|
|
95
95
|
class: i(`${s(e)}-swiper-showcase__media`)
|
|
96
96
|
},
|
|
97
97
|
[
|
|
98
|
-
|
|
98
|
+
t.tag ? (o(), l(
|
|
99
99
|
"div",
|
|
100
100
|
{
|
|
101
101
|
key: 0,
|
|
102
102
|
class: i(`${s(e)}-swiper-showcase__tag`)
|
|
103
103
|
},
|
|
104
|
-
p(
|
|
104
|
+
p(t.tag),
|
|
105
105
|
3
|
|
106
106
|
/* TEXT, CLASS */
|
|
107
107
|
)) : d("v-if", !0),
|
|
108
|
-
|
|
109
|
-
src:
|
|
110
|
-
alt:
|
|
108
|
+
z(s(F), {
|
|
109
|
+
src: t.url || w.placeholder || "",
|
|
110
|
+
alt: t.alt || t.title || "",
|
|
111
111
|
class: i(`${s(e)}-swiper-showcase__image`),
|
|
112
112
|
"img-class": `${s(e)}-swiper-showcase__img`
|
|
113
113
|
}, null, 8, ["src", "alt", "class", "img-class"])
|
|
@@ -115,46 +115,46 @@ const F = { class: "swiper-wrapper" }, T = ["href"], U = ["disabled"], X = ["dis
|
|
|
115
115
|
2
|
|
116
116
|
/* CLASS */
|
|
117
117
|
),
|
|
118
|
-
|
|
118
|
+
n(
|
|
119
119
|
"div",
|
|
120
120
|
{
|
|
121
121
|
class: i(`${s(e)}-swiper-showcase__info`)
|
|
122
122
|
},
|
|
123
123
|
[
|
|
124
|
-
|
|
124
|
+
n(
|
|
125
125
|
"div",
|
|
126
126
|
{
|
|
127
127
|
class: i(`${s(e)}-swiper-showcase__title`)
|
|
128
128
|
},
|
|
129
|
-
p(
|
|
129
|
+
p(t.title),
|
|
130
130
|
3
|
|
131
131
|
/* TEXT, CLASS */
|
|
132
132
|
),
|
|
133
|
-
|
|
133
|
+
t.date ? (o(), l(
|
|
134
134
|
"div",
|
|
135
135
|
{
|
|
136
136
|
key: 0,
|
|
137
137
|
class: i(`${s(e)}-swiper-showcase__date`)
|
|
138
138
|
},
|
|
139
|
-
p(
|
|
139
|
+
p(t.date),
|
|
140
140
|
3
|
|
141
141
|
/* TEXT, CLASS */
|
|
142
142
|
)) : d("v-if", !0),
|
|
143
|
-
|
|
143
|
+
t.desc ? (o(), l(
|
|
144
144
|
"div",
|
|
145
145
|
{
|
|
146
146
|
key: 1,
|
|
147
147
|
class: i(`${s(e)}-swiper-showcase__desc`)
|
|
148
148
|
},
|
|
149
|
-
p(
|
|
149
|
+
p(t.desc),
|
|
150
150
|
3
|
|
151
151
|
/* TEXT, CLASS */
|
|
152
152
|
)) : d("v-if", !0),
|
|
153
|
-
|
|
153
|
+
t.link ? (o(), l("a", {
|
|
154
154
|
key: 2,
|
|
155
|
-
href:
|
|
155
|
+
href: t.link,
|
|
156
156
|
class: i(`${s(e)}-swiper-showcase__link`)
|
|
157
|
-
}, p(
|
|
157
|
+
}, p(t.linkText || "Read More"), 11, Z)) : d("v-if", !0)
|
|
158
158
|
],
|
|
159
159
|
2
|
|
160
160
|
/* CLASS */
|
|
@@ -172,57 +172,43 @@ const F = { class: "swiper-wrapper" }, T = ["href"], U = ["disabled"], X = ["dis
|
|
|
172
172
|
2
|
|
173
173
|
/* CLASS */
|
|
174
174
|
),
|
|
175
|
-
|
|
175
|
+
n(
|
|
176
176
|
"div",
|
|
177
177
|
{
|
|
178
178
|
class: i(`${s(e)}-swiper-showcase__nav`)
|
|
179
179
|
},
|
|
180
180
|
[
|
|
181
|
-
|
|
181
|
+
n(
|
|
182
182
|
"div",
|
|
183
183
|
{
|
|
184
184
|
class: i(`${s(e)}-swiper-showcase__nav-wrap`)
|
|
185
185
|
},
|
|
186
186
|
[
|
|
187
|
-
|
|
187
|
+
n("button", {
|
|
188
188
|
type: "button",
|
|
189
|
-
class: i(
|
|
190
|
-
disabled:
|
|
189
|
+
class: i(m(!0)),
|
|
190
|
+
disabled: h.value,
|
|
191
191
|
"aria-label": "previous",
|
|
192
192
|
onClick: S
|
|
193
193
|
}, [
|
|
194
194
|
(o(), l(
|
|
195
195
|
"svg",
|
|
196
196
|
{
|
|
197
|
-
"aria-hidden": "true",
|
|
198
197
|
class: i(`${s(e)}-swiper-showcase__nav-icon ${s(e)}-swiper-showcase__nav-icon--prev`),
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
198
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
199
|
+
width: "25",
|
|
200
|
+
height: "24",
|
|
201
|
+
viewBox: "0 0 25 24",
|
|
202
|
+
fill: "none"
|
|
204
203
|
},
|
|
205
204
|
[...c[0] || (c[0] = [
|
|
206
|
-
|
|
207
|
-
"
|
|
208
|
-
{
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
"fill-opacity": "0.3"
|
|
214
|
-
}),
|
|
215
|
-
t("path", {
|
|
216
|
-
d: "M47.5 24C47.5 11.0213 36.9787 0.5 24 0.5C11.0213 0.5 0.5 11.0213 0.5 24C0.5 36.9787 11.0213 47.5 24 47.5C36.9787 47.5 47.5 36.9787 47.5 24Z",
|
|
217
|
-
stroke: "white",
|
|
218
|
-
"stroke-opacity": "0.1"
|
|
219
|
-
}),
|
|
220
|
-
t("path", {
|
|
221
|
-
id: "Rectangle 302 (Stroke)",
|
|
222
|
-
d: "M20.8076 14.8076L20.679 17.6098L27.0692 24L20.679 30.3902L20.8076 33.1924L30 24L20.8076 14.8076Z",
|
|
223
|
-
fill: "white"
|
|
224
|
-
})
|
|
225
|
-
],
|
|
205
|
+
n(
|
|
206
|
+
"path",
|
|
207
|
+
{
|
|
208
|
+
d: "M15.1289 3.12871L15.2531 5.83301L9.08609 12L15.2531 18.167L15.1289 20.8713L6.25766 12L15.1289 3.12871Z",
|
|
209
|
+
fill: "white"
|
|
210
|
+
},
|
|
211
|
+
null,
|
|
226
212
|
-1
|
|
227
213
|
/* CACHED */
|
|
228
214
|
)
|
|
@@ -231,45 +217,31 @@ const F = { class: "swiper-wrapper" }, T = ["href"], U = ["disabled"], X = ["dis
|
|
|
231
217
|
/* CLASS */
|
|
232
218
|
))
|
|
233
219
|
], 10, U),
|
|
234
|
-
|
|
220
|
+
n("button", {
|
|
235
221
|
type: "button",
|
|
236
|
-
class: i(
|
|
222
|
+
class: i(m(!1)),
|
|
237
223
|
disabled: _.value,
|
|
238
224
|
"aria-label": "next",
|
|
239
|
-
onClick:
|
|
225
|
+
onClick: P
|
|
240
226
|
}, [
|
|
241
227
|
(o(), l(
|
|
242
228
|
"svg",
|
|
243
229
|
{
|
|
244
|
-
|
|
245
|
-
class: i(`${s(e)}-swiper-showcase__nav-icon`),
|
|
246
|
-
width: "
|
|
247
|
-
height: "
|
|
248
|
-
viewBox: "0 0
|
|
249
|
-
fill: "none"
|
|
250
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
230
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
231
|
+
class: i(`${s(e)}-swiper-showcase__nav-icon ${s(e)}-swiper-showcase__nav-icon--next`),
|
|
232
|
+
width: "24",
|
|
233
|
+
height: "24",
|
|
234
|
+
viewBox: "0 0 24 24",
|
|
235
|
+
fill: "none"
|
|
251
236
|
},
|
|
252
237
|
[...c[1] || (c[1] = [
|
|
253
|
-
|
|
254
|
-
"
|
|
255
|
-
{
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
"fill-opacity": "0.3"
|
|
261
|
-
}),
|
|
262
|
-
t("path", {
|
|
263
|
-
d: "M47.5 24C47.5 11.0213 36.9787 0.5 24 0.5C11.0213 0.5 0.5 11.0213 0.5 24C0.5 36.9787 11.0213 47.5 24 47.5C36.9787 47.5 47.5 36.9787 47.5 24Z",
|
|
264
|
-
stroke: "white",
|
|
265
|
-
"stroke-opacity": "0.1"
|
|
266
|
-
}),
|
|
267
|
-
t("path", {
|
|
268
|
-
id: "Rectangle 302 (Stroke)",
|
|
269
|
-
d: "M20.8076 14.8076L20.679 17.6098L27.0692 24L20.679 30.3902L20.8076 33.1924L30 24L20.8076 14.8076Z",
|
|
270
|
-
fill: "white"
|
|
271
|
-
})
|
|
272
|
-
],
|
|
238
|
+
n(
|
|
239
|
+
"path",
|
|
240
|
+
{
|
|
241
|
+
d: "M9.64299 3.12871L9.51887 5.83301L15.6859 12L9.51887 18.167L9.64299 20.8713L18.5143 12L9.64299 3.12871Z",
|
|
242
|
+
fill: "white"
|
|
243
|
+
},
|
|
244
|
+
null,
|
|
273
245
|
-1
|
|
274
246
|
/* CACHED */
|
|
275
247
|
)
|
|
@@ -292,7 +264,7 @@ const F = { class: "swiper-wrapper" }, T = ["href"], U = ["disabled"], X = ["dis
|
|
|
292
264
|
)) : d("v-if", !0);
|
|
293
265
|
}
|
|
294
266
|
});
|
|
295
|
-
g.install = (
|
|
267
|
+
g.install = (u) => (u.component("ScSwiperShowcase", g), u);
|
|
296
268
|
const H = g;
|
|
297
269
|
export {
|
|
298
270
|
H as ScSwiperShowcase
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e=require("vue"),H=require("./swiper-bundle-gkukcY4l.cjs"),n=require("./_vars-CyrPevgT.cjs");require("./cjs/accordion-info-panel.cjs");require("./cjs/animated-number.cjs");require("./cjs/checkbox.cjs");require("./cjs/col.cjs");require("./cjs/config-provider.cjs");require("./cjs/date-picker.cjs");require("./cjs/date-select.cjs");require("./cjs/drawer.cjs");require("./cjs/dropdown.cjs");require("./cjs/gradual-highlight.cjs");const X=require("@vavt/util");require("./cjs/input.cjs");const V=require("./cjs/layz-image.cjs");require("./cjs/parameter-box.cjs");require("./cjs/radio.cjs");require("./cjs/row.cjs");require("./cjs/select.cjs");require("./cjs/swiper-showcase.cjs");require("./cjs/swiper-vehicle.cjs");const q=require("./cjs/tab-indicator.cjs"),$=require("./cjs/video.cjs"),W=["innerHTML"],O=["innerHTML"],U=["innerHTML"],D=["innerHTML"],A=e.defineComponent({__name:"pc-viewer",props:{title:{},desc:{},dataList:{},extraTopSpacing:{default:0},extraBottomSpacing:{default:0}},setup(l){const p=l,a=e.ref(),v=e.ref(),o=e.ref(),d=e.ref(),f=e.ref(),i=e.ref(),h=e.reactive({container:"",root:"",item:""}),u=r=>typeof r!="number"||Number.isNaN(r)?0:r,g=(r,s,c)=>{const k=Math.min(Math.max(r,0),c),_=Math.min(Math.max(s,0),Math.max(c-k,0));return{safeTop:k,safeBottom:_}},B=()=>{var b;if(!o.value)return;const r=o.value.offsetHeight,s=window.innerHeight,c=((b=i.value)==null?void 0:b.offsetHeight)||0,k=m(i.value),_=u(p.extraTopSpacing),E=u(p.extraBottomSpacing),{safeTop:I,safeBottom:L}=g(_,E,s),C=Math.max(s-I-L,0),z=Math.max((C-c-r-k)/2,0),M=I+z,N=L+z;h.container=`padding-top: ${M}px; padding-bottom: ${N}px; min-height: ${s}px;`;const x=o.value.scrollWidth;h.root=`height: ${Math.max(x,s)}px`},t=()=>{const r=document.documentElement.getAttribute("dir")||"ltr",s=r==="rtl"?"right":"left";if(!a.value||!o.value||!d.value||!f.value)return;const k=a.value.clientHeight-window.innerHeight,{offsetTop:_}=X.getRootOffset(a.value),E=document.documentElement.scrollTop-_;if(E<0){o.value.scrollTo({left:0}),f.value.style[s]="0px";return}if(E>k){const z=o.value.scrollWidth-window.innerWidth;o.value.scrollTo({left:r==="rtl"?-z:z}),f.value.style[s]=d.value.clientWidth-f.value.clientWidth+"px";return}const I=E/k,L=I*(o.value.scrollWidth-window.innerWidth),C=I*(d.value.clientWidth*2/3);o.value.scrollTo({left:r==="rtl"?-L:L}),f.value.style[s]=`${C}px`},w=()=>{h.container="",B()},m=r=>{if(!(r instanceof HTMLElement))return 0;const s=window.getComputedStyle(r),c=parseFloat(s.marginTop)||0,k=parseFloat(s.marginBottom)||0;return c+k};let y;return e.watch(()=>[p.extraTopSpacing,p.extraBottomSpacing],()=>{h.container="",B()}),e.onMounted(()=>{y=new IntersectionObserver(r=>{r.forEach(s=>{s.isIntersecting&&(h.container="",B())})},{root:null,rootMargin:"200px 0px 200px 0px",threshold:0}),window.addEventListener("scroll",t),window.addEventListener("resize",w),a.value&&y.observe(a.value)}),e.onBeforeUnmount(()=>{window.removeEventListener("scroll",t),window.removeEventListener("resize",w),y&&y.disconnect()}),(r,s)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"rootRef",ref:a,class:e.normalizeClass(`${e.unref(n.PREFIX)}-horizontal-viewer`),style:e.normalizeStyle(h.root)},[e.createElementVNode("div",{ref_key:"containerRef",ref:v,class:e.normalizeClass([`${e.unref(n.PREFIX)}-horizontal-viewer__container`,(r.title||r.desc)&&"has-header"]),style:e.normalizeStyle(h.container)},[r.title||r.desc?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(`${e.unref(n.PREFIX)}-horizontal-viewer__header`),ref_key:"headerRef",ref:i},[r.title?(e.openBlock(),e.createElementBlock("p",{key:0,innerHTML:r.title},null,8,W)):e.createCommentVNode("v-if",!0),r.desc?(e.openBlock(),e.createElementBlock("p",{key:1,innerHTML:r.desc},null,8,O)):e.createCommentVNode("v-if",!0)],2)):e.createCommentVNode("v-if",!0),e.createElementVNode("div",{ref_key:"scrollerRef",ref:o,class:e.normalizeClass(`${e.unref(n.PREFIX)}-horizontal-viewer__scroller`)},[e.createElementVNode("div",{class:e.normalizeClass(`${e.unref(n.PREFIX)}-horizontal-viewer__content`)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.dataList,c=>(e.openBlock(),e.createElementBlock("div",{key:c.title,class:e.normalizeClass(`${e.unref(n.PREFIX)}-horizontal-viewer__content-item`)},[c.type==="img"?(e.openBlock(),e.createBlock(e.unref(V.ScLayzImage),{key:0,src:c.url,alt:c.alt},null,8,["src","alt"])):(e.openBlock(),e.createBlock(e.unref($.ScVideo),{key:1,url:c.url,poster:c.poster,"auto-play":!1},null,8,["url","poster"])),e.createElementVNode("div",{class:e.normalizeClass(`${e.unref(n.PREFIX)}-horizontal-viewer__content-item-footer`)},[e.createElementVNode("p",{innerHTML:c.title},null,8,U),e.createElementVNode("p",{innerHTML:c.desc},null,8,D)],2)],2))),128))],2)],2),e.createElementVNode("div",{ref_key:"paginationRef",ref:d,class:e.normalizeClass(`${e.unref(n.PREFIX)}-horizontal-viewer__pagination`)},[e.createElementVNode("div",{class:e.normalizeClass(`${e.unref(n.PREFIX)}-horizontal-viewer__scrollbar`)},[e.createElementVNode("div",{ref_key:"scrollbarDragRef",ref:f,class:e.normalizeClass(`${e.unref(n.PREFIX)}-horizontal-viewer__scrollbar-drag`)},null,2)],2)],2)],6)],6))}}),Y=e.defineComponent({__name:"mb-viewer",props:{title:{},desc:{},isMobile:{type:Boolean},extraTopSpacing:{},extraBottomSpacing:{},modelValue:{},dataList:{},swiperOptions:{},effect:{},showIntro:{type:Boolean},videoProps:{},indicatorClass:{},tabIndicatorBottom:{},widthType:{},indicatorType:{},showIndicator:{type:Boolean},indicatorPosition:{}},setup(l){const p=l,a=e.ref();return(v,o)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"rootRef",ref:a,class:e.normalizeClass(`${e.unref(n.PREFIX)}-horizontal-viewer-mb`)},[e.createVNode(e.unref(F),e.mergeProps(p,{indicatorType:"image"}),null,16)],2))}}),R=e.defineComponent({__name:"horizontal-viewer",props:{title:{},desc:{},isMobile:{type:Boolean},extraTopSpacing:{},extraBottomSpacing:{},modelValue:{},dataList:{},swiperOptions:{},effect:{},showIntro:{type:Boolean},videoProps:{},indicatorClass:{},tabIndicatorBottom:{},widthType:{},indicatorType:{},showIndicator:{type:Boolean,default:!0},indicatorPosition:{}},setup(l){const p=l;return(a,v)=>a.isMobile?(e.openBlock(),e.createBlock(Y,e.normalizeProps(e.mergeProps({key:0},p)),null,16)):(e.openBlock(),e.createBlock(A,e.normalizeProps(e.mergeProps({key:1},p)),null,16))}});R.install=l=>(l.component("ScHorizontalViewer",R),l);const Z=R,j=["onClick"],G=["innerHTML"],J=["innerHTML"],P=e.defineComponent({__name:"image-indicator",props:{dataList:{},showIntro:{type:Boolean,default:!0}},emits:["change"],setup(l,{emit:p}){const a=p,v=e.ref(0),o=e.ref([]),d=e.computed(()=>{const i=o.value[v.value];return{height:`${i==null?void 0:i.offsetHeight}px`}}),f=i=>{v.value=i,a("change",i)};return(i,h)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`${e.unref(n.PREFIX)}-image-indicator`)},[e.createElementVNode("div",{class:e.normalizeClass(`${e.unref(n.PREFIX)}-image-indicator__list`)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.dataList,(u,g)=>(e.openBlock(),e.createElementBlock("div",{key:u.url,class:e.normalizeClass([`${e.unref(n.PREFIX)}-image-indicator__list-item`,v.value===g?`${e.unref(n.PREFIX)}-image-indicator__active`:""]),onClick:B=>f(g)},[e.createVNode(e.unref(V.ScLayzImage),{src:u.url,alt:u.alt},null,8,["src","alt"])],10,j))),128))],2),i.showIntro?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(`${e.unref(n.PREFIX)}-image-indicator__intro`),style:e.normalizeStyle(d.value)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.dataList,(u,g)=>(e.openBlock(),e.createElementBlock("div",{key:u.url,ref_for:!0,ref_key:"introItemRef",ref:o,class:e.normalizeClass([`${e.unref(n.PREFIX)}-image-indicator__intro-item`,v.value===g&&`${e.unref(n.PREFIX)}-image-indicator__active`])},[u.title?(e.openBlock(),e.createElementBlock("p",{key:0,class:e.normalizeClass(`${e.unref(n.PREFIX)}-image-indicator__intro-title`),innerHTML:u.title},null,10,G)):e.createCommentVNode("v-if",!0),u.desc?(e.openBlock(),e.createElementBlock("p",{key:1,class:e.normalizeClass(`${e.unref(n.PREFIX)}-image-indicator__intro-desc`),innerHTML:u.desc},null,10,J)):e.createCommentVNode("v-if",!0)],2))),128))],6)):e.createCommentVNode("v-if",!0)],2))}});P.install=l=>(l.component("ScImageIndicator",P),l);const T=P,K={class:"swiper-wrapper"},S=e.defineComponent({__name:"swiper-normal",props:{modelValue:{default:0},dataList:{},swiperOptions:{default:()=>({})},effect:{},showIntro:{type:Boolean,default:!0},videoProps:{},indicatorClass:{},tabIndicatorBottom:{},widthType:{default:"full"},indicatorType:{default:"tab"},showIndicator:{type:Boolean,default:!0},indicatorPosition:{default:"relative"}},emits:["change","update:modelValue"],setup(l,{emit:p}){const a=l,v=p;let o=null;const d=e.ref(a.modelValue),f=e.ref(),i=e.computed(()=>{const t=[`${n.PREFIX}-swiper-main`];return a.widthType==="middle"?t.push(`${n.PREFIX}-swiper-main__middle`):t.push(`${n.PREFIX}-swiper-main__full`),t}),h=e.computed(()=>{const t={};return a.tabIndicatorBottom&&(t.position="absolute",t.zIndex=1,t.bottom=typeof a.tabIndicatorBottom=="number"?`${a.tabIndicatorBottom}px`:a.tabIndicatorBottom),t});e.watch(()=>a.modelValue,()=>{d.value=a.modelValue,g(d.value)});const u=e.computed(()=>a.dataList.map(t=>({...t,url:t.type==="img"?t.url||"":t.poster||""}))),g=t=>{o==null||o.slideTo(t)},B=()=>{o==null||o.destroy(),f.value&&(o=new H.Swiper(f.value,{slidesPerView:1,allowTouchMove:!1,effect:a.effect,navigation:{nextEl:".swiper-button-next",prevEl:".swiper-button-prev"},...a.swiperOptions}),o.on("slideChange",t=>{d.value=t.activeIndex,v("change",t.activeIndex),v("update:modelValue",t.activeIndex)}))};return e.onMounted(()=>{B(),window.addEventListener("resize",B)}),e.onBeforeUnmount(()=>{o==null||o.destroy(),window.removeEventListener("resize",B)}),(t,w)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`${e.unref(n.PREFIX)}-swiper`)},[e.createElementVNode("div",{ref_key:"swiperRef",ref:f,class:e.normalizeClass(i.value)},[e.createElementVNode("div",K,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.dataList,(m,y)=>(e.openBlock(),e.createElementBlock("div",{key:m.title,class:"swiper-slide"},[m.type==="img"?(e.openBlock(),e.createBlock(e.unref(V.ScLayzImage),{key:0,src:m.url,alt:m.alt},null,8,["src","alt"])):(e.openBlock(),e.createBlock(e.unref($.ScVideo),e.mergeProps({key:1,ref_for:!0},t.videoProps,{url:m.url,poster:m.poster,playable:d.value===y}),null,16,["url","poster","playable"])),m.mask?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass(`${e.unref(n.PREFIX)}-swiper-mask`)},null,2)):e.createCommentVNode("v-if",!0)]))),128))]),w[2]||(w[2]=e.createStaticVNode('<div class="swiper-button-next"><svg xmlns="http://www.w3.org/2000/svg" width="25" height="24" viewBox="0 0 25 24" fill="none"><path d="M9.64299 3.12871L9.51887 5.83301L15.6859 12L9.51887 18.167L9.64299 20.8713L18.5143 12L9.64299 3.12871Z" fill="white"></path></svg></div><div class="swiper-button-prev"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none"><path d="M15.1289 3.12871L15.2531 5.83301L9.08609 12L15.2531 18.167L15.1289 20.8713L6.25766 12L15.1289 3.12871Z" fill="white"></path></svg></div>',2))],2),t.showIndicator?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[t.indicatorType==="tab"?(e.openBlock(),e.createBlock(e.unref(q.ScTabIndicator),{key:0,modelValue:d.value,"onUpdate:modelValue":w[0]||(w[0]=m=>d.value=m),class:e.normalizeClass([t.indicatorClass,t.indicatorPosition==="absolute"&&`${e.unref(n.PREFIX)}-swiper-indicator-absolute`]),dataList:t.dataList,"show-intro":t.showIntro,style:e.normalizeStyle(h.value),onChange:g},null,8,["modelValue","class","dataList","show-intro","style"])):(e.openBlock(),e.createBlock(e.unref(T),{key:1,modelValue:d.value,"onUpdate:modelValue":w[1]||(w[1]=m=>d.value=m),dataList:u.value,onChange:g},null,8,["modelValue","dataList"]))],64)):e.createCommentVNode("v-if",!0)],2))}});S.install=l=>(l.component("ScSwiperNormal",S),l);const F=S;exports.ScHorizontalViewer=Z;exports.ScImageIndicator=T;exports.ScSwiperNormal=F;
|
|
@@ -6,7 +6,7 @@ import "./es/animated-number.mjs";
|
|
|
6
6
|
import "./es/checkbox.mjs";
|
|
7
7
|
import "./es/col.mjs";
|
|
8
8
|
import "./es/config-provider.mjs";
|
|
9
|
-
import "./
|
|
9
|
+
import "./es/date-picker.mjs";
|
|
10
10
|
import "./es/date-select.mjs";
|
|
11
11
|
import "./es/drawer.mjs";
|
|
12
12
|
import "./es/dropdown.mjs";
|