wangrong
2026-08-30 4c949c0dc9bcae785c281c9d8125295f09810b15
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
<script lang="ts" setup>
import icon_file_font_colorful from '@/assets/svg/icon_file-font_colorful.svg'
import icon_deleteTrash_outlined from '@/assets/svg/icon_delete-trash_outlined.svg'
withDefaults(
  defineProps<{
    name?: string
    size?: string
  }>(),
  {
    name: '',
    size: ''
  }
)
 
const emits = defineEmits(['del'])
const del = () => {
  emits('del')
}
</script>
 
<template>
  <div class="font-info">
    <el-icon class="font">
      <Icon><icon_file_font_colorful class="svg-icon" /></Icon>
    </el-icon>
    <div class="info">
      <p class="name ellipsis">{{ name || '-' }}</p>
      <p class="size ellipsis">{{ size || '-' }}</p>
    </div>
    <el-icon @click="del" class="delete">
      <Icon name="icon_delete-trash_outlined"><icon_deleteTrash_outlined class="svg-icon" /></Icon>
    </el-icon>
  </div>
</template>
 
<style lang="less" scoped>
.font-info {
  display: flex;
  align-items: center;
  width: 100%;
  height: 58px;
  padding: 0 16px 0 12px;
  border-radius: 4px;
  border: 1px solid #dee0e3;
  .font {
    font-size: 40px;
    margin-right: 8px;
  }
 
  .info {
    font-family: var(--de-custom_font, 'PingFang');
    font-style: normal;
    font-weight: 400;
    width: 80%;
 
    .name {
      color: #1f2329;
      font-size: 14px;
      line-height: 22px;
      width: 100%;
    }
 
    .size {
      color: #8f959e;
      font-size: 12px;
      line-height: 20px;
    }
  }
 
  .delete {
    cursor: pointer;
    font-size: 16px;
    margin-left: auto;
  }
}
</style>