1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071 |
- <template>
- <view class="empty-content">
- <image class="empty-content-image" :src="StaticUrl + '/icon/icon-remarks-empty@2x.png'" mode="aspectFit"></image>
- <text class="error-text">{{EmptyText}}</text>
- </view>
- </template>
- <script>
- export default {
- props: {
- src: {
- type: String,
- default: 'empty'
- },
- typeIndex:{
- type:String,
- default: 'empty'
- },
- navbarHeight:{
- type:Number
- }
- },
- data() {
- return {
- StaticUrl: this.$Static,
- EmptyText:'暂无数据~',
- }
- },
- created(){
- if(this.typeIndex==0){
- this.EmptyText = '暂无数据~'
- }else{
- this.EmptyText = '暂无数据~'
- }
- },
- computed: {
- setSrc() {
- let url
- if(this.typeIndex==0){
- url = this.typeSrcall[this.src]
- }else{
- url = this.typeSrc[this.src]
- }
- return url
- },
- },
- }
- </script>
- <style lang="scss">
- .empty-content {
- display: flex;
- align-items: center;
- justify-content: center;
- flex-direction: column;
- margin: auto;
- background: $bg-color;
- height: 700rpx;
- z-index: 999;
- &-image {
- width: 200rpx;
- height: 200rpx;
- }
- .error-text{
- font-size: $font-size-28;
- color: #666666;
- line-height: 88rpx;
- }
- }
- </style>
|