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
| <script lang="ts" setup>
| defineProps({
| cardInfo: {
| type: Object,
| default() {
| return {
| name: '',
| icon: ''
| }
| }
| }
| })
| const emits = defineEmits(['openBlank'])
| const openBlank = () => {
| emits('openBlank')
| }
| </script>
|
| <template>
| <div class="doc-card" @click="openBlank">
| <div class="base-show">
| <Icon><component class="svg-icon item-top-icon" :is="cardInfo.icon"></component></Icon>
| </div>
| <div class="base-show show-content">{{ cardInfo.name }}</div>
| </div>
| </template>
|
| <style lang="less" scoped>
| .doc-card {
| padding: 8px 0;
| width: 96px;
| height: 66px;
| cursor: pointer;
| display: flex;
| flex-direction: column;
| align-items: center;
| &:hover,
| &:active {
| background-color: #1f23291a;
| border-radius: 4px;
| }
| }
|
| .show-content {
| font-size: 14px;
| color: #1f2329;
| line-height: 22px;
| font-weight: 400;
| margin-top: 4px;
| }
|
| .item-top-icon {
| width: 24px;
| height: 24px;
| }
| </style>
|
|