<template>
<view class="none-content" :style="{top:top}">
<image src="../../static/404.png" mode="widthFix"></image>
<view class="none-content-txt">{{tips}}</view>
</view>
</template>
<script>
export default{
name:'none-content',
props:{
tips:{
type:String,
value:'暂时没有相关内容'
},
src:{
type:String,
default:""
},
top:{
type:String,
default:"30%"
}
},
}
</script>
<style lang="scss">
.none-content{
width: 100%;
height: 280upx;
text-align: center;
position: fixed;
top: 30%;
&-txt{
font-size: 24upx;
color: #b3b3b3;
}
image{
width: 316upx;
height: 318upx;
}
}
</style>
上边是封装的组件
以下是在页面中的引用
在列表页的数据处理