-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.vue
51 lines (46 loc) · 1016 Bytes
/
build.vue
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
<script>
export default {
name: 'md-{{icon}}',
serverCacheKey: props => {
return `md-{{icon}}:${props.color || 'default'}:${props.width}:${props.height}:${props.className || 'icon'}`;
},
props: {
className: [Object, Array, String],
width: {
type: Number,
'default': 24
},
height: {
type: Number,
'default': 24
},
viewBox: {
type: String,
'default': '0 0 24 24',
},
color: String
},
render (h) {
const data = {
staticClass: 'icon md-icon md-{{icon}}',
'class': this.className,
attrs: {
width: this.width,
height: this.height,
viewBox: this.viewBox,
xmlns: 'http://www.w3.org/2000/svg'
}
};
return h('svg', data, [
h('path', {
attrs: {
d: '{{path}}'
},
style: {
fill: this.color
}
})
]);
}
};
</script>