@seresweb/website-component 2.0.0
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/README.md +144 -0
- package/dist/_vars-BV4QQF-p.js +4 -0
- package/dist/_vars-CyrPevgT.cjs +1 -0
- package/dist/cjs/Input.cjs +1 -0
- package/dist/cjs/accordion-info-panel.cjs +1 -0
- package/dist/cjs/animated-number.cjs +1 -0
- package/dist/cjs/drawer.cjs +1 -0
- package/dist/cjs/dropdown.cjs +1 -0
- package/dist/cjs/gradual-highlight.cjs +1 -0
- package/dist/cjs/horizontal-viewer.cjs +1 -0
- package/dist/cjs/image-indicator.cjs +1 -0
- package/dist/cjs/index.cjs +1 -0
- package/dist/cjs/layz-image.cjs +1 -0
- package/dist/cjs/parameter-box.cjs +1 -0
- package/dist/cjs/radio.cjs +1 -0
- package/dist/cjs/swiper-normal.cjs +1 -0
- package/dist/cjs/swiper-vehicle.cjs +1 -0
- package/dist/cjs/tab-indicator.cjs +1 -0
- package/dist/cjs/video.cjs +1 -0
- package/dist/css/accordion-info-panel.css +1 -0
- package/dist/css/drawer.css +1 -0
- package/dist/css/dropdown.css +1 -0
- package/dist/css/gradual-highlight.css +1 -0
- package/dist/css/horizontal-viewer.css +1 -0
- package/dist/css/image-indicator.css +1 -0
- package/dist/css/input.css +1 -0
- package/dist/css/layz-image.css +1 -0
- package/dist/css/parameter-box.css +1 -0
- package/dist/css/radio.css +1 -0
- package/dist/css/swiper-normal.css +1 -0
- package/dist/css/swiper-vehicle.css +1 -0
- package/dist/css/tab-indicator.css +1 -0
- package/dist/css/video.css +1 -0
- package/dist/es/Input.mjs +70 -0
- package/dist/es/accordion-info-panel.mjs +145 -0
- package/dist/es/animated-number.mjs +72 -0
- package/dist/es/drawer.mjs +174 -0
- package/dist/es/dropdown.mjs +62 -0
- package/dist/es/gradual-highlight.mjs +90 -0
- package/dist/es/horizontal-viewer.mjs +4 -0
- package/dist/es/image-indicator.mjs +4 -0
- package/dist/es/index.mjs +60 -0
- package/dist/es/layz-image.mjs +51 -0
- package/dist/es/parameter-box.mjs +115 -0
- package/dist/es/radio.mjs +56 -0
- package/dist/es/swiper-normal.mjs +4 -0
- package/dist/es/swiper-vehicle.mjs +4 -0
- package/dist/es/tab-indicator.mjs +184 -0
- package/dist/es/video.mjs +246 -0
- package/dist/global.d.ts +22 -0
- package/dist/index-BgNMAlW8.js +536 -0
- package/dist/index-BrggpRcU.js +5287 -0
- package/dist/index-DrnEpWXW.cjs +5 -0
- package/dist/index-LswhGmG3.cjs +1 -0
- package/dist/index.css +1 -0
- package/dist/scss/_animate.scss +132 -0
- package/dist/scss/_vars.scss +1 -0
- package/dist/scss/accordion-info-panel.scss +104 -0
- package/dist/scss/drawer.scss +64 -0
- package/dist/scss/dropdown.scss +21 -0
- package/dist/scss/gradual-highlight.scss +26 -0
- package/dist/scss/horizontal-viewer.scss +161 -0
- package/dist/scss/image-indicator.scss +79 -0
- package/dist/scss/index.scss +17 -0
- package/dist/scss/input.scss +46 -0
- package/dist/scss/layz-image.scss +11 -0
- package/dist/scss/parameter-box.scss +94 -0
- package/dist/scss/radio.scss +70 -0
- package/dist/scss/swiper-normal.scss +117 -0
- package/dist/scss/swiper-vehicle.scss +123 -0
- package/dist/scss/tab-indicator.scss +148 -0
- package/dist/scss/video.scss +169 -0
- package/dist/types/components/Input/Input.vue.d.ts +26 -0
- package/dist/types/components/Input/index.d.ts +6 -0
- package/dist/types/components/Input/type.d.ts +9 -0
- package/dist/types/components/_utils.d.ts +1 -0
- package/dist/types/components/_vars.d.ts +1 -0
- package/dist/types/components/accordion-info-panel/accordion-info-panel.vue.d.ts +5 -0
- package/dist/types/components/accordion-info-panel/index.d.ts +6 -0
- package/dist/types/components/accordion-info-panel/type.d.ts +26 -0
- package/dist/types/components/animated-number/animated-number.vue.d.ts +12 -0
- package/dist/types/components/animated-number/index.d.ts +6 -0
- package/dist/types/components/animated-number/type.d.ts +50 -0
- package/dist/types/components/drawer/drawer.vue.d.ts +37 -0
- package/dist/types/components/drawer/index.d.ts +6 -0
- package/dist/types/components/drawer/type.d.ts +43 -0
- package/dist/types/components/drawer/u.d.ts +1 -0
- package/dist/types/components/dropdown/dropdown.vue.d.ts +18 -0
- package/dist/types/components/dropdown/index.d.ts +5 -0
- package/dist/types/components/gradual-highlight/gradual-highlight.vue.d.ts +10 -0
- package/dist/types/components/gradual-highlight/index.d.ts +6 -0
- package/dist/types/components/gradual-highlight/type.d.ts +17 -0
- package/dist/types/components/horizontal-viewer/horizontal-viewer.vue.d.ts +5 -0
- package/dist/types/components/horizontal-viewer/index.d.ts +6 -0
- package/dist/types/components/horizontal-viewer/mb-viewer.vue.d.ts +5 -0
- package/dist/types/components/horizontal-viewer/pc-viewer.vue.d.ts +15 -0
- package/dist/types/components/horizontal-viewer/type.d.ts +15 -0
- package/dist/types/components/image-indicator/image-indicator.vue.d.ts +11 -0
- package/dist/types/components/image-indicator/index.d.ts +6 -0
- package/dist/types/components/image-indicator/type.d.ts +18 -0
- package/dist/types/components/index.d.ts +21 -0
- package/dist/types/components/layz-image/index.d.ts +6 -0
- package/dist/types/components/layz-image/layz-image.vue.d.ts +3 -0
- package/dist/types/components/layz-image/type.d.ts +35 -0
- package/dist/types/components/parameter-box/index.d.ts +6 -0
- package/dist/types/components/parameter-box/parameter-box.vue.d.ts +6 -0
- package/dist/types/components/parameter-box/type.d.ts +46 -0
- package/dist/types/components/radio/index.d.ts +6 -0
- package/dist/types/components/radio/radio.vue.d.ts +9 -0
- package/dist/types/components/radio/type.d.ts +8 -0
- package/dist/types/components/resolver.d.ts +18 -0
- package/dist/types/components/swiper-normal/index.d.ts +6 -0
- package/dist/types/components/swiper-normal/swiper-normal.vue.d.ts +19 -0
- package/dist/types/components/swiper-normal/type.d.ts +79 -0
- package/dist/types/components/swiper-vehicle/index.d.ts +6 -0
- package/dist/types/components/swiper-vehicle/swiper-vehicle.vue.d.ts +15 -0
- package/dist/types/components/swiper-vehicle/type.d.ts +54 -0
- package/dist/types/components/tab-indicator/index.d.ts +6 -0
- package/dist/types/components/tab-indicator/tab-indicator.vue.d.ts +15 -0
- package/dist/types/components/tab-indicator/type.d.ts +28 -0
- package/dist/types/components/video/index.d.ts +6 -0
- package/dist/types/components/video/type.d.ts +38 -0
- package/dist/types/components/video/video-wrapper.vue.d.ts +33 -0
- package/dist/types/components/video/video.vue.d.ts +183 -0
- package/package.json +48 -0
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
import { defineComponent as B, ref as _, watch as H, onMounted as W, onBeforeUnmount as C, watchEffect as z, createElementBlock as p, openBlock as h, normalizeClass as s, unref as r, createElementVNode as $, createCommentVNode as F, Fragment as T, renderList as I, normalizeStyle as V } from "vue";
|
|
2
|
+
import { P as o } from "../_vars-BV4QQF-p.js";
|
|
3
|
+
const X = (n, L, u = 500) => {
|
|
4
|
+
if (!n) return;
|
|
5
|
+
const b = n.scrollLeft;
|
|
6
|
+
let a = null;
|
|
7
|
+
const f = (t) => {
|
|
8
|
+
a || (a = t);
|
|
9
|
+
const l = t - a;
|
|
10
|
+
if (l >= u)
|
|
11
|
+
n.scrollLeft = L;
|
|
12
|
+
else {
|
|
13
|
+
const d = y(l, b, L - b, u);
|
|
14
|
+
n.scrollLeft = d, requestAnimationFrame(f);
|
|
15
|
+
}
|
|
16
|
+
}, y = (t, l, d, m) => (t /= m / 2, t < 1 ? d / 2 * t + l : (t--, -d / 2 * (t * (t - 2) - 1) + l));
|
|
17
|
+
requestAnimationFrame(f);
|
|
18
|
+
}, A = ["onClick", "innerHTML"], q = ["innerHTML"], S = /* @__PURE__ */ B({
|
|
19
|
+
__name: "tab-indicator",
|
|
20
|
+
props: {
|
|
21
|
+
modelValue: { default: 0 },
|
|
22
|
+
dataList: {},
|
|
23
|
+
showIntro: { type: Boolean },
|
|
24
|
+
isSeparate: { type: Boolean },
|
|
25
|
+
adapt2TextWidth: { type: Boolean }
|
|
26
|
+
},
|
|
27
|
+
emits: ["change", "update:modelValue"],
|
|
28
|
+
setup(n, { emit: L }) {
|
|
29
|
+
const u = n, b = L, a = _(), f = _([]), y = _([]), t = _(u.modelValue), l = _({ width: "0px", transform: "translateX(0)" }), d = _({}), m = () => {
|
|
30
|
+
const e = f.value[t.value], w = (e == null ? void 0 : e.offsetWidth) || 0, c = `translateX(${e == null ? void 0 : e.offsetLeft}px)`;
|
|
31
|
+
l.value = {
|
|
32
|
+
width: `${w}px`,
|
|
33
|
+
transform: c
|
|
34
|
+
};
|
|
35
|
+
const i = Math.max(...y.value.map((v) => v.offsetHeight));
|
|
36
|
+
d.value = {
|
|
37
|
+
height: `${i}px`
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
H(
|
|
41
|
+
() => u.modelValue,
|
|
42
|
+
() => {
|
|
43
|
+
t.value = u.modelValue;
|
|
44
|
+
}
|
|
45
|
+
);
|
|
46
|
+
const E = (e) => {
|
|
47
|
+
const w = document.documentElement.getAttribute("dir") || "ltr", i = f.value.map((v) => v.offsetWidth).slice(0, e).reduce((v, k, R) => v + (R + 1 === e ? k * 0.5 : k), 0);
|
|
48
|
+
X(a.value, w === "rtl" ? -i : i, 500);
|
|
49
|
+
}, M = (e) => {
|
|
50
|
+
E(e), t.value = e, b("change", e), b("update:modelValue", e);
|
|
51
|
+
};
|
|
52
|
+
let g = null;
|
|
53
|
+
return W(() => {
|
|
54
|
+
window.addEventListener("resize", m), a.value !== void 0 && (g = new IntersectionObserver(
|
|
55
|
+
([e]) => {
|
|
56
|
+
e.isIntersecting && m();
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
root: null,
|
|
60
|
+
// 相对于 viewport
|
|
61
|
+
rootMargin: "200px",
|
|
62
|
+
// 提前 200px 进入区域就触发
|
|
63
|
+
threshold: 0
|
|
64
|
+
// 元素刚进入就触发
|
|
65
|
+
}
|
|
66
|
+
), g.observe(a.value));
|
|
67
|
+
}), C(() => {
|
|
68
|
+
window.removeEventListener("resize", m), g && a.value && g.unobserve(a.value);
|
|
69
|
+
}), z(() => {
|
|
70
|
+
m();
|
|
71
|
+
}), (e, w) => (h(), p(
|
|
72
|
+
"div",
|
|
73
|
+
{
|
|
74
|
+
class: s([
|
|
75
|
+
`${r(o)}-tab-indicator`,
|
|
76
|
+
e.isSeparate && `${r(o)}-tab-indicator__separate`,
|
|
77
|
+
e.adapt2TextWidth && `${r(o)}-tab-indicator__adapt`
|
|
78
|
+
])
|
|
79
|
+
},
|
|
80
|
+
[
|
|
81
|
+
$(
|
|
82
|
+
"div",
|
|
83
|
+
{
|
|
84
|
+
ref_key: "scrollRef",
|
|
85
|
+
ref: a,
|
|
86
|
+
class: s(`${r(o)}-tab-indicator__scroll`)
|
|
87
|
+
},
|
|
88
|
+
[
|
|
89
|
+
$(
|
|
90
|
+
"div",
|
|
91
|
+
{
|
|
92
|
+
class: s(`${r(o)}-tab-indicator__wrap`)
|
|
93
|
+
},
|
|
94
|
+
[
|
|
95
|
+
$(
|
|
96
|
+
"div",
|
|
97
|
+
{
|
|
98
|
+
class: s(`${r(o)}-tab-indicator__main`)
|
|
99
|
+
},
|
|
100
|
+
[
|
|
101
|
+
(h(!0), p(
|
|
102
|
+
T,
|
|
103
|
+
null,
|
|
104
|
+
I(e.dataList, (c, i) => (h(), p("div", {
|
|
105
|
+
ref_for: !0,
|
|
106
|
+
ref_key: "indicatorItemRef",
|
|
107
|
+
ref: f,
|
|
108
|
+
key: c.title,
|
|
109
|
+
class: s([`${r(o)}-tab-indicator__item`, t.value === i && `${r(o)}-tab-indicator__active`]),
|
|
110
|
+
onClick: (v) => M(i),
|
|
111
|
+
innerHTML: c.title
|
|
112
|
+
}, null, 10, A))),
|
|
113
|
+
128
|
|
114
|
+
/* KEYED_FRAGMENT */
|
|
115
|
+
))
|
|
116
|
+
],
|
|
117
|
+
2
|
|
118
|
+
/* CLASS */
|
|
119
|
+
),
|
|
120
|
+
$(
|
|
121
|
+
"div",
|
|
122
|
+
{
|
|
123
|
+
class: s(`${r(o)}-tab-indicator__scrollbar`)
|
|
124
|
+
},
|
|
125
|
+
[
|
|
126
|
+
$(
|
|
127
|
+
"div",
|
|
128
|
+
{
|
|
129
|
+
class: s(`${r(o)}-tab-indicator__scrollbar-drag`),
|
|
130
|
+
style: V(l.value)
|
|
131
|
+
},
|
|
132
|
+
null,
|
|
133
|
+
6
|
|
134
|
+
/* CLASS, STYLE */
|
|
135
|
+
)
|
|
136
|
+
],
|
|
137
|
+
2
|
|
138
|
+
/* CLASS */
|
|
139
|
+
)
|
|
140
|
+
],
|
|
141
|
+
2
|
|
142
|
+
/* CLASS */
|
|
143
|
+
)
|
|
144
|
+
],
|
|
145
|
+
2
|
|
146
|
+
/* CLASS */
|
|
147
|
+
),
|
|
148
|
+
e.showIntro ? (h(), p(
|
|
149
|
+
"div",
|
|
150
|
+
{
|
|
151
|
+
key: 0,
|
|
152
|
+
class: s(`${r(o)}-tab-indicator__intro`),
|
|
153
|
+
style: V(d.value)
|
|
154
|
+
},
|
|
155
|
+
[
|
|
156
|
+
(h(!0), p(
|
|
157
|
+
T,
|
|
158
|
+
null,
|
|
159
|
+
I(e.dataList, (c, i) => (h(), p("p", {
|
|
160
|
+
ref_for: !0,
|
|
161
|
+
ref_key: "introItemRef",
|
|
162
|
+
ref: y,
|
|
163
|
+
key: c.title,
|
|
164
|
+
class: s([`${r(o)}-tab-indicator__intro-item`, t.value === i && `${r(o)}-tab-indicator__active`]),
|
|
165
|
+
innerHTML: c.desc
|
|
166
|
+
}, null, 10, q))),
|
|
167
|
+
128
|
|
168
|
+
/* KEYED_FRAGMENT */
|
|
169
|
+
))
|
|
170
|
+
],
|
|
171
|
+
6
|
|
172
|
+
/* CLASS, STYLE */
|
|
173
|
+
)) : F("v-if", !0)
|
|
174
|
+
],
|
|
175
|
+
2
|
|
176
|
+
/* CLASS */
|
|
177
|
+
));
|
|
178
|
+
}
|
|
179
|
+
});
|
|
180
|
+
S.install = (n) => (n.component("ScTabIndicator", S), n);
|
|
181
|
+
const P = S;
|
|
182
|
+
export {
|
|
183
|
+
P as ScTabIndicator
|
|
184
|
+
};
|
|
@@ -0,0 +1,246 @@
|
|
|
1
|
+
import { defineComponent as z, ref as m, watch as V, nextTick as A, onMounted as T, onBeforeUnmount as E, createElementBlock as h, openBlock as y, normalizeClass as p, createElementVNode as i, createCommentVNode as L, renderSlot as O, onUnmounted as M, createBlock as x, normalizeProps as S, mergeProps as $, Fragment as U, normalizeStyle as H, createVNode as I, unref as N, toDisplayString as X, Teleport as F } from "vue";
|
|
2
|
+
import { P as n } from "../_vars-BV4QQF-p.js";
|
|
3
|
+
import { ScLayzImage as Y } from "./layz-image.mjs";
|
|
4
|
+
const j = ["controls", "poster", "src"], R = /* @__PURE__ */ z({
|
|
5
|
+
__name: "video-wrapper",
|
|
6
|
+
props: {
|
|
7
|
+
class: { default: "" },
|
|
8
|
+
style: { default: "" },
|
|
9
|
+
playerButtonClass: { default: "" },
|
|
10
|
+
playerButtonText: { default: "PLAY" },
|
|
11
|
+
poster: { default: "" },
|
|
12
|
+
url: { default: "" },
|
|
13
|
+
autoPlay: { type: Boolean, default: !0 },
|
|
14
|
+
playable: { type: Boolean, default: !0 }
|
|
15
|
+
},
|
|
16
|
+
setup(v, { expose: a }) {
|
|
17
|
+
const e = v, b = /xiaomi|miui/i, g = `${n}-player-wrapper`, _ = `${n}-player-is-fullscreen`, C = `${n}-player-close-btn`, w = `${n}-player-icon`, l = m(), s = m(!0), r = m(b.test(navigator.userAgent) ? void 0 : e.url);
|
|
18
|
+
let o = null;
|
|
19
|
+
const f = (t) => {
|
|
20
|
+
var u, c;
|
|
21
|
+
t.target !== l.value && ((u = l.value) == null || u.pause(), s.value = !!((c = l.value) != null && c.paused));
|
|
22
|
+
}, d = (t) => {
|
|
23
|
+
const u = t[0], c = l.value;
|
|
24
|
+
!c || !e.playable || (u.isIntersecting && e.autoPlay && c.paused ? (c.play().catch(console.warn), s.value = !1) : !u.isIntersecting && !c.paused && (c.pause(), s.value = !0));
|
|
25
|
+
}, B = () => {
|
|
26
|
+
e.autoPlay && e.playable && l.value && (o = new IntersectionObserver(d, {
|
|
27
|
+
threshold: 0.25
|
|
28
|
+
// 可根据需求调整可见区域百分比
|
|
29
|
+
}), o.observe(l.value));
|
|
30
|
+
}, k = () => {
|
|
31
|
+
o == null || o.disconnect(), o = null;
|
|
32
|
+
};
|
|
33
|
+
return V(
|
|
34
|
+
() => e.playable,
|
|
35
|
+
() => {
|
|
36
|
+
k(), A(() => B());
|
|
37
|
+
}
|
|
38
|
+
), a({
|
|
39
|
+
play() {
|
|
40
|
+
l.value.play(), s.value = l.value.paused;
|
|
41
|
+
}
|
|
42
|
+
}), T(() => {
|
|
43
|
+
b.test(navigator.userAgent) && fetch(e.url).then((t) => {
|
|
44
|
+
if (!t.ok)
|
|
45
|
+
throw new Error(`HTTP error! status: ${t.status}`);
|
|
46
|
+
return t.blob();
|
|
47
|
+
}).then((t) => {
|
|
48
|
+
r.value = URL.createObjectURL(t);
|
|
49
|
+
}).catch((t) => {
|
|
50
|
+
console.error("获取视频失败:", t);
|
|
51
|
+
}), B();
|
|
52
|
+
}), E(() => {
|
|
53
|
+
k();
|
|
54
|
+
}), (t, u) => (y(), h(
|
|
55
|
+
"div",
|
|
56
|
+
{
|
|
57
|
+
class: p([g, e.class, !s.value && !e.autoPlay && _])
|
|
58
|
+
},
|
|
59
|
+
[
|
|
60
|
+
i("video", {
|
|
61
|
+
ref_key: "videoRef",
|
|
62
|
+
ref: l,
|
|
63
|
+
muted: "",
|
|
64
|
+
loop: "",
|
|
65
|
+
playsinline: "",
|
|
66
|
+
"webkit-playsinline": "",
|
|
67
|
+
"x5-video-player-type": "h5",
|
|
68
|
+
controls: !s.value && !e.autoPlay,
|
|
69
|
+
poster: e.poster,
|
|
70
|
+
src: r.value
|
|
71
|
+
}, null, 8, j),
|
|
72
|
+
!s.value && !e.autoPlay ? (y(), h("button", {
|
|
73
|
+
key: 0,
|
|
74
|
+
class: p(C),
|
|
75
|
+
onClick: f
|
|
76
|
+
}, [
|
|
77
|
+
O(t.$slots, "close", {}, () => [
|
|
78
|
+
(y(), h("svg", {
|
|
79
|
+
class: p(w),
|
|
80
|
+
viewBox: "0 0 1121 1024",
|
|
81
|
+
version: "1.1",
|
|
82
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
83
|
+
width: "200",
|
|
84
|
+
height: "200"
|
|
85
|
+
}, [...u[0] || (u[0] = [
|
|
86
|
+
i(
|
|
87
|
+
"path",
|
|
88
|
+
{
|
|
89
|
+
d: "M1040.725333 49.005714l-965.485714 965.436953-48.420571-48.469334L992.256 0.487619l48.469333 48.518095z",
|
|
90
|
+
fill: "#ffffff"
|
|
91
|
+
},
|
|
92
|
+
null,
|
|
93
|
+
-1
|
|
94
|
+
/* CACHED */
|
|
95
|
+
),
|
|
96
|
+
i(
|
|
97
|
+
"path",
|
|
98
|
+
{
|
|
99
|
+
d: "M1040.725333 1014.442667l-965.485714-965.485715 48.518095-48.420571L1089.194667 965.973333l-48.469334 48.469334z",
|
|
100
|
+
fill: "#ffffff"
|
|
101
|
+
},
|
|
102
|
+
null,
|
|
103
|
+
-1
|
|
104
|
+
/* CACHED */
|
|
105
|
+
)
|
|
106
|
+
])]))
|
|
107
|
+
])
|
|
108
|
+
])) : L("v-if", !0)
|
|
109
|
+
],
|
|
110
|
+
2
|
|
111
|
+
/* CLASS */
|
|
112
|
+
));
|
|
113
|
+
}
|
|
114
|
+
}), P = /* @__PURE__ */ z({
|
|
115
|
+
__name: "video",
|
|
116
|
+
props: {
|
|
117
|
+
class: { default: "" },
|
|
118
|
+
style: { default: "" },
|
|
119
|
+
playerButtonClass: { default: "" },
|
|
120
|
+
playerButtonText: { default: "PLAY" },
|
|
121
|
+
poster: { default: "" },
|
|
122
|
+
url: { default: "" },
|
|
123
|
+
autoPlay: { type: Boolean, default: !0 },
|
|
124
|
+
playable: { type: Boolean, default: !0 }
|
|
125
|
+
},
|
|
126
|
+
setup(v) {
|
|
127
|
+
const a = v, e = `${n}-player-wrapper`, b = `${n}-player-poster`, g = `${n}-player-btn`, _ = `${n}-player-btn-text`, C = `${n}-player-icon`, w = m(), l = m(), s = (f) => {
|
|
128
|
+
var d;
|
|
129
|
+
f.stopPropagation(), (d = l.value) == null || d.play();
|
|
130
|
+
};
|
|
131
|
+
let r = null;
|
|
132
|
+
const o = m(!1);
|
|
133
|
+
return T(() => {
|
|
134
|
+
r = new IntersectionObserver(
|
|
135
|
+
([f]) => {
|
|
136
|
+
f.isIntersecting && (o.value = !0);
|
|
137
|
+
},
|
|
138
|
+
{ threshold: 0.1 }
|
|
139
|
+
), w.value && r.observe(w.value);
|
|
140
|
+
}), M(() => {
|
|
141
|
+
r == null || r.disconnect();
|
|
142
|
+
}), (f, d) => a.autoPlay ? (y(), x(
|
|
143
|
+
R,
|
|
144
|
+
S($({ key: 0 }, a)),
|
|
145
|
+
null,
|
|
146
|
+
16
|
|
147
|
+
/* FULL_PROPS */
|
|
148
|
+
)) : (y(), h(
|
|
149
|
+
U,
|
|
150
|
+
{ key: 1 },
|
|
151
|
+
[
|
|
152
|
+
i(
|
|
153
|
+
"div",
|
|
154
|
+
{
|
|
155
|
+
class: p([e, a.class]),
|
|
156
|
+
style: H(a.style)
|
|
157
|
+
},
|
|
158
|
+
[
|
|
159
|
+
I(N(Y), {
|
|
160
|
+
class: p(b),
|
|
161
|
+
src: a.poster,
|
|
162
|
+
alt: "AITO"
|
|
163
|
+
}, null, 8, ["src"]),
|
|
164
|
+
i(
|
|
165
|
+
"button",
|
|
166
|
+
{
|
|
167
|
+
ref_key: "btnRef",
|
|
168
|
+
ref: w,
|
|
169
|
+
class: p([g, a.playerButtonClass]),
|
|
170
|
+
onClick: s
|
|
171
|
+
},
|
|
172
|
+
[
|
|
173
|
+
O(f.$slots, "play", {}, () => [
|
|
174
|
+
(y(), h("svg", {
|
|
175
|
+
class: p(C),
|
|
176
|
+
viewBox: "0 0 1024 1024",
|
|
177
|
+
version: "1.1",
|
|
178
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
179
|
+
width: "200",
|
|
180
|
+
height: "200"
|
|
181
|
+
}, [...d[0] || (d[0] = [
|
|
182
|
+
i(
|
|
183
|
+
"path",
|
|
184
|
+
{
|
|
185
|
+
d: "M671.744 495.616c20.48 12.288 20.48 36.864 0 49.152l-217.088 126.976c-20.48 12.288-45.056-4.096-45.056-24.576V393.216c0-20.48 24.576-36.864 45.056-24.576l217.088 126.976z",
|
|
186
|
+
fill: "#ffffff"
|
|
187
|
+
},
|
|
188
|
+
null,
|
|
189
|
+
-1
|
|
190
|
+
/* CACHED */
|
|
191
|
+
),
|
|
192
|
+
i(
|
|
193
|
+
"path",
|
|
194
|
+
{
|
|
195
|
+
d: "M512 1011.712C237.568 1011.712 12.288 786.432 12.288 512 12.288 237.568 237.568 12.288 512 12.288c274.432 0 499.712 225.28 499.712 499.712 0 274.432-225.28 499.712-499.712 499.712z m0-958.464c-253.952 0-458.752 204.8-458.752 458.752s204.8 458.752 458.752 458.752 458.752-204.8 458.752-458.752-204.8-458.752-458.752-458.752z",
|
|
196
|
+
fill: "#ffffff"
|
|
197
|
+
},
|
|
198
|
+
null,
|
|
199
|
+
-1
|
|
200
|
+
/* CACHED */
|
|
201
|
+
)
|
|
202
|
+
])])),
|
|
203
|
+
i(
|
|
204
|
+
"span",
|
|
205
|
+
{
|
|
206
|
+
class: p(_)
|
|
207
|
+
},
|
|
208
|
+
X(a.playerButtonText),
|
|
209
|
+
1
|
|
210
|
+
/* TEXT */
|
|
211
|
+
)
|
|
212
|
+
])
|
|
213
|
+
],
|
|
214
|
+
2
|
|
215
|
+
/* CLASS */
|
|
216
|
+
)
|
|
217
|
+
],
|
|
218
|
+
6
|
|
219
|
+
/* CLASS, STYLE */
|
|
220
|
+
),
|
|
221
|
+
o.value ? (y(), x(F, {
|
|
222
|
+
key: 0,
|
|
223
|
+
to: "body"
|
|
224
|
+
}, [
|
|
225
|
+
I(
|
|
226
|
+
R,
|
|
227
|
+
$(a, {
|
|
228
|
+
ref_key: "vwRef",
|
|
229
|
+
ref: l
|
|
230
|
+
}),
|
|
231
|
+
null,
|
|
232
|
+
16
|
|
233
|
+
/* FULL_PROPS */
|
|
234
|
+
)
|
|
235
|
+
])) : L("v-if", !0)
|
|
236
|
+
],
|
|
237
|
+
64
|
|
238
|
+
/* STABLE_FRAGMENT */
|
|
239
|
+
));
|
|
240
|
+
}
|
|
241
|
+
});
|
|
242
|
+
P.install = (v) => (v.component("ScVideo", P), v);
|
|
243
|
+
const q = P;
|
|
244
|
+
export {
|
|
245
|
+
q as ScVideo
|
|
246
|
+
};
|
package/dist/global.d.ts
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
declare module 'vue' {
|
|
2
|
+
// GlobalComponents for Volar
|
|
3
|
+
export interface GlobalComponents {
|
|
4
|
+
ScVideo: typeof import("@seresweb/website-component")["ScVideo"];
|
|
5
|
+
ScTabIndicator: typeof import("@seresweb/website-component")["ScTabIndicator"];
|
|
6
|
+
ScSwiperVehicle: typeof import("@seresweb/website-component")["ScSwiperVehicle"];
|
|
7
|
+
ScSwiperNormal: typeof import("@seresweb/website-component")["ScSwiperNormal"];
|
|
8
|
+
ScRadio: typeof import("@seresweb/website-component")["ScRadio"];
|
|
9
|
+
ScParameterBox: typeof import("@seresweb/website-component")["ScParameterBox"];
|
|
10
|
+
ScLayzImage: typeof import("@seresweb/website-component")["ScLayzImage"];
|
|
11
|
+
ScImageIndicator: typeof import("@seresweb/website-component")["ScImageIndicator"];
|
|
12
|
+
ScHorizontalViewer: typeof import("@seresweb/website-component")["ScHorizontalViewer"];
|
|
13
|
+
ScGradualHighlight: typeof import("@seresweb/website-component")["ScGradualHighlight"];
|
|
14
|
+
ScDropdown: typeof import("@seresweb/website-component")["ScDropdown"];
|
|
15
|
+
ScDrawer: typeof import("@seresweb/website-component")["ScDrawer"];
|
|
16
|
+
ScAnimatedNumber: typeof import("@seresweb/website-component")["ScAnimatedNumber"];
|
|
17
|
+
ScAccordionInfoPanel: typeof import("@seresweb/website-component")["ScAccordionInfoPanel"];
|
|
18
|
+
ScInput: typeof import("@seresweb/website-component")["ScInput"];
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export {};
|