jeawin-astro 3.0.55 → 3.0.56
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/package.json
CHANGED
|
@@ -32,12 +32,13 @@ interface Props {
|
|
|
32
32
|
nodepics?: any[]; // 产品图片
|
|
33
33
|
video?: JWVIDEO; // 产品视频
|
|
34
34
|
view360?: any; // 360 view
|
|
35
|
-
thumbs_position?: any;
|
|
36
35
|
}
|
|
37
|
-
const { node_title, nodepics = [], video, view360
|
|
36
|
+
const { node_title, nodepics = [], video, view360 } = Astro.props;
|
|
37
|
+
|
|
38
|
+
const thumbs_position = 'bottom';
|
|
38
39
|
---
|
|
39
40
|
|
|
40
|
-
<custom-detail-images data-nodepics={nodepics} data-video={video} data-view360={view360}>
|
|
41
|
+
<custom-detail-images data-nodepics={nodepics} data-video={video} data-view360={view360} data-thumbs_position={thumbs_position}>
|
|
41
42
|
<div
|
|
42
43
|
x-data={`{
|
|
43
44
|
isVideoPoppedUp:false,
|
|
@@ -56,23 +57,24 @@ const { node_title, nodepics = [], video, view360, thumbs_position = 'left' } =
|
|
|
56
57
|
}`}
|
|
57
58
|
>
|
|
58
59
|
<div class:list={["flex flex-col", {"lg:flex-row":thumbs_position=='left'}, "gap-5"]}>
|
|
59
|
-
<div class:list={["order-2", {"
|
|
60
|
+
<div class:list={["order-2", {"flex flex-row items-center md:order-1 md:w-2/12 md:flex md:flex-col":thumbs_position=='left',"flex items-center justify-center":thumbs_position=='bottom'}, "gap-3"]}>
|
|
60
61
|
<!-- thumbs swiper -->
|
|
62
|
+
<div class="flex justify-center cursor-pointer thumbSwiper-prev-btn">{thumbs_position == 'left'?<Icon name="fa6-solid:angle-up" /> :<Icon name="fa6-solid:angle-left" />}</div>
|
|
61
63
|
<swiper-container
|
|
62
64
|
init="false"
|
|
63
65
|
class="thumbSwiper"
|
|
64
66
|
watch-slides-progress="true"
|
|
65
67
|
slides-per-view="5"
|
|
66
68
|
space-between="10"
|
|
67
|
-
navigation="true"
|
|
68
69
|
>
|
|
70
|
+
|
|
69
71
|
{
|
|
70
72
|
nodepics.map((pic: any, idx: number) => (
|
|
71
73
|
<swiper-slide lazy={idx > 0 ? "true" : "false"}
|
|
72
74
|
class:list={[
|
|
73
75
|
"swiper-slide",
|
|
74
76
|
{ hidden: idx > 0 },
|
|
75
|
-
" lg:flex-
|
|
77
|
+
" lg:flex-0 lg:h-[60px] lg:w-[60px]",
|
|
76
78
|
]}
|
|
77
79
|
>
|
|
78
80
|
<div class="content-wrapper border border-white p-1 cursor-pointer overflow-hidden h-[60px] w-[60px]">
|
|
@@ -84,7 +86,7 @@ const { node_title, nodepics = [], video, view360, thumbs_position = 'left' } =
|
|
|
84
86
|
|
|
85
87
|
{
|
|
86
88
|
video ? (
|
|
87
|
-
<swiper-slide lazy="true" class="swiper-slide lg:flex-
|
|
89
|
+
<swiper-slide lazy="true" class="swiper-slide lg:flex-0 lg:h-[60px] lg:w-[60px] hidden">
|
|
88
90
|
<div class="content-wrapper border border-white min-h-[100px] lg:min-h-[60px] p-1 cursor-pointer flex items-center justify-center">
|
|
89
91
|
<Icon name="fa6-solid:file-video" class="size-10" />
|
|
90
92
|
</div>
|
|
@@ -94,7 +96,7 @@ const { node_title, nodepics = [], video, view360, thumbs_position = 'left' } =
|
|
|
94
96
|
|
|
95
97
|
{
|
|
96
98
|
view360 ? (
|
|
97
|
-
<swiper-slide lazy="true" class="swiper-slide lg:flex-
|
|
99
|
+
<swiper-slide lazy="true" class="swiper-slide lg:flex-0 lg:h-[60px] lg:w-[60px] hidden">
|
|
98
100
|
<div class="content-wrapper border border-white p-1 cursor-pointer">
|
|
99
101
|
<img src={view360img.src} alt="360° viewer" />
|
|
100
102
|
</div>
|
|
@@ -103,6 +105,7 @@ const { node_title, nodepics = [], video, view360, thumbs_position = 'left' } =
|
|
|
103
105
|
}
|
|
104
106
|
|
|
105
107
|
</swiper-container>
|
|
108
|
+
<div class="flex justify-center cursor-pointer thumbSwiper-next-btn">{thumbs_position =='left'?<Icon name="fa6-solid:angle-down" />:<Icon name="fa6-solid:angle-right" />}</div>
|
|
106
109
|
</div>
|
|
107
110
|
<div class:list={["order-1", {"lg:order-2":thumbs_position=='left'}, "w-full", {"lg:w-10/12":thumbs_position=='left'}]}>
|
|
108
111
|
<!-- main swiper, pass thumbs swiper as CSS selector -->
|
|
@@ -113,7 +116,7 @@ const { node_title, nodepics = [], video, view360, thumbs_position = 'left' } =
|
|
|
113
116
|
slides-per-view="1"
|
|
114
117
|
thumbs-swiper=".thumbSwiper"
|
|
115
118
|
navigation="false"
|
|
116
|
-
pagination="true"
|
|
119
|
+
pagination="true" auto-height="true"
|
|
117
120
|
>
|
|
118
121
|
{
|
|
119
122
|
nodepics.map((pic: any, idx: number) => (
|
|
@@ -217,7 +220,6 @@ const { node_title, nodepics = [], video, view360, thumbs_position = 'left' } =
|
|
|
217
220
|
</div>
|
|
218
221
|
</div>
|
|
219
222
|
</custom-detail-images>
|
|
220
|
-
|
|
221
223
|
<script
|
|
222
224
|
is:inline
|
|
223
225
|
src="https://cdn.scaleflex.it/plugins/js-cloudimage-360-view/latest/js-cloudimage-360-view.min.js" async defer
|
|
@@ -233,11 +235,13 @@ src="https://cdn.scaleflex.it/plugins/js-cloudimage-360-view/latest/js-cloudimag
|
|
|
233
235
|
) : null
|
|
234
236
|
}
|
|
235
237
|
<style is:inline>
|
|
236
|
-
|
|
238
|
+
|
|
237
239
|
.thumbSwiper {
|
|
238
|
-
height:
|
|
240
|
+
max-height: 300px;
|
|
241
|
+
max-width:300px;
|
|
242
|
+
overflow: hidden;
|
|
239
243
|
}
|
|
240
|
-
|
|
244
|
+
|
|
241
245
|
|
|
242
246
|
.thumbSwiper .swiper-slide img {
|
|
243
247
|
/* object-fit: contain; */
|
|
@@ -343,10 +347,14 @@ src="https://cdn.scaleflex.it/plugins/js-cloudimage-360-view/latest/js-cloudimag
|
|
|
343
347
|
|
|
344
348
|
initSwiper(".mainSwiper");
|
|
345
349
|
initSwiper(".thumbSwiper", {
|
|
346
|
-
direction: "horizontal
|
|
350
|
+
direction: this.dataset.thumbs_position=='left' ? "vertical" : 'horizontal',
|
|
351
|
+
navigation: {
|
|
352
|
+
prevEl: '.thumbSwiper-prev-btn',
|
|
353
|
+
nextEl: '.thumbSwiper-next-btn'
|
|
354
|
+
},
|
|
347
355
|
breakpoints: {
|
|
348
|
-
|
|
349
|
-
direction: "vertical",
|
|
356
|
+
768: {
|
|
357
|
+
direction: this.dataset.thumbs_position == 'left' ? "vertical" : 'horizontal',
|
|
350
358
|
},
|
|
351
359
|
},
|
|
352
360
|
on:{
|
|
@@ -402,7 +410,7 @@ src="https://cdn.scaleflex.it/plugins/js-cloudimage-360-view/latest/js-cloudimag
|
|
|
402
410
|
direction: "horizontal",
|
|
403
411
|
breakpoints: {
|
|
404
412
|
1024: {
|
|
405
|
-
direction: "vertical",
|
|
413
|
+
direction: this.dataset.thumbs_position == 'left' ? "vertical" : 'horizontal',
|
|
406
414
|
},
|
|
407
415
|
},
|
|
408
416
|
on:{
|