12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576 |
- <template>
- <view class="empty-content">
- <image class="empty-content-image" src="/static/icon_empty.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 {
- typeSrcall: {
- empty: 'https://img.caimei365.com/group1/M00/03/71/Cmis2F3wna6AcewRAAEtqt4jZmU397.png',
- },
- typeSrc: {
- empty: 'https://img.caimei365.com/group1/M00/03/71/Cmis2F3wna6AJZvwAAGWWe4DnXk371.png',
- },
- 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>
|