officialblock 1.0.7 → 1.0.9
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/index-Ch_ldWmA.js +1 -0
- package/dist/index-DXm2cqxo.mjs +485 -0
- package/dist/official-block.cjs.js +74 -74
- package/dist/official-block.es.js +13608 -10831
- package/dist/official-block.umd.js +78 -78
- package/dist/style.css +1 -1
- package/dist/swiper-JiLDDxAF.js +1 -0
- package/dist/swiper-acbnDJoL.mjs +2035 -0
- package/dist/utils-DD-vVZej.mjs +316 -0
- package/dist/utils-DOLLD0-F.js +1 -0
- package/package.json +2 -1
- package/src/assets/icon-email.svg +3 -0
- package/src/components/ArticleList/article.vue +3 -3
- package/src/components/ArticleList/contact.vue +9 -9
- package/src/components/ArticleList/index.ts +1 -1
- package/src/components/ArticleList/index.vue +22 -80
- package/src/components/ArticleList/setting.vue +339 -175
- package/src/components/ArticleList/type.ts +12 -18
- package/src/components/BannerImage/index.ts +11 -0
- package/src/components/BannerImage/index.vue +153 -0
- package/src/components/BannerImage/setting.vue +55 -0
- package/src/components/BannerImage/type.ts +10 -0
- package/src/components/BannerImageWithLink/index.ts +11 -0
- package/src/components/BannerImageWithLink/index.vue +323 -0
- package/src/components/BannerImageWithLink/setting.vue +344 -0
- package/src/components/BannerImageWithLink/type.ts +17 -0
- package/src/components/BannerPage/index.ts +11 -0
- package/src/components/BannerPage/index.vue +283 -0
- package/src/components/BannerPage/setting.vue +55 -0
- package/src/components/BannerPage/type.ts +10 -0
- package/src/components/BtnList/index.ts +11 -0
- package/src/components/BtnList/index.vue +588 -0
- package/src/components/BtnList/setting.vue +255 -0
- package/src/components/BtnList/type.ts +10 -0
- package/src/components/Button/index.vue +45 -33
- package/src/components/ContactUsList/index.ts +11 -0
- package/src/components/ContactUsList/index.vue +369 -0
- package/src/components/ContactUsList/setting.vue +497 -0
- package/src/components/ContactUsList/type.ts +17 -0
- package/src/components/CountDown/index.ts +11 -0
- package/src/components/CountDown/index.vue +315 -0
- package/src/components/CountDown/setting.vue +302 -0
- package/src/components/CountDown/type.ts +17 -0
- package/src/components/CustomIframe/index.ts +11 -0
- package/src/components/CustomIframe/index.vue +118 -0
- package/src/components/CustomIframe/setting.vue +323 -0
- package/src/components/CustomIframe/type.ts +17 -0
- package/src/components/CustomSpace/index.ts +11 -0
- package/src/components/CustomSpace/index.vue +82 -0
- package/src/components/CustomSpace/setting.vue +89 -0
- package/src/components/CustomSpace/type.ts +10 -0
- package/src/components/GalleryList/index.ts +12 -0
- package/src/components/GalleryList/index.vue +311 -0
- package/src/components/GalleryList/setting.vue +268 -0
- package/src/components/GalleryList/type.ts +10 -0
- package/src/components/HeroSlide/index.ts +1 -1
- package/src/components/HeroSlide/index.vue +85 -133
- package/src/components/HeroSlide/setting.vue +435 -0
- package/src/components/HeroSlide/type.ts +5 -14
- package/src/components/LinkLIst/index.ts +11 -0
- package/src/components/LinkLIst/index.vue +317 -0
- package/src/components/LinkLIst/setting.vue +264 -0
- package/src/components/LinkLIst/type.ts +10 -0
- package/src/components/Media/index.vue +18 -18
- package/src/components/Operate/index.vue +17 -8
- package/src/components/Profile/index.vue +999 -0
- package/src/components/Profile/modal.vue +56 -0
- package/src/components/Profile/setting.vue +330 -0
- package/src/components/QuickLinks/index.vue +166 -0
- package/src/components/QuoteText/index.ts +11 -0
- package/src/components/QuoteText/index.vue +133 -0
- package/src/components/QuoteText/setting.vue +81 -0
- package/src/components/QuoteText/type.ts +10 -0
- package/src/components/ScrollKeyInfo/index.ts +11 -0
- package/src/components/ScrollKeyInfo/index.vue +1345 -0
- package/src/components/ScrollKeyInfo/setting.vue +302 -0
- package/src/components/ScrollKeyInfo/type.ts +17 -0
- package/src/components/Swiper/index.vue +538 -0
- package/src/components/TabDefault/components/ComponentSelector/compsData.js +143 -0
- package/src/components/TabDefault/components/ComponentSelector/index.vue +188 -0
- package/src/components/TabDefault/components/PageContent.vue +207 -0
- package/src/components/TabDefault/index.vue +475 -0
- package/src/components/TabDefault/setting.vue +581 -0
- package/src/components/TabDefault/type.ts +17 -0
- package/src/components/TableTwo/index.ts +11 -0
- package/src/components/TableTwo/index.vue +232 -0
- package/src/components/TableTwo/setting.vue +558 -0
- package/src/components/TableTwo/type.ts +17 -0
- package/src/components/index.ts +40 -5
- package/src/index.ts +56 -12
- package/src/main.ts +6 -3
- package/src/router/index.ts +6 -0
- package/src/style.css +17 -0
- package/src/styles/component-isolation.scss +257 -0
- package/src/styles/editor.scss +1 -1
- package/src/styles/layers.scss +256 -0
- package/src/styles/main.scss +21687 -0
- package/src/styles/mixins/style-isolation.scss +262 -0
- package/src/styles/smart-reset.scss +287 -0
- package/src/styles/test.scss +1 -1
- package/src/types/button.ts +10 -0
- package/src/views/StyleIsolationTest.vue +292 -0
- package/src/views/components/ArticleListDemo.vue +59 -19
|
@@ -0,0 +1,538 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="swiper-container" ref="swiperContainer">
|
|
3
|
+
<div class="swiper-wrapper">
|
|
4
|
+
<div class="swiper-slide" v-for="(item, index) in data" :key="item.id">
|
|
5
|
+
<div class="swiper-slide__media">
|
|
6
|
+
<img
|
|
7
|
+
v-if="item.type === 'Image'"
|
|
8
|
+
class="swiper-slide__media-img"
|
|
9
|
+
:src="item.imgSrc"
|
|
10
|
+
:alt="item.alt"
|
|
11
|
+
/>
|
|
12
|
+
<div class="video-player" v-else-if="item.type === 'Video'">
|
|
13
|
+
<video
|
|
14
|
+
:ref="(el) => setVideoRef(el, index)"
|
|
15
|
+
playsinline
|
|
16
|
+
:poster="item.imgSrc"
|
|
17
|
+
@ended="onVideoEnded"
|
|
18
|
+
>
|
|
19
|
+
<source :src="item.videoSrc" type="video/mp4" />
|
|
20
|
+
</video>
|
|
21
|
+
</div>
|
|
22
|
+
</div>
|
|
23
|
+
|
|
24
|
+
<a :href="item.link" target="_blank" class="swiper-slide__link"></a>
|
|
25
|
+
<div class="swiper-slide__body">
|
|
26
|
+
<div class="swiper-slide__body__title text-center">{{ item.title }}</div>
|
|
27
|
+
<template v-if="item.type === 'Video'">
|
|
28
|
+
<button type="button" class="swiper-slide__body__play" v-if="!isPlaying" @click.stop="playVideo"></button>
|
|
29
|
+
<button type="button" class="swiper-slide__body__link" @click.stop="handlePlayAll">观看完整视频</button>
|
|
30
|
+
</template>
|
|
31
|
+
</div>
|
|
32
|
+
</div>
|
|
33
|
+
</div>
|
|
34
|
+
|
|
35
|
+
<!-- 分页器 -->
|
|
36
|
+
<div class="swiper-pagination"></div>
|
|
37
|
+
|
|
38
|
+
<!-- 导航按钮 -->
|
|
39
|
+
<div class="swiper-button-next"></div>
|
|
40
|
+
<div class="swiper-button-prev"></div>
|
|
41
|
+
</div>
|
|
42
|
+
|
|
43
|
+
<a-modal v-model:visible="showVideo" :footer="false" width="1200px" @cancel="handleCancel">
|
|
44
|
+
<template #title>
|
|
45
|
+
观看完整视频
|
|
46
|
+
</template>
|
|
47
|
+
<div class="video-box">
|
|
48
|
+
<video
|
|
49
|
+
ref="videoElement"
|
|
50
|
+
controls
|
|
51
|
+
>
|
|
52
|
+
<source :src="videoSrc" type="video/mp4" />
|
|
53
|
+
</video>
|
|
54
|
+
</div>
|
|
55
|
+
</a-modal>
|
|
56
|
+
</template>
|
|
57
|
+
|
|
58
|
+
<script lang="ts" setup>
|
|
59
|
+
import { ref, onMounted, onUnmounted, nextTick, watch } from 'vue'
|
|
60
|
+
|
|
61
|
+
interface SwiperItem {
|
|
62
|
+
id: string | number
|
|
63
|
+
type: 'Image' | 'Video'
|
|
64
|
+
imgSrc: string
|
|
65
|
+
alt?: string
|
|
66
|
+
videoSrc?: string
|
|
67
|
+
link?: string
|
|
68
|
+
title?: string
|
|
69
|
+
isExternal: boolean
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
const props = defineProps<{
|
|
73
|
+
data: SwiperItem[],
|
|
74
|
+
imageInterval?: number,
|
|
75
|
+
videoAutoNext?: boolean
|
|
76
|
+
}>()
|
|
77
|
+
|
|
78
|
+
// 响应式变量
|
|
79
|
+
const swiperContainer = ref<HTMLElement>()
|
|
80
|
+
let swiperInstance: any = null
|
|
81
|
+
let currentSlideIndex = 0
|
|
82
|
+
|
|
83
|
+
// 图片自动切换定时器
|
|
84
|
+
let imageTimer: number | null = null
|
|
85
|
+
|
|
86
|
+
// 动态导入 Swiper
|
|
87
|
+
let Swiper: any = null
|
|
88
|
+
let Navigation: any = null
|
|
89
|
+
let Pagination: any = null
|
|
90
|
+
let Autoplay: any = null
|
|
91
|
+
|
|
92
|
+
// 初始化 Swiper
|
|
93
|
+
const initSwiper = async () => {
|
|
94
|
+
try {
|
|
95
|
+
// 动态导入 Swiper 模块
|
|
96
|
+
const swiperModule = await import('swiper' as any)
|
|
97
|
+
const { Navigation: NavigationModule, Pagination: PaginationModule, Autoplay: AutoplayModule } = await import('swiper/modules' as any)
|
|
98
|
+
|
|
99
|
+
Swiper = swiperModule.Swiper
|
|
100
|
+
Navigation = NavigationModule
|
|
101
|
+
Pagination = PaginationModule
|
|
102
|
+
Autoplay = AutoplayModule
|
|
103
|
+
|
|
104
|
+
// 导入 Swiper 样式
|
|
105
|
+
await import('swiper/css' as any)
|
|
106
|
+
await import('swiper/css/navigation' as any)
|
|
107
|
+
await import('swiper/css/pagination' as any)
|
|
108
|
+
|
|
109
|
+
if (swiperContainer.value) {
|
|
110
|
+
swiperInstance = new Swiper(swiperContainer.value, {
|
|
111
|
+
modules: [Navigation, Pagination, Autoplay],
|
|
112
|
+
autoHeight: false, // 禁用自适应高度,使用固定高度
|
|
113
|
+
speed: 1000,
|
|
114
|
+
effect: 'fade',
|
|
115
|
+
fadeEffect: {
|
|
116
|
+
crossFade: true
|
|
117
|
+
},
|
|
118
|
+
navigation: {
|
|
119
|
+
nextEl: '.swiper-button-next',
|
|
120
|
+
prevEl: '.swiper-button-prev',
|
|
121
|
+
},
|
|
122
|
+
pagination: {
|
|
123
|
+
el: '.swiper-pagination',
|
|
124
|
+
clickable: true,
|
|
125
|
+
},
|
|
126
|
+
on: {
|
|
127
|
+
slideChange: (swiper: any) => {
|
|
128
|
+
currentSlideIndex = swiper.activeIndex
|
|
129
|
+
handleSlideChange(currentSlideIndex)
|
|
130
|
+
},
|
|
131
|
+
// 用户交互时重置定时器
|
|
132
|
+
touchStart: () => {
|
|
133
|
+
clearImageTimer()
|
|
134
|
+
},
|
|
135
|
+
touchEnd: () => {
|
|
136
|
+
// 延迟一点时间再启动定时器,避免立即触发
|
|
137
|
+
setTimeout(() => {
|
|
138
|
+
const currentItem = props.data[currentIndex.value]
|
|
139
|
+
if (currentItem && currentItem.type === 'Image') {
|
|
140
|
+
startImageTimer()
|
|
141
|
+
}
|
|
142
|
+
}, 100)
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
})
|
|
146
|
+
}
|
|
147
|
+
} catch (error) {
|
|
148
|
+
console.error('Failed to load Swiper:', error)
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
const currentIndex = ref<number>(0)
|
|
153
|
+
|
|
154
|
+
// 清除图片定时器
|
|
155
|
+
const clearImageTimer = () => {
|
|
156
|
+
if (imageTimer) {
|
|
157
|
+
clearTimeout(imageTimer)
|
|
158
|
+
imageTimer = null
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
// 启动图片自动切换定时器
|
|
163
|
+
const startImageTimer = () => {
|
|
164
|
+
clearImageTimer()
|
|
165
|
+
const currentItem = props.data[currentIndex.value]
|
|
166
|
+
|
|
167
|
+
// 只有当前是图片类型时才启动定时器
|
|
168
|
+
if (currentItem && currentItem.type === 'Image') {
|
|
169
|
+
const interval = props.imageInterval || 5000 // 默认5秒
|
|
170
|
+
imageTimer = setTimeout(() => {
|
|
171
|
+
if (swiperInstance) {
|
|
172
|
+
swiperInstance.slideNext()
|
|
173
|
+
}
|
|
174
|
+
}, interval)
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
// 处理幻灯片切换
|
|
179
|
+
const handleSlideChange = (index: number) => {
|
|
180
|
+
// 清除之前的定时器
|
|
181
|
+
clearImageTimer()
|
|
182
|
+
pauseVideo()
|
|
183
|
+
currentIndex.value = index
|
|
184
|
+
|
|
185
|
+
const currentItem = props.data[currentIndex.value]
|
|
186
|
+
if (currentItem.type === 'Video') {
|
|
187
|
+
playVideo()
|
|
188
|
+
} else if (currentItem.type === 'Image') {
|
|
189
|
+
// 启动图片自动切换定时器
|
|
190
|
+
startImageTimer()
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
// 视频播放完成
|
|
195
|
+
const onVideoEnded = () => {
|
|
196
|
+
isPlaying.value = false
|
|
197
|
+
|
|
198
|
+
// 如果启用了视频自动切换下一项
|
|
199
|
+
if (props.videoAutoNext !== false && swiperInstance) { // 默认为true,除非明确设置为false
|
|
200
|
+
setTimeout(() => {
|
|
201
|
+
swiperInstance.slideNext()
|
|
202
|
+
}, 200) // 延迟200ms后切换,给用户一点反应时间
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
// 保存所有 video 元素的 ref
|
|
207
|
+
const videoElements = ref<HTMLVideoElement[]>([])
|
|
208
|
+
// 设置 ref 到数组中
|
|
209
|
+
import type { ComponentPublicInstance } from 'vue'
|
|
210
|
+
|
|
211
|
+
const setVideoRef = (el: Element | ComponentPublicInstance | null, index: number) => {
|
|
212
|
+
// If el is a Vue component instance, get its $el property
|
|
213
|
+
const element = (el && '$el' in el) ? (el as ComponentPublicInstance).$el : el
|
|
214
|
+
if (element instanceof HTMLVideoElement) {
|
|
215
|
+
videoElements.value[index] = element
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
const isPlaying = ref<boolean>(false)
|
|
220
|
+
// 播放视频
|
|
221
|
+
const playVideo = () => {
|
|
222
|
+
if (videoElements.value[currentIndex.value]) {
|
|
223
|
+
videoElements.value[currentIndex.value].play()
|
|
224
|
+
isPlaying.value = true
|
|
225
|
+
// 播放视频时清除图片定时器
|
|
226
|
+
clearImageTimer()
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
// 暂停视频
|
|
231
|
+
const pauseVideo = () => {
|
|
232
|
+
if (videoElements.value[currentIndex.value]) {
|
|
233
|
+
videoElements.value[currentIndex.value].pause()
|
|
234
|
+
isPlaying.value = false
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
const showVideo = ref<boolean>(false)
|
|
239
|
+
const videoElement = ref<HTMLVideoElement>()
|
|
240
|
+
const videoSrc = ref<string>()
|
|
241
|
+
const handlePlayAll = () => {
|
|
242
|
+
pauseVideo()
|
|
243
|
+
videoSrc.value = props.data[currentIndex.value].videoSrc
|
|
244
|
+
nextTick(() => {
|
|
245
|
+
showVideo.value = true
|
|
246
|
+
videoElement.value?.play()
|
|
247
|
+
})
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
const handleCancel = () => {
|
|
251
|
+
videoElement.value?.pause()
|
|
252
|
+
showVideo.value = false
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
// 生命周期
|
|
256
|
+
onMounted(async () => {
|
|
257
|
+
await initSwiper()
|
|
258
|
+
handleSlideChange(0)
|
|
259
|
+
})
|
|
260
|
+
|
|
261
|
+
onUnmounted(() => {
|
|
262
|
+
// 清理定时器
|
|
263
|
+
clearImageTimer()
|
|
264
|
+
|
|
265
|
+
// 销毁 Swiper 实例
|
|
266
|
+
if (swiperInstance) {
|
|
267
|
+
swiperInstance.destroy(true, true)
|
|
268
|
+
}
|
|
269
|
+
})
|
|
270
|
+
|
|
271
|
+
defineExpose({
|
|
272
|
+
initSwiper
|
|
273
|
+
})
|
|
274
|
+
</script>
|
|
275
|
+
|
|
276
|
+
<style lang="scss" scoped>
|
|
277
|
+
// Swiper 容器样式
|
|
278
|
+
.swiper-container {
|
|
279
|
+
position: relative;
|
|
280
|
+
width: 100%;
|
|
281
|
+
height: auto;
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
.swiper-slide {
|
|
285
|
+
position: relative;
|
|
286
|
+
width: 100%;
|
|
287
|
+
aspect-ratio: 1 / 0.455; /* 宽高比为 1 : 0.455,即 height = width * 45.5% */
|
|
288
|
+
overflow: hidden; // 隐藏超出部分
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
@media (min-width: 768px) {
|
|
292
|
+
.swiper-slide {
|
|
293
|
+
min-height:400px; // 移动端固定高度
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
.swiper-slide__link {
|
|
298
|
+
position: absolute;
|
|
299
|
+
width: 100%;
|
|
300
|
+
height: 100%;
|
|
301
|
+
left: 0;
|
|
302
|
+
top: 0;
|
|
303
|
+
z-index: 2;
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
.swiper-slide__media {
|
|
307
|
+
position: absolute;
|
|
308
|
+
top: 0;
|
|
309
|
+
left: 0;
|
|
310
|
+
width: 100%;
|
|
311
|
+
height: 100%;
|
|
312
|
+
z-index: 1;
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
.swiper-slide__media img {
|
|
316
|
+
width: 100%;
|
|
317
|
+
height: 100%;
|
|
318
|
+
object-fit: cover; // 裁剪多余部分,保持宽高比
|
|
319
|
+
display: block;
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
.swiper-slide__media .video-player {
|
|
323
|
+
position: absolute;
|
|
324
|
+
top: 0;
|
|
325
|
+
left: 0;
|
|
326
|
+
width: 100%;
|
|
327
|
+
height: 100%;
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
.swiper-slide__media .video-player video {
|
|
331
|
+
position: absolute;
|
|
332
|
+
top: 0;
|
|
333
|
+
left: 0;
|
|
334
|
+
width: 100%;
|
|
335
|
+
height: 100%;
|
|
336
|
+
object-fit: cover; // 裁剪多余部分,保持宽高比
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
.swiper-slide__body {
|
|
340
|
+
position: absolute;
|
|
341
|
+
top: 0;
|
|
342
|
+
width: 100%;
|
|
343
|
+
height: 100%;
|
|
344
|
+
display: flex;
|
|
345
|
+
flex-direction: column;
|
|
346
|
+
align-items: center;
|
|
347
|
+
justify-content: flex-end;
|
|
348
|
+
z-index: 2;
|
|
349
|
+
pointer-events: none;
|
|
350
|
+
padding: 20px;
|
|
351
|
+
box-sizing: border-box;
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
.swiper-slide__body__title {
|
|
355
|
+
color: #fff;
|
|
356
|
+
margin-bottom: 8px;
|
|
357
|
+
font-size: 40px;
|
|
358
|
+
font-weight: 500;
|
|
359
|
+
line-height: 1.2;
|
|
360
|
+
letter-spacing: .02em;
|
|
361
|
+
text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
@media (max-width: 1023.98px) {
|
|
365
|
+
.swiper-slide__body__title {
|
|
366
|
+
font-size: 32px;
|
|
367
|
+
font-weight: 500;
|
|
368
|
+
line-height: 1.2;
|
|
369
|
+
letter-spacing: .02em;
|
|
370
|
+
}
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
@media (max-width: 767.98px) {
|
|
374
|
+
.swiper-slide__body__title {
|
|
375
|
+
font-size: 24px;
|
|
376
|
+
line-height: 1.09;
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
.swiper-slide__body__link {
|
|
381
|
+
background: none;
|
|
382
|
+
border: none;
|
|
383
|
+
font-size: 16px;
|
|
384
|
+
font-weight: 500;
|
|
385
|
+
line-height: 1.5;
|
|
386
|
+
letter-spacing: .01em;
|
|
387
|
+
color: #fff;
|
|
388
|
+
text-decoration: none;
|
|
389
|
+
margin-bottom: 40px;
|
|
390
|
+
padding: 0 0 1px;
|
|
391
|
+
position: relative;
|
|
392
|
+
pointer-events: visible;
|
|
393
|
+
cursor: pointer;
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
@media (max-width: 1023.98px) {
|
|
397
|
+
.swiper-slide__body__link {
|
|
398
|
+
line-height: 1.25;
|
|
399
|
+
letter-spacing: .04em;
|
|
400
|
+
}
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
@media (max-width: 767.98px) {
|
|
404
|
+
.swiper-slide__body__link {
|
|
405
|
+
font-size: 14px;
|
|
406
|
+
line-height: 1.285;
|
|
407
|
+
letter-spacing: .02em;
|
|
408
|
+
margin-bottom: 30px;
|
|
409
|
+
}
|
|
410
|
+
}
|
|
411
|
+
|
|
412
|
+
.swiper-slide__body__link:after {
|
|
413
|
+
content: "";
|
|
414
|
+
width: 100%;
|
|
415
|
+
height: 1px;
|
|
416
|
+
background-color: #fff;
|
|
417
|
+
right: 0;
|
|
418
|
+
bottom: 0;
|
|
419
|
+
position: absolute;
|
|
420
|
+
}
|
|
421
|
+
|
|
422
|
+
.swiper-slide__body__link--hide {
|
|
423
|
+
opacity: 0;
|
|
424
|
+
pointer-events: none;
|
|
425
|
+
}
|
|
426
|
+
|
|
427
|
+
.swiper-slide__body__link:hover:after {
|
|
428
|
+
animation: link-animation .6s;
|
|
429
|
+
animation-fill-mode: both;
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
@keyframes link-animation {
|
|
433
|
+
0% {
|
|
434
|
+
width: 100%;
|
|
435
|
+
right: 0;
|
|
436
|
+
left: auto;
|
|
437
|
+
}
|
|
438
|
+
50% {
|
|
439
|
+
width: 0;
|
|
440
|
+
right: 0;
|
|
441
|
+
left: auto;
|
|
442
|
+
}
|
|
443
|
+
50.1% {
|
|
444
|
+
left: 0;
|
|
445
|
+
right: auto;
|
|
446
|
+
}
|
|
447
|
+
to {
|
|
448
|
+
width: 100%;
|
|
449
|
+
left: 0;
|
|
450
|
+
right: auto;
|
|
451
|
+
}
|
|
452
|
+
}
|
|
453
|
+
|
|
454
|
+
.swiper-slide__body__play {
|
|
455
|
+
position: absolute;
|
|
456
|
+
border: none;
|
|
457
|
+
left: 50%;
|
|
458
|
+
top: 40%;
|
|
459
|
+
width: 52.5px;
|
|
460
|
+
height: 52.5px;
|
|
461
|
+
transform: translate(-50%, -50%);
|
|
462
|
+
background-image: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNjEiIGhlaWdodD0iNjAiIHZpZXdCb3g9IjAgMCA2MSA2MCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGNpcmNsZSBvcGFjaXR5PSIwLjciIGN4PSIzMC4yNDE3IiBjeT0iMzAiIHI9IjI2LjI1IiBmaWxsPSIjMDAxRTYwIi8+CjxwYXRoIGQ9Ik00My43NDE3IDI5LjEzNEM0NC40MDg0IDI5LjUxODkgNDQuNDA4NCAzMC40ODExIDQzLjc0MTcgMzAuODY2TDI0LjI0MTcgNDIuMTI0NEMyMy41NzUgNDIuNTA5MyAyMi43NDE3IDQyLjAyODEgMjIuNzQxNyA0MS4yNTgzTDIyLjc0MTcgMTguNzQxN0MyMi43NDE3IDE3Ljk3MTkgMjMuNTc1IDE3LjQ5MDcgMjQuMjQxNyAxNy44NzU2TDQzLjc0MTcgMjkuMTM0WiIgZmlsbD0id2hpdGUiLz4KPC9zdmc+Cg==);
|
|
463
|
+
background-position: 50%;
|
|
464
|
+
background-size: cover;
|
|
465
|
+
background-repeat: no-repeat;
|
|
466
|
+
background-color: transparent;
|
|
467
|
+
z-index: 3;
|
|
468
|
+
transition: opacity .3s ease-in-out;
|
|
469
|
+
pointer-events: visible;
|
|
470
|
+
cursor: pointer;
|
|
471
|
+
}
|
|
472
|
+
|
|
473
|
+
.swiper-slide__body__play--hide {
|
|
474
|
+
pointer-events: none;
|
|
475
|
+
opacity: 0;
|
|
476
|
+
}
|
|
477
|
+
|
|
478
|
+
// Swiper 导航按钮样式
|
|
479
|
+
.swiper-button-next,
|
|
480
|
+
.swiper-button-prev {
|
|
481
|
+
color: #fff;
|
|
482
|
+
background: rgba(0, 0, 0, 0.3);
|
|
483
|
+
border-radius: 50%;
|
|
484
|
+
width: 44px;
|
|
485
|
+
height: 44px;
|
|
486
|
+
margin-top: -22px;
|
|
487
|
+
|
|
488
|
+
&:after {
|
|
489
|
+
font-size: 18px;
|
|
490
|
+
}
|
|
491
|
+
|
|
492
|
+
&:hover {
|
|
493
|
+
background: rgba(0, 0, 0, 0.5);
|
|
494
|
+
}
|
|
495
|
+
}
|
|
496
|
+
|
|
497
|
+
// Swiper 分页器样式
|
|
498
|
+
.swiper-pagination {
|
|
499
|
+
bottom: 20px;
|
|
500
|
+
|
|
501
|
+
:deep(.swiper-pagination-bullet) {
|
|
502
|
+
background: rgba(255, 255, 255, 0.5);
|
|
503
|
+
opacity: 1;
|
|
504
|
+
|
|
505
|
+
&.swiper-pagination-bullet-active {
|
|
506
|
+
background: #fff;
|
|
507
|
+
}
|
|
508
|
+
}
|
|
509
|
+
}
|
|
510
|
+
|
|
511
|
+
// 响应式调整
|
|
512
|
+
@media (max-width: 767.98px) {
|
|
513
|
+
.swiper-button-next,
|
|
514
|
+
.swiper-button-prev {
|
|
515
|
+
width: 36px;
|
|
516
|
+
height: 36px;
|
|
517
|
+
margin-top: -18px;
|
|
518
|
+
|
|
519
|
+
&:after {
|
|
520
|
+
font-size: 14px;
|
|
521
|
+
}
|
|
522
|
+
}
|
|
523
|
+
|
|
524
|
+
.swiper-pagination {
|
|
525
|
+
bottom: 15px;
|
|
526
|
+
}
|
|
527
|
+
}
|
|
528
|
+
|
|
529
|
+
.video-box {
|
|
530
|
+
width: 1200px;
|
|
531
|
+
height: auto;
|
|
532
|
+
|
|
533
|
+
video {
|
|
534
|
+
width: 100%;
|
|
535
|
+
height: 100%;
|
|
536
|
+
}
|
|
537
|
+
}
|
|
538
|
+
</style>
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
export const compJsonData = [
|
|
2
|
+
{
|
|
3
|
+
label: "Common",
|
|
4
|
+
key: "common",
|
|
5
|
+
image: "",
|
|
6
|
+
children: [
|
|
7
|
+
{ label: "CustomSpace", key: "custom_space", image: "" },
|
|
8
|
+
{ label: "CustomText", key: "custom_text", image: "" },
|
|
9
|
+
{ label: "QuoteText", key: "quote_text", image: "" },
|
|
10
|
+
{ label: "ArticleList", key: "article_list", image: "" },
|
|
11
|
+
{ label: "ArticleListPureText", key: "article_list_pure_text", image: "" },
|
|
12
|
+
{ label: "Shared Component", key: "shared_component", image: "" },
|
|
13
|
+
],
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
label: "Media",
|
|
17
|
+
key: "media",
|
|
18
|
+
image: "",
|
|
19
|
+
children: [
|
|
20
|
+
{ label: "MedialmageFull", key: "media_image_full", image: "" },
|
|
21
|
+
{ label: "MedialmageStatic", key: "media_image_static", image: "" },
|
|
22
|
+
{ label: "MediaVideo", key: "media_video", image: "" },
|
|
23
|
+
],
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
label: "Links",
|
|
27
|
+
key: "links",
|
|
28
|
+
image: "",
|
|
29
|
+
children: [
|
|
30
|
+
{ label: "BtnList", key: "btn_list", image: "" },
|
|
31
|
+
{ label: "LinkList", key: "link_list", image: "" },
|
|
32
|
+
{ label: "DonorLinks", key: "donor_links", image: "" },
|
|
33
|
+
{ label: "GridLinks", key: "grid_links", image: "" },
|
|
34
|
+
{ label: "DetailLink", key: "detail_link", image: "" },
|
|
35
|
+
{ label: "InformationLink", key: "information_link", image: "" },
|
|
36
|
+
],
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
label: "Headers",
|
|
40
|
+
key: "headers",
|
|
41
|
+
image: "",
|
|
42
|
+
children: [
|
|
43
|
+
{ label: "BannerPage", key: "banner_page", image: "" },
|
|
44
|
+
{ label: "BannerImage", key: "banner_image", image: "" },
|
|
45
|
+
{ label: "MapStatic", key: "map_static", image: "" },
|
|
46
|
+
{ label: "VrTour", key: "vr_tour", image: "" },
|
|
47
|
+
],
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
label: "Collections",
|
|
51
|
+
key: "collections",
|
|
52
|
+
image: "",
|
|
53
|
+
children: [
|
|
54
|
+
{ label: "HeroSlide", key: "hero_slide", image: "" },
|
|
55
|
+
{ label: "AccordionText", key: "accordion_text", image: "" },
|
|
56
|
+
{ label: "CardCarousel (Profiles)", key: "card_carousel_profiles", image: "" },
|
|
57
|
+
{ label: "CardCarouselMultiRow (Profiles)", key: "card_carousel_multi_row_profiles", image: "" },
|
|
58
|
+
{ label: "CardList (Circle)", key: "card_list_circle", image: "" },
|
|
59
|
+
{ label: "CardList (Programme)", key: "card_list_programme", image: "" },
|
|
60
|
+
{ label: "CardList (School)", key: "card_list_school", image: "" },
|
|
61
|
+
{ label: "CardShowcaseProfile", key: "card_showcase_profile", image: "" },
|
|
62
|
+
{ label: "CarouselLogo", key: "carousel_logo", image: "" },
|
|
63
|
+
{ label: "Resources", key: "resources", image: "" },
|
|
64
|
+
{ label: "ResourcesTwo", key: "resources_two", image: "" },
|
|
65
|
+
{ label: "Process", key: "process", image: "" },
|
|
66
|
+
{ label: "TableTwo", key: "table_two", image: "" },
|
|
67
|
+
{ label: "GalleryList (Default)", key: "gallery_list_default", image: "" },
|
|
68
|
+
{ label: "GalleryList (Caption)", key: "gallery_list_caption", image: "" },
|
|
69
|
+
{ label: "GalleryList (Caption - Round)", key: "gallery_list_caption_round", image: "" },
|
|
70
|
+
{ label: "GalleryList (Timeline - One Column)", key: "gallery_list_timeline_one_column", image: "" },
|
|
71
|
+
{ label: "GalleryList (Timeline - Two Columns)", key: "gallery_list_timeline_two_columns", image: "" },
|
|
72
|
+
{ label: "TabDefault", key: "tab_default", image: "" },
|
|
73
|
+
{ label: "TabTimeline", key: "tab_timeline", image: "" },
|
|
74
|
+
{ label: "Disc", key: "disc", image: "" },
|
|
75
|
+
{ label: "BasicCollapse", key: "basic_collapse", image: "" },
|
|
76
|
+
{ label: "TableCollapse", key: "table_collapse", image: "" },
|
|
77
|
+
{ label: "MediaLogo", key: "media_logo", image: "" },
|
|
78
|
+
{ label: "CollapseCustom", key: "collapse_custom", image: "" },
|
|
79
|
+
{ label: "ScrollKeyInfo", key: "scroll_key_info", image: "" },
|
|
80
|
+
{ label: "CardCarouselMultiRow (Articles)", key: "card_carousel_multi_row_articles", image: "" },
|
|
81
|
+
{ label: "Publications", key: "publications", image: "" },
|
|
82
|
+
],
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
label: "Contact Information",
|
|
86
|
+
key: "contact_information",
|
|
87
|
+
image: "",
|
|
88
|
+
children: [
|
|
89
|
+
{ label: "ContactUsInfo", key: "contact_us_info", image: "" },
|
|
90
|
+
{ label: "ContactUsList", key: "contact_us_list", image: "" },
|
|
91
|
+
],
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
label: "Sections",
|
|
95
|
+
key: "sections",
|
|
96
|
+
image: "",
|
|
97
|
+
children: [
|
|
98
|
+
{ label: "Sections (Pages, updating URL)", key: "sections_pages_updating_url", image: "" },
|
|
99
|
+
{ label: "Sections (Logos, not updating URL)", key: "sections_logos_not_updating_url", image: "" },
|
|
100
|
+
],
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
label: "Others",
|
|
104
|
+
key: "others",
|
|
105
|
+
image: "",
|
|
106
|
+
children: [
|
|
107
|
+
{ label: "Articleitem", key: "article_item", image: "" },
|
|
108
|
+
{ label: "CountDown", key: "count_down", image: "" },
|
|
109
|
+
{ label: "Customlframe", key: "custom_iframe", image: "" },
|
|
110
|
+
{ label: "TheHistoryCarousel", key: "the_history_carousel", image: "" },
|
|
111
|
+
{ label: "TimelineStory", key: "timeline_story", image: "" },
|
|
112
|
+
{ label: "RegisterForm (Event)", key: "register_form_event", image: "" },
|
|
113
|
+
],
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
label: "YCYW 90th",
|
|
117
|
+
key: "ycyw_90th",
|
|
118
|
+
image: "",
|
|
119
|
+
children: [
|
|
120
|
+
{ label: "BackgroundWrapper", key: "background_wrapper", image: "" },
|
|
121
|
+
{ label: "BannerQuote", key: "banner_quote", image: "" },
|
|
122
|
+
{ label: "BannerlmageWithLink", key: "banner_image_with_link", image: "" },
|
|
123
|
+
{ label: "BlessingMessage", key: "blessing_message", image: "" },
|
|
124
|
+
{ label: "BlessingSlider", key: "blessing_slider", image: "" },
|
|
125
|
+
{ label: "GalleryBlock", key: "gallery_block", image: "" },
|
|
126
|
+
{ label: "RibbonBlock", key: "ribbon_block", image: "" },
|
|
127
|
+
],
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
label: "API-related Components",
|
|
131
|
+
key: "api_related_components",
|
|
132
|
+
image: "",
|
|
133
|
+
children: [
|
|
134
|
+
{ label: "NewsList", key: "news_list", image: "" },
|
|
135
|
+
{ label: "ExploreLinks", key: "explore_links", image: "" },
|
|
136
|
+
{ label: "CardShowcase", key: "card_showcase", image: "" },
|
|
137
|
+
{ label: "CardCarousel (Articles)", key: "card_carousel_articles", image: "" },
|
|
138
|
+
{ label: "CardCarouselMultiRow (Publications)", key: "card_carousel_multi_row_publications", image: "" },
|
|
139
|
+
{ label: "Alumni Community List", key: "alumni_community_list", image: "" },
|
|
140
|
+
{ label: "School Layout", key: "school_layout", image: "" },
|
|
141
|
+
],
|
|
142
|
+
},
|
|
143
|
+
];
|