|
@@ -1,18 +1,21 @@
|
|
|
<template>
|
|
|
- <view v-if="list.length">
|
|
|
- <swiper :style="{
|
|
|
- width: tovw(width),
|
|
|
- height: tovw(height),
|
|
|
- }" :autoplay="autoplay" :interval="interval" circular>
|
|
|
- <swiper-item class="swiper-item" v-for="(item, index) in list" :key="item.list">
|
|
|
- <u--image @click="onClick(index)" :src="item.cover" :width="tovw(width)" :height="tovw(height)"
|
|
|
- mode="aspectFill" :lazy-load="true">
|
|
|
- <template v-slot:loading>
|
|
|
- <u-loading-icon color="red"></u-loading-icon>
|
|
|
- </template>
|
|
|
- </u--image>
|
|
|
- </swiper-item>
|
|
|
- </swiper>
|
|
|
+ <view>
|
|
|
+ <view v-if="list.length">
|
|
|
+ <swiper :style="{
|
|
|
+ width: tovw(width),
|
|
|
+ height: tovw(height),
|
|
|
+ }" :autoplay="autoplay" :interval="interval" circular>
|
|
|
+ <swiper-item class="swiper-item" v-for="(item, index) in list" :key="item.list">
|
|
|
+ <u--image @click="onClick(index)" :src="item.cover" :width="tovw(width)" :height="tovw(height)"
|
|
|
+ mode="aspectFill" :lazy-load="true">
|
|
|
+ <template v-slot:loading>
|
|
|
+ <u-loading-icon color="red"></u-loading-icon>
|
|
|
+ </template>
|
|
|
+ </u--image>
|
|
|
+ </swiper-item>
|
|
|
+ </swiper>
|
|
|
+ </view>
|
|
|
+ <view style="height: 10px;" v-else-if="empty" />
|
|
|
</view>
|
|
|
</template>
|
|
|
|
|
@@ -29,6 +32,10 @@ export default {
|
|
|
interval: {
|
|
|
type: [Number, String],
|
|
|
default: 5000
|
|
|
+ },
|
|
|
+ empty: {
|
|
|
+ type: Boolean,
|
|
|
+ default: false
|
|
|
}
|
|
|
},
|
|
|
data() {
|