generated from duanshuwen/webapp-vue-frontend
Initial commit
This commit is contained in:
53
src/components/Empty.vue
Normal file
53
src/components/Empty.vue
Normal file
@@ -0,0 +1,53 @@
|
||||
<template>
|
||||
<div class="empty">
|
||||
<img class="empty__img" :src="img" />
|
||||
<div class="empty__desc" v-if="description" :style="{ color }">
|
||||
{{ description }}
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import imgEmpty from '@/assets/images/img_empty_order.png'
|
||||
|
||||
const props = defineProps({
|
||||
description: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
|
||||
img: {
|
||||
type: Object,
|
||||
default: imgEmpty
|
||||
},
|
||||
|
||||
color: {
|
||||
type: String,
|
||||
default: '#999999'
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.empty {
|
||||
width: 100%;
|
||||
height: 288px;
|
||||
@extend %flex-center;
|
||||
|
||||
&__img {
|
||||
width: 150px;
|
||||
height: 150px;
|
||||
display: block;
|
||||
margin: 105px auto 0;
|
||||
}
|
||||
|
||||
&__desc {
|
||||
font-size: 14px;
|
||||
font-family: PingFangSC-Regular, PingFang SC;
|
||||
color: #999999;
|
||||
line-height: 20px;
|
||||
text-align: center;
|
||||
margin-top: 8px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user