接口对接
This commit is contained in:
52
components/Cn-empty/Cn-empty.vue
Normal file
52
components/Cn-empty/Cn-empty.vue
Normal file
@@ -0,0 +1,52 @@
|
||||
<template>
|
||||
<view class="empty" :style="{ paddingTop: paddingTop + 'rpx' }">
|
||||
<image :src="img" mode="aspectFill" class="empty-img"></image>
|
||||
<view class="empty-text">{{ msg }}</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: {
|
||||
msg: {
|
||||
type: String,
|
||||
default: '暂无数据',
|
||||
},
|
||||
img: {
|
||||
type: String,
|
||||
default: '/static/empty.png',
|
||||
},
|
||||
paddingTop: {
|
||||
type: Number,
|
||||
default: 70,
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.empty {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
top: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
}
|
||||
.empty-text {
|
||||
margin-top: 30rpx;
|
||||
font-size: 28rpx;
|
||||
font-family: PingFangSC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #666;
|
||||
line-height: 32rpx;
|
||||
}
|
||||
.empty-img {
|
||||
width: 244rpx;
|
||||
height: 320rpx;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user