parent
6e1149ac59
commit
c36d23aaec
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,33 @@
|
||||
<template>
|
||||
<svg class="svg-icon" aria-hidden="true">
|
||||
<use :xlink:href="symbolId" rel="external nofollow" />
|
||||
</svg>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
// svg 组件
|
||||
export default {
|
||||
name: 'svg-icon',
|
||||
props: {
|
||||
name: {
|
||||
type: String,
|
||||
required: true
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
symbolId() {
|
||||
return `#icon-${this.name}`
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.svg-icon {
|
||||
width: 1.5em;
|
||||
height: 1.5em;
|
||||
vertical-align: -0.15em;
|
||||
fill: currentColor;
|
||||
overflow: hidden;
|
||||
}
|
||||
</style>
|
After Width: | Height: | Size: 836 B |
After Width: | Height: | Size: 1.1 KiB |
Loading…
Reference in new issue