Fix image path again
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user