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
| <script lang="ts" setup>
| import icon_right_outlined from '@/assets/svg/icon_right_outlined.svg'
| defineProps({
| label: {
| type: String,
| default: ''
| },
| prefixIcon: {
| type: String,
| default: ''
| },
| nextlevel: {
| type: Boolean,
| default: false
| }
| })
|
| const emits = defineEmits(['click'])
| const handleClick = () => {
| emits('click')
| }
| </script>
|
| <template>
| <div class="dashboard-cell" @click="handleClick">
| <div class="label">
| <el-icon>
| <Icon><component class="svg-icon" :is="prefixIcon"></component></Icon>
| </el-icon>
| <span class="text ellipsis">
| {{ label }}
| </span>
| </div>
| <div class="switch" v-if="nextlevel">
| <el-icon>
| <Icon name="icon_right_outlined"><icon_right_outlined class="svg-icon" /></Icon>
| </el-icon>
| </div>
| </div>
| </template>
|
| <style lang="less" scoped>
| .dashboard-cell {
| width: 100%;
| height: 48px;
| position: relative;
| display: flex;
| align-items: center;
| justify-content: space-between;
| padding: 0 16px;
| background: #fff;
| &::after {
| content: '';
| background: #e4e5e7;
| height: 1px;
| width: calc(100% - 62px);
| transform: scaleY(0.5);
| position: absolute;
| left: 46px;
| bottom: 0;
| }
|
| .label {
| font-size: 16px;
| font-weight: 400;
| line-height: 22px;
| display: flex;
| max-width: calc(100% - 32px);
| align-items: center;
|
| .text {
| width: 100%;
| }
| .ed-icon {
| font-size: 22px;
| margin-right: 8px;
| }
| }
|
| .switch {
| display: flex;
| align-items: center;
| color: #8f959e;
| .ed-icon {
| font-size: 16px;
| }
| }
|
| &:nth-child(1) {
| &::after {
| display: none;
| }
| }
| }
| </style>
|
|