add svg
This commit is contained in:
17
front/src/components/utils/SvgLoader.vue
Normal file
17
front/src/components/utils/SvgLoader.vue
Normal file
@@ -0,0 +1,17 @@
|
||||
<script setup lang="ts">
|
||||
import { defineProps } from "vue";
|
||||
|
||||
const props = defineProps({
|
||||
svg: { type: String, required: true },
|
||||
});
|
||||
|
||||
const pathSvg = () => require(`@/assets/svg/${props.svg}.svg`);
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div>
|
||||
<img class="it-has-a-tooltip" :src="pathSvg()" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style scoped></style>
|
||||
Reference in New Issue
Block a user