File tree 2 files changed +15
-5
lines changed
2 files changed +15
-5
lines changed Original file line number Diff line number Diff line change 1
1
<template >
2
2
<svg
3
- v-if =" !src"
3
+ v-if =" !src && !use "
4
4
xmlns =" http://www.w3.org/2000/svg"
5
5
:viewBox =" viewBox"
6
6
:class =" computedClasses"
7
7
v-html =" titleCode + iconCode"
8
8
role =" img"
9
9
></svg >
10
10
<img
11
- v-else
11
+ v-else-if = " src "
12
12
:src =" src"
13
13
role =" img"
14
14
/>
15
+ <svg
16
+ v-else-if =" use"
17
+ xmlns =" http://www.w3.org/2000/svg"
18
+ :class =" computedClasses"
19
+ role =" img"
20
+ >
21
+ <use :href =" use" ></use >
22
+ </svg >
15
23
</template >
16
24
17
25
<script >
@@ -29,7 +37,8 @@ export default {
29
37
},
30
38
customClasses: [String , Array , Object ],
31
39
src: String ,
32
- title: String
40
+ title: String ,
41
+ use: String
33
42
},
34
43
computed: {
35
44
iconName () {
Original file line number Diff line number Diff line change 1
1
import Vue from 'vue'
2
2
3
- export declare class CIcon extends Vue {
3
+ export declare class CIconRaw extends Vue {
4
4
name : string
5
5
content : [ string , Array < string > ]
6
6
size : string
7
7
customClasses : [ string , Array < any > , object ]
8
8
src : string
9
9
title : string
10
+ use : string
10
11
}
11
12
12
- export declare class CIconRaw extends CIcon { }
13
+ export declare class CIcon extends CIconRaw { }
You can’t perform that action at this time.
0 commit comments