1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
| <template>
| <!--本文件由FirstUI授权予四川政采招投标咨询有限公司(会员ID: 163,营业执照号:9 15 10131332 00 6 1 93K)专用,请尊重知识产权,勿私下传播,违者追究法律责任。-->
| <view class="fui-empty__wrap" :class="{'fui-empty__fixed':isFixed}" :style="{marginTop:marginTop+'rpx'}">
| <image :src="src" :style="{width:width+'rpx',height:height+'rpx'}" mode="widthFix" v-if="src"></image>
| <text class="fui-empty__title" :class="{'fui-empty__title-color':!color}"
| :style="{color:color,fontSize:size+'rpx'}" v-if="title">{{title}}</text>
| <text class="fui-empty__desc" :class="{'fui-empty__descr-color':!descrColor}"
| :style="{color:descrColor,fontSize:descrSize+'rpx'}" v-if="descr">{{descr}}</text>
| <slot></slot>
| </view>
| </template>
|
| <script>
| export default {
| name: "fui-empty",
| props: {
| src: {
| type: String,
| default: ''
| },
| width: {
| type: [Number, String],
| default: 576
| },
| height: {
| type: [Number, String],
| default: 318
| },
| title: {
| type: String,
| default: ''
| },
| // #ifdef APP-NVUE
| color: {
| type: String,
| default: '#333333'
| },
| // #endif
| // #ifndef APP-NVUE
| color: {
| type: String,
| default: ''
| },
| // #endif
| size: {
| type: [Number, String],
| default: 32
| },
| descr: {
| type: String,
| default: ''
| },
| // #ifdef APP-NVUE
| descrColor: {
| type: String,
| default: '#B2B2B2'
| },
| // #endif
| // #ifndef APP-NVUE
| descrColor: {
| type: String,
| default: ''
| },
| // #endif
| descrSize: {
| type: [Number, String],
| default: 24
| },
| isFixed: {
| type: Boolean,
| default: false
| },
| marginTop: {
| type: [Number, String],
| default: 0
| }
| }
| }
| </script>
|
| <style scoped>
| .fui-empty__wrap {
| flex: 1;
| /* #ifndef APP-NVUE */
| width: 100%;
| display: flex;
| /* #endif */
| flex-direction: column;
| align-items: center;
| justify-content: center;
| }
|
| .fui-empty__fixed {
| position: fixed;
| left: 0;
| /* #ifndef APP-NVUE */
| top: 50%;
| transform: translateY(-50%);
| /* #endif */
|
| /* #ifdef APP-NVUE */
| top: 0;
| right: 0;
| bottom: 0;
| /* #endif */
| z-index: 99;
| }
|
| .fui-empty__title {
| text-align: center;
| font-weight: 500;
| padding-top: 48rpx;
| }
|
| .fui-empty__desc {
| text-align: center;
| font-weight: normal;
| padding-top: 8rpx;
| }
|
| /* #ifndef APP-NVUE */
| .fui-empty__title-color {
| color: var(--fui-color-section, #333333) !important;
| }
|
| .fui-empty__descr-color {
| color: var(--fui-color-label, #B2B2B2) !important;
| }
|
| /* #endif */
| </style>
|
|