BannerSkeleton.uvue
1.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
<template>
<view class="swiper-loading">
<view class="skeleton-banner">
<un-skeleton :loading="loading" :animate="animate" :rows="0" :title="false" avatar avatar-shape="square" avatar-size="300"></un-skeleton>
</view>
<view class="skeleton-text">
<un-skeleton :loading="loading" :animate="animate" :rows="3" :title="true"></un-skeleton>
</view>
</view>
</template>
<script setup lang="uts">
defineProps({
loading: {
type: Boolean,
default: true
},
animate: {
type: Boolean,
default: true
}
});
</script>
<style scoped lang="scss">
.swiper-loading {
width: 100%;
height: 100%;
display: flex;
flex-direction: column;
box-sizing: border-box;
}
.skeleton-banner {
width: 100%;
flex: 1;
min-height: 250px;
box-sizing: border-box;
margin-bottom: 20px;
}
.skeleton-banner :deep(.u-skeleton__wrapper) {
width: 100%;
height: 100%;
display: flex;
}
.skeleton-banner :deep(.u-skeleton__avatar) {
width: 100% !important;
height: 100% !important;
border-radius: 8px !important;
}
.skeleton-text {
padding: 0 16px 20px;
}
</style>