增加空组件

This commit is contained in:
YeMingfei666 2024-12-11 14:45:14 +08:00
parent 264739b6e7
commit 9b565065f9
1 changed files with 42 additions and 0 deletions

42
components/my-empty.vue Normal file
View File

@ -0,0 +1,42 @@
<template>
<view class="u-flex u-row-center ">
<view class="color-999 my-empty u-relative">{{text}}</view>
</view>
</template>
<script>
export default{
props:{
text:{
type:String,
default:'空空如也~'
}
},
data(){
return {
}
}
}
</script>
<style lang="scss" scoped>
.my-empty{
&:before,&::after{
content: '';
display: block;
position: absolute;
border-bottom: 1px solid #999;
top: 50%;
transform: translateY(-50%);
}
&:before{
left: -80rpx;
width: 60rpx;
}
&::after{
width: 60rpx;
right: -80rpx;
}
}
</style>