refactor: 增加工作台代码

This commit is contained in:
CaptainB 2022-12-07 15:40:46 +08:00
parent d592da5b4b
commit db1316610f
2 changed files with 0 additions and 54 deletions

View File

@ -1,43 +0,0 @@
<template>
<svg :class="svgClass" aria-hidden="true">
<use :xlink:href="iconName"/>
</svg>
</template>
<script>
export default {
name: 'SvgIcon',
props: {
iconClass: {
type: String,
required: true
},
className: {
type: String,
default: ''
}
},
computed: {
iconName () {
return `#icon-${this.iconClass}`
},
svgClass () {
if (this.className) {
return 'svg-icon ' + this.className
} else {
return 'svg-icon'
}
}
}
}
</script>
<style scoped>
.svg-icon {
width: 1em;
height: 1em;
vertical-align: center;
fill: currentColor;
overflow: hidden;
}
</style>

View File

@ -1,11 +0,0 @@
import SvgIcon from './SvgIcon';
const requireAll = requireContext => requireContext.keys().map(requireContext)
const req = require.context("../../assets/module", false, /\.svg$/)
requireAll(req)
export default {
install(Vue) {
Vue.component('svg-icon', SvgIcon)
}
}