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
| <script lang="ts" setup>
| import { PropType } from 'vue'
| import nothingInput from '@/assets/img/nothing-input.png'
| import nothingSelect from '@/assets/img/nothing-select.png'
| import nothingTable from '@/assets/img/nothing-table.png'
| import none from '@/assets/img/none.png'
| import error from '@/assets/img/error.png'
| import nothingTree from '@/assets/img/nothing-tree.png'
| import nothingNone from '@/assets/img/nothing-none.png'
| defineProps({
| imgType: {
| type: String as PropType<
| 'input' | 'select' | 'table' | 'none' | 'noneWhite' | 'tree' | 'error'
| >,
| default: 'table'
| },
| imageSize: {
| type: Number,
| default: 125
| },
| description: {
| type: String,
| default: ''
| }
| })
| const getAssetsFile = {
| input: nothingInput,
| select: nothingSelect,
| table: nothingTable,
| noneWhite: nothingNone,
| tree: nothingTree,
| error,
| none
| }
| </script>
|
| <template>
| <el-empty
| class="empty-info"
| :imageSize="imageSize"
| :description="description"
| :image="getAssetsFile[imgType]"
| >
| <slot></slot>
| </el-empty>
| </template>
|
| <style lang="less" scoped>
| .empty-info {
| height: 100%;
| }
| :deep(.ed-empty__description) {
| margin-top: 8px;
|
| color: var(--N600, #646a73);
| text-align: center;
| /* 正文-字号 14,行高 22,字重适中(Regular),用于列表Feed会话 */
| font-family: var(--de-custom_font, 'PingFang');
| font-size: 14px;
| font-style: normal;
| font-weight: 400;
| line-height: 22px;
| }
| </style>
|
|