Files
stacjownik/src/mixins/imageMixin.ts
T
2022-07-16 16:12:31 +02:00

14 lines
323 B
TypeScript

import { defineComponent } from 'vue';
export default defineComponent({
methods: {
getIcon(name: string, ext = 'svg') {
return new URL(`../assets/icon-${name}.${ext}`, import.meta.url).href;
},
getImage(name: string) {
return new URL(`../assets/${name}`, import.meta.url).href;
}
},
});