surprise
2024-03-05 1ce1b525e7470ebaaeb0d5cd1e59bd905c1a7114
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
<template>
  <svg class="icon svg-icon" aria-hidden="true" :style="ClassStyle">
      <use :xlink:href="IconName"></use>
  </svg>
</template>
<script>
export default {
  name: 'svg-icon',
  props: {
    size: {
      type: [Number, String],
      default: 16
    },
    icon: {
      type: String,
      default: ''
    },
    fill: {
      type: String,
      default: ''
    }
  },
  computed: {
    ClassStyle () {
      return `width:${parseInt(this.size)};height:${parseInt(this.size)};fill:${this.fill};`
    },
    IconName () {
      return `#${this.icon}`
    }
  }
}
</script>
 
<style scoped>
 
</style>