empty.vue
1 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
<template>
<view class="empty">
<u-empty icon="https://download.shjiuze.cn/assets/image/empty/list.png" text=" ">
<template #default>
<view class="empty__description">
<view v-if="status" class="status">{{ status }}</view>
<view v-if="tips" class="tips">{{ tips }}</view>
</view>
</template>
</u-empty>
</view>
</template>
<script>
export default {
name: 'Empty',
props: {
status: String,
tips: String,
},
};
</script>
<style lang="scss">
.empty {
.empty__description {
box-sizing: border-box;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
font-size: $font-md;
.status {
font-weight: bold;
font-size: $font-md;
color: $color-text;
text-align: center;
}
.tips {
box-sizing: border-box;
color: $color-text-caption;
margin-top: $padding-base;
font-size: $font-sm;
}
}
}
</style>