wangrong
2026-08-30 761e5c5fa871959f60e15c971c8d83f2b53d0af5
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
<template>
  <div class="img-option-prefix">
    <Icon
      ><component
        :style="{ color: innerImageColor, width: '20px', height: '20px' }"
        class="svg-icon svg-background"
        :is="iconBoardMap[mainIconClass(url)]"
      ></component
    ></Icon>
  </div>
</template>
 
<script setup lang="ts">
import { iconBoardMap } from '@/components/icon-group/board-list'
import { toRefs } from 'vue'
import { Icon } from '@/components/icon-custom'
 
const props = withDefaults(
  defineProps<{
    url: any
    innerImageColor: string
  }>(),
  {}
)
 
const { innerImageColor } = toRefs(props)
 
const mainIconClass = url => {
  return url.replace('board/', '').replace('.svg', '')
}
</script>
 
<style scoped lang="less">
.img-option-prefix {
  width: 20px;
  height: 20px;
  display: flex;
  flex-direction: column;
  align-content: center;
}
</style>