You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
79 lines
1.4 KiB
79 lines
1.4 KiB
<template>
|
|
<view v-if="!isLoading" class="empty-content" :style="customStyle">
|
|
<view class="empty-icon">
|
|
<image class="image" src="/static/tabbar/cart_empty.jpg" mode="widthFix"></image>
|
|
</view>
|
|
<view class="tips">{{ tips }}</view>
|
|
<slot name="slot"></slot>
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
export default {
|
|
|
|
/**
|
|
* 组件的属性列表
|
|
* 用于组件自定义设置
|
|
*/
|
|
props: {
|
|
// 正在加载
|
|
isLoading: {
|
|
type: Boolean,
|
|
default: true
|
|
},
|
|
// 自定义样式
|
|
customStyle: {
|
|
type: Object,
|
|
default () {
|
|
return {}
|
|
}
|
|
},
|
|
// 提示的问题
|
|
tips: {
|
|
type: String,
|
|
default: '亲,暂无相关数据'
|
|
}
|
|
},
|
|
|
|
data() {
|
|
return {}
|
|
},
|
|
|
|
methods: {
|
|
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style lang="scss" scoped>
|
|
.empty-content {
|
|
box-sizing: border-box;
|
|
width: 100%;
|
|
padding: 140rpx 50rpx;
|
|
text-align: center;
|
|
margin-top: calc(50% - 200rpx);
|
|
|
|
.tips {
|
|
font-size: 28rpx;
|
|
color: gray;
|
|
margin: 50rpx 0;
|
|
}
|
|
.empty-icon {
|
|
padding: 0rpx;
|
|
width: 350rpx;
|
|
height: 350rpx;
|
|
border: #cfcfcf 1rpx solid;
|
|
border-radius: 50%;
|
|
margin-left: calc(50% - 175rpx);
|
|
z-index: 2;
|
|
background-color: #ffffff;
|
|
|
|
}
|
|
.image {
|
|
z-index: 1;
|
|
width: 245rpx;
|
|
margin-top: 50rpx;
|
|
}
|
|
|
|
}
|
|
</style>
|
|
|