39 lines
927 B
Vue
39 lines
927 B
Vue
<script setup>
|
|
|
|
const props = defineProps({
|
|
items: {
|
|
type: Array,
|
|
required: true
|
|
}
|
|
});
|
|
</script>
|
|
|
|
<template>
|
|
<q-list bordered separator>
|
|
<q-item
|
|
clickable
|
|
v-ripple
|
|
:to="{name: 'aircraftDetail', params: {id: aircraft.id }}"
|
|
v-for="aircraft of props.items" :key="aircraft"
|
|
>
|
|
<q-item-section avatar>
|
|
<q-avatar v-if="aircraft.photoUrl">
|
|
<img :src="aircraft.photoUrl" alt=""/>
|
|
</q-avatar>
|
|
<q-avatar color="teal" text-color="white" icon="flight" v-else/>
|
|
</q-item-section>
|
|
<q-item-section>
|
|
<q-item-label label>
|
|
{{ aircraft.name }}
|
|
</q-item-label>
|
|
<q-item-label caption>
|
|
{{ aircraft.model }}
|
|
<template v-if="aircraft.manufacturer">
|
|
({{ aircraft.manufacturer }})
|
|
</template>
|
|
</q-item-label>
|
|
</q-item-section>
|
|
</q-item>
|
|
</q-list>
|
|
</template>
|