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
| <template>
| <div v-show="name" :title="title" class="iconShow" :name="name" :style="'width:'+fontSize+';height:'+fontSize+';font-size: '+fontSize+';'+style" v-html="svgHtml"></div>
| </template>
|
| <script>
| import func from "@/util/func";
| export default {
| name: "iconShow",
| props: {
| title:{
| type: String,
| default: ''
| },
| name: {
| type: String,
| default: ''
| },
| fontSize: {
| type: String,
| default:'20px'
| },
| style:{
| type: String,
| default:''
| }
| },
| computed:{
| svgHtml() {
| return func.getSVGByName(this.name);
| },
| },
| methods:{
| }
| }
| </script>
|
| <style lang="scss" scoped>
| ::v-deep {
| svg{
| font-size: inherit;
| height: 100%;
| width:100%;
| }
| }
| </style>
|
|