mirror of
https://github.com/apache/skywalking-booster-ui.git
synced 2025-05-13 16:27:33 +00:00
refactor: icon component
This commit is contained in:
parent
f8cd2849d2
commit
f6b075c11c
@ -24,22 +24,16 @@ limitations under the License. -->
|
||||
loading,
|
||||
}"
|
||||
>
|
||||
<use :href="symbolId"></use>
|
||||
<use :href="`#${iconName}`"></use>
|
||||
</svg>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import { computed } from "vue";
|
||||
/*global defineProps */
|
||||
const props = defineProps({
|
||||
defineProps({
|
||||
iconName: { type: String, default: "" },
|
||||
size: { type: String, default: "sm" },
|
||||
loading: { type: Boolean, default: false },
|
||||
prefix: {
|
||||
type: String,
|
||||
default: "icon",
|
||||
},
|
||||
});
|
||||
const symbolId = computed(() => `#${props.prefix}-${props.iconName}`);
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.icon {
|
||||
|
@ -48,7 +48,7 @@ export default ({ mode }: ConfigEnv): UserConfig => {
|
||||
// Specify the icon folder to be cached
|
||||
iconDirs: [path.resolve(__dirname, "./src/assets/icons")],
|
||||
// Specify symbolId format
|
||||
symbolId: "icon-[dir]-[name]",
|
||||
symbolId: "[name]",
|
||||
}),
|
||||
],
|
||||
resolve: {
|
||||
|
Loading…
Reference in New Issue
Block a user