Fix image path again

This commit is contained in:
2025-09-07 04:00:11 +02:00
parent 04bdcfca88
commit f1e6a0355d
2 changed files with 4 additions and 7 deletions
+3 -6
View File
@@ -7,17 +7,14 @@ import { VaChip } from 'vuestic-ui';
const props = defineProps<{ car: ReturnType<typeof getType> }>();
const details = computed(() => (props.car ? trams.find((t) => t.id === props.car!.id) : undefined));
const baseUrl = import.meta.env.BASE || '/';
</script>
<template>
<div class="grid grid-cols-2 gap-2">
<p>Lackierung</p>
<img
v-if="details?.img"
class="h-[30px]"
:src="`${import.meta.env.BASE || '/'}${details?.img}`"
:alt="car?.type"
/>
<img v-if="details?.img" class="h-[30px]" :src="`${baseUrl}${details?.img}`" :alt="car?.type" />
<span v-else class="h-[30px]"></span>
<p>Fahrzeug-Nr.</p>
<p>{{ car?.id }}</p>