NoData.vue
766 字节
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
<template>
<div class="no-data">
<div class="bg"></div>
<div class="message">{{ nodata_message }}</div>
</div>
</template>
<script lang="ts">
export default {
name:'NoData',
props: {
nodata_message: {
type: String,
default: ''
},
},
}
</script>
<style lang="scss">
/*
没有数据的情况
*/
.no-data{
width: 100%;
text-align: center;
.bg{
margin-top: 10%;
height: 140px;
background: url(https://img2.ydniu.com/app/images/yiqiu/no_data.png) no-repeat center center;
background-size: 140px;
}
.message{
text-align: center;
font-size: 16px;
color:#333;
}
}
</style>