2022-09-07 13:00:03 +00:00
|
|
|
<template>
|
2022-09-08 08:28:56 +00:00
|
|
|
<view
|
|
|
|
|
class="banner h-[340rpx] bg-white translate-y-0"
|
|
|
|
|
v-if="content.data.length && content.enabled"
|
|
|
|
|
>
|
2022-09-07 13:00:03 +00:00
|
|
|
<swiper
|
|
|
|
|
class="swiper h-full"
|
2022-09-08 08:28:56 +00:00
|
|
|
:indicator-dots="content.data.length > 1"
|
2022-09-07 13:00:03 +00:00
|
|
|
indicator-active-color="#4173ff"
|
|
|
|
|
:autoplay="true"
|
|
|
|
|
>
|
|
|
|
|
<swiper-item v-for="(item, index) in content.data" :key="index">
|
2022-09-08 08:28:56 +00:00
|
|
|
<u-image
|
|
|
|
|
mode="aspectFit"
|
|
|
|
|
width="100%"
|
|
|
|
|
height="100%"
|
|
|
|
|
:src="getImageUrl(item.image)"
|
|
|
|
|
/>
|
2022-09-07 13:00:03 +00:00
|
|
|
</swiper-item>
|
|
|
|
|
</swiper>
|
|
|
|
|
</view>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script setup lang="ts">
|
2022-09-08 08:28:56 +00:00
|
|
|
import { useAppStore } from '@/stores/app'
|
|
|
|
|
|
2022-09-07 13:00:03 +00:00
|
|
|
const props = defineProps({
|
|
|
|
|
content: {
|
|
|
|
|
type: Object,
|
|
|
|
|
default: () => ({})
|
|
|
|
|
},
|
|
|
|
|
styles: {
|
|
|
|
|
type: Object,
|
|
|
|
|
default: () => ({})
|
|
|
|
|
}
|
|
|
|
|
})
|
2022-09-08 08:28:56 +00:00
|
|
|
const { getImageUrl } = useAppStore()
|
2022-09-07 13:00:03 +00:00
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style></style>
|