@seresweb/website-component 2.3.4 → 2.3.5
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),B=require("../swiper-bundle-gkukcY4l.cjs"),n=require("../_vars-CyrPevgT.cjs"),f=require("./layz-image.cjs"),b={class:"swiper-wrapper"},
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),B=require("../swiper-bundle-gkukcY4l.cjs"),n=require("../_vars-CyrPevgT.cjs"),f=require("./layz-image.cjs"),b={class:"swiper-wrapper"},E=["onClick"],y=["innerHTML"],u=e.defineComponent({__name:"swiper-vehicle",props:{modelValue:{default:0},backgroundImgUrl:{},backgroundImgAlt:{},dataList:{},imgFullHeightInMobile:{type:Boolean},swiperOptions:{default:()=>({})},effect:{default:"fade"},indicatorClass:{},tabIndicatorBottom:{},showTextBackground:{type:Boolean}},emits:["change","update:modelValue"],setup(s,{emit:v}){const o=s,d=v;let l=null;const r=e.ref(o.modelValue),c=e.ref(),g=e.computed(()=>{const t={};return o.tabIndicatorBottom&&(t.position="absolute",t.zIndex=1,t.left="50%",t.bottom=typeof o.tabIndicatorBottom=="number"?`${o.tabIndicatorBottom}px`:o.tabIndicatorBottom,t.transform="translateX(-50%)"),t}),k=e.computed(()=>o.dataList[r.value].text);e.watch(()=>o.modelValue,t=>{r.value!==t&&(r.value=t,p(r.value))});const p=t=>{l==null||l.slideTo(t)},i=()=>{l==null||l.destroy(),c.value&&(l=new B.Swiper(c.value,{slidesPerView:1,allowTouchMove:!1,effect:o.effect,autoplay:!0,...o.swiperOptions}),l.on("realIndexChange",t=>{r.value=t.realIndex,d("change",t.realIndex),d("update:modelValue",t.realIndex)}))},I=()=>{(l==null?void 0:l.params.autoplay).enabled&&(l==null||l.autoplay.start())},h=()=>{(l==null?void 0:l.params.autoplay).enabled&&(l==null||l.autoplay.stop())};return e.onMounted(()=>{i(),window.addEventListener("resize",i)}),e.onBeforeUnmount(()=>{l==null||l.destroy(),window.removeEventListener("resize",i)}),(t,w)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([`${e.unref(n.PREFIX)}-swiper-vehicle`])},[t.backgroundImgUrl?(e.openBlock(),e.createBlock(e.unref(f.ScLayzImage),{key:0,class:e.normalizeClass(`${e.unref(n.PREFIX)}-swiper-vehicle__bg`),src:t.backgroundImgUrl,alt:t.backgroundImgAlt},null,8,["class","src","alt"])):e.createCommentVNode("v-if",!0),e.createElementVNode("div",{ref_key:"swiperRef",ref:c,class:e.normalizeClass([`${e.unref(n.PREFIX)}-swiper-vehicle__main`])},[e.createElementVNode("div",b,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.dataList,a=>(e.openBlock(),e.createElementBlock("div",{key:a.url,class:"swiper-slide"},[t.showTextBackground?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(`${e.unref(n.PREFIX)}-swiper-vehicle__text-bg`)},e.toDisplayString(a.text),3)):e.createCommentVNode("v-if",!0),e.createVNode(e.unref(f.ScLayzImage),{class:e.normalizeClass(t.imgFullHeightInMobile?`${e.unref(n.PREFIX)}-swiper-vehicle__full-height`:""),src:a.url,alt:a.alt},null,8,["class","src","alt"])]))),128))])],2),e.createElementVNode("div",{class:e.normalizeClass([`${e.unref(n.PREFIX)}-swiper-vehicle__indicator`,t.indicatorClass]),style:e.normalizeStyle(g.value)},[e.createElementVNode("div",{class:e.normalizeClass(`${e.unref(n.PREFIX)}-swiper-vehicle__indicator-control`)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.dataList,(a,m)=>(e.openBlock(),e.createElementBlock("div",{key:a.color,class:e.normalizeClass([r.value===m&&"active","color-stroke"]),style:e.normalizeStyle({"background-color":a.color,"border-color":a.color}),onClick:z=>p(m),onMouseenter:h,onMouseleave:I},null,46,E))),128))],2),e.createElementVNode("div",{class:e.normalizeClass(`${e.unref(n.PREFIX)}-swiper-vehicle__indicator-text`),innerHTML:k.value},null,10,y)],6)],2))}});u.install=s=>(s.component("ScSwiperVehicle",u),s);const _=u;exports.ScSwiperVehicle=_;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { S as
|
|
3
|
-
import { P as
|
|
4
|
-
import { ScLayzImage as
|
|
5
|
-
const
|
|
1
|
+
import { defineComponent as x, ref as b, computed as I, watch as T, onMounted as z, onBeforeUnmount as E, createElementBlock as c, openBlock as s, normalizeClass as l, unref as o, createBlock as A, createCommentVNode as k, createElementVNode as u, Fragment as _, renderList as w, createVNode as F, toDisplayString as H, normalizeStyle as y } from "vue";
|
|
2
|
+
import { S as U } from "../swiper-bundle-DOQ1LV4x.js";
|
|
3
|
+
import { P as r } from "../_vars-BV4QQF-p.js";
|
|
4
|
+
import { ScLayzImage as B } from "./layz-image.mjs";
|
|
5
|
+
const N = { class: "swiper-wrapper" }, P = ["onClick"], R = ["innerHTML"], f = /* @__PURE__ */ x({
|
|
6
6
|
__name: "swiper-vehicle",
|
|
7
7
|
props: {
|
|
8
8
|
modelValue: { default: 0 },
|
|
@@ -17,14 +17,14 @@ const P = { class: "swiper-wrapper" }, R = ["onClick"], f = /* @__PURE__ */ M({
|
|
|
17
17
|
showTextBackground: { type: Boolean }
|
|
18
18
|
},
|
|
19
19
|
emits: ["change", "update:modelValue"],
|
|
20
|
-
setup(d, { emit:
|
|
21
|
-
const a = d, m =
|
|
20
|
+
setup(d, { emit: L }) {
|
|
21
|
+
const a = d, m = L;
|
|
22
22
|
let t = null;
|
|
23
|
-
const i = b(a.modelValue), p = b(),
|
|
23
|
+
const i = b(a.modelValue), p = b(), V = I(() => {
|
|
24
24
|
const e = {};
|
|
25
25
|
return a.tabIndicatorBottom && (e.position = "absolute", e.zIndex = 1, e.left = "50%", e.bottom = typeof a.tabIndicatorBottom == "number" ? `${a.tabIndicatorBottom}px` : a.tabIndicatorBottom, e.transform = "translateX(-50%)"), e;
|
|
26
|
-
}),
|
|
27
|
-
|
|
26
|
+
}), $ = I(() => a.dataList[i.value].text);
|
|
27
|
+
T(
|
|
28
28
|
() => a.modelValue,
|
|
29
29
|
(e) => {
|
|
30
30
|
i.value !== e && (i.value = e, g(i.value));
|
|
@@ -33,7 +33,7 @@ const P = { class: "swiper-wrapper" }, R = ["onClick"], f = /* @__PURE__ */ M({
|
|
|
33
33
|
const g = (e) => {
|
|
34
34
|
t == null || t.slideTo(e);
|
|
35
35
|
}, v = () => {
|
|
36
|
-
t == null || t.destroy(), p.value && (t = new
|
|
36
|
+
t == null || t.destroy(), p.value && (t = new U(p.value, {
|
|
37
37
|
slidesPerView: 1,
|
|
38
38
|
allowTouchMove: !1,
|
|
39
39
|
effect: a.effect,
|
|
@@ -42,24 +42,24 @@ const P = { class: "swiper-wrapper" }, R = ["onClick"], f = /* @__PURE__ */ M({
|
|
|
42
42
|
}), t.on("realIndexChange", (e) => {
|
|
43
43
|
i.value = e.realIndex, m("change", e.realIndex), m("update:modelValue", e.realIndex);
|
|
44
44
|
}));
|
|
45
|
-
},
|
|
45
|
+
}, C = () => {
|
|
46
46
|
(t == null ? void 0 : t.params.autoplay).enabled && (t == null || t.autoplay.start());
|
|
47
|
-
},
|
|
47
|
+
}, M = () => {
|
|
48
48
|
(t == null ? void 0 : t.params.autoplay).enabled && (t == null || t.autoplay.stop());
|
|
49
49
|
};
|
|
50
|
-
return
|
|
50
|
+
return z(() => {
|
|
51
51
|
v(), window.addEventListener("resize", v);
|
|
52
|
-
}),
|
|
52
|
+
}), E(() => {
|
|
53
53
|
t == null || t.destroy(), window.removeEventListener("resize", v);
|
|
54
|
-
}), (e,
|
|
54
|
+
}), (e, O) => (s(), c(
|
|
55
55
|
"div",
|
|
56
56
|
{
|
|
57
|
-
class: l([`${o(
|
|
57
|
+
class: l([`${o(r)}-swiper-vehicle`])
|
|
58
58
|
},
|
|
59
59
|
[
|
|
60
|
-
e.backgroundImgUrl ? (
|
|
60
|
+
e.backgroundImgUrl ? (s(), A(o(B), {
|
|
61
61
|
key: 0,
|
|
62
|
-
class: l(`${o(
|
|
62
|
+
class: l(`${o(r)}-swiper-vehicle__bg`),
|
|
63
63
|
src: e.backgroundImgUrl,
|
|
64
64
|
alt: e.backgroundImgAlt
|
|
65
65
|
}, null, 8, ["class", "src", "alt"])) : k("v-if", !0),
|
|
@@ -68,31 +68,31 @@ const P = { class: "swiper-wrapper" }, R = ["onClick"], f = /* @__PURE__ */ M({
|
|
|
68
68
|
{
|
|
69
69
|
ref_key: "swiperRef",
|
|
70
70
|
ref: p,
|
|
71
|
-
class: l([`${o(
|
|
71
|
+
class: l([`${o(r)}-swiper-vehicle__main`])
|
|
72
72
|
},
|
|
73
73
|
[
|
|
74
|
-
u("div",
|
|
75
|
-
(
|
|
74
|
+
u("div", N, [
|
|
75
|
+
(s(!0), c(
|
|
76
76
|
_,
|
|
77
77
|
null,
|
|
78
|
-
w(e.dataList, (
|
|
79
|
-
key:
|
|
78
|
+
w(e.dataList, (n) => (s(), c("div", {
|
|
79
|
+
key: n.url,
|
|
80
80
|
class: "swiper-slide"
|
|
81
81
|
}, [
|
|
82
|
-
e.showTextBackground ? (
|
|
82
|
+
e.showTextBackground ? (s(), c(
|
|
83
83
|
"span",
|
|
84
84
|
{
|
|
85
85
|
key: 0,
|
|
86
|
-
class: l(`${o(
|
|
86
|
+
class: l(`${o(r)}-swiper-vehicle__text-bg`)
|
|
87
87
|
},
|
|
88
|
-
|
|
88
|
+
H(n.text),
|
|
89
89
|
3
|
|
90
90
|
/* TEXT, CLASS */
|
|
91
91
|
)) : k("v-if", !0),
|
|
92
|
-
|
|
93
|
-
class: l(e.imgFullHeightInMobile ? `${o(
|
|
94
|
-
src:
|
|
95
|
-
alt:
|
|
92
|
+
F(o(B), {
|
|
93
|
+
class: l(e.imgFullHeightInMobile ? `${o(r)}-swiper-vehicle__full-height` : ""),
|
|
94
|
+
src: n.url,
|
|
95
|
+
alt: n.alt
|
|
96
96
|
}, null, 8, ["class", "src", "alt"])
|
|
97
97
|
]))),
|
|
98
98
|
128
|
|
@@ -106,27 +106,27 @@ const P = { class: "swiper-wrapper" }, R = ["onClick"], f = /* @__PURE__ */ M({
|
|
|
106
106
|
u(
|
|
107
107
|
"div",
|
|
108
108
|
{
|
|
109
|
-
class: l([`${o(
|
|
110
|
-
style:
|
|
109
|
+
class: l([`${o(r)}-swiper-vehicle__indicator`, e.indicatorClass]),
|
|
110
|
+
style: y(V.value)
|
|
111
111
|
},
|
|
112
112
|
[
|
|
113
113
|
u(
|
|
114
114
|
"div",
|
|
115
115
|
{
|
|
116
|
-
class: l(`${o(
|
|
116
|
+
class: l(`${o(r)}-swiper-vehicle__indicator-control`)
|
|
117
117
|
},
|
|
118
118
|
[
|
|
119
|
-
(
|
|
119
|
+
(s(!0), c(
|
|
120
120
|
_,
|
|
121
121
|
null,
|
|
122
|
-
w(e.dataList, (
|
|
123
|
-
key:
|
|
122
|
+
w(e.dataList, (n, h) => (s(), c("div", {
|
|
123
|
+
key: n.color,
|
|
124
124
|
class: l([i.value === h && "active", "color-stroke"]),
|
|
125
|
-
style:
|
|
126
|
-
onClick: (
|
|
127
|
-
onMouseenter:
|
|
128
|
-
onMouseleave:
|
|
129
|
-
}, null, 46,
|
|
125
|
+
style: y({ "background-color": n.color, "border-color": n.color }),
|
|
126
|
+
onClick: (X) => g(h),
|
|
127
|
+
onMouseenter: M,
|
|
128
|
+
onMouseleave: C
|
|
129
|
+
}, null, 46, P))),
|
|
130
130
|
128
|
|
131
131
|
/* KEYED_FRAGMENT */
|
|
132
132
|
))
|
|
@@ -134,15 +134,10 @@ const P = { class: "swiper-wrapper" }, R = ["onClick"], f = /* @__PURE__ */ M({
|
|
|
134
134
|
2
|
|
135
135
|
/* CLASS */
|
|
136
136
|
),
|
|
137
|
-
u(
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
},
|
|
142
|
-
y(L.value),
|
|
143
|
-
3
|
|
144
|
-
/* TEXT, CLASS */
|
|
145
|
-
)
|
|
137
|
+
u("div", {
|
|
138
|
+
class: l(`${o(r)}-swiper-vehicle__indicator-text`),
|
|
139
|
+
innerHTML: $.value
|
|
140
|
+
}, null, 10, R)
|
|
146
141
|
],
|
|
147
142
|
6
|
|
148
143
|
/* CLASS, STYLE */
|
|
@@ -154,7 +149,7 @@ const P = { class: "swiper-wrapper" }, R = ["onClick"], f = /* @__PURE__ */ M({
|
|
|
154
149
|
}
|
|
155
150
|
});
|
|
156
151
|
f.install = (d) => (d.component("ScSwiperVehicle", f), d);
|
|
157
|
-
const
|
|
152
|
+
const J = f;
|
|
158
153
|
export {
|
|
159
|
-
|
|
154
|
+
J as ScSwiperVehicle
|
|
160
155
|
};
|