2022-03-01 23:07:58 +08:00
|
|
|
<script setup lang="ts">
|
2022-05-09 08:49:28 +08:00
|
|
|
import { leftCustomImgSponsors } from '../../config/sponsors'
|
|
|
|
import { sendEvent } from '../../config/analytics'
|
2022-04-04 12:07:33 +08:00
|
|
|
|
|
|
|
defineProps({
|
|
|
|
itemClass: String,
|
|
|
|
itemStyle: [String, Object, Array],
|
|
|
|
})
|
2022-05-09 08:49:28 +08:00
|
|
|
|
|
|
|
const onItemClick = (item: any) => {
|
|
|
|
sendEvent('sp_click', item.name, 'left_custom_img')
|
|
|
|
}
|
2022-03-01 23:07:58 +08:00
|
|
|
</script>
|
|
|
|
|
2021-11-03 15:14:45 +08:00
|
|
|
<template>
|
2022-06-06 14:30:24 +08:00
|
|
|
<div>
|
2022-04-03 17:28:59 +08:00
|
|
|
<a
|
2022-05-09 08:49:28 +08:00
|
|
|
v-for="item in leftCustomImgSponsors"
|
2022-04-03 17:28:59 +08:00
|
|
|
:key="item.name"
|
|
|
|
:href="item.url"
|
|
|
|
:title="`${item.name_cn || item.name} - ${item.slogan_cn || item.slogan}`"
|
2022-04-04 12:07:33 +08:00
|
|
|
:class="['sponsor-item inline-flex', itemClass]"
|
|
|
|
:style="itemStyle"
|
2022-04-03 17:28:59 +08:00
|
|
|
target="_blank"
|
2022-05-09 08:49:28 +08:00
|
|
|
@click="onItemClick(item)"
|
2022-04-03 17:28:59 +08:00
|
|
|
>
|
|
|
|
<img :src="item.banner_img" :alt="item.name" />
|
|
|
|
</a>
|
2021-11-03 15:14:45 +08:00
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<style scoped lang="scss">
|
2022-04-03 17:53:02 +08:00
|
|
|
@use '../styles/mixins.scss' as *;
|
|
|
|
|
2021-11-03 15:14:45 +08:00
|
|
|
.sponsor-item {
|
|
|
|
margin-bottom: 8px;
|
2022-04-03 16:59:06 +08:00
|
|
|
height: 60px;
|
2022-04-03 17:53:02 +08:00
|
|
|
width: 196px;
|
|
|
|
|
2022-04-04 12:07:33 +08:00
|
|
|
@include respond-to('max') {
|
2022-04-03 17:53:02 +08:00
|
|
|
width: 236px;
|
2022-04-03 18:37:29 +08:00
|
|
|
height: 72px;
|
2022-04-03 17:53:02 +08:00
|
|
|
}
|
|
|
|
|
2022-04-05 10:21:14 +08:00
|
|
|
@media (max-width: 767px) {
|
|
|
|
width: 236px;
|
|
|
|
height: 72px;
|
|
|
|
}
|
|
|
|
|
2021-11-03 15:14:45 +08:00
|
|
|
img {
|
|
|
|
border-radius: 8px;
|
|
|
|
overflow: hidden;
|
2022-04-03 17:53:02 +08:00
|
|
|
height: 100%;
|
|
|
|
width: 100%;
|
2021-11-03 15:14:45 +08:00
|
|
|
}
|
|
|
|
}
|
2022-04-03 17:53:02 +08:00
|
|
|
|
2021-11-21 19:20:35 +08:00
|
|
|
@media (max-width: 768px) {
|
|
|
|
.sponsor-item {
|
|
|
|
img {
|
|
|
|
border-radius: 4px;
|
2022-03-01 23:07:58 +08:00
|
|
|
min-height: 45px;
|
2021-11-21 19:20:35 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2021-11-03 15:14:45 +08:00
|
|
|
</style>
|