2
0
mirror of https://github.com/tenrok/vue-select.git synced 2026-06-10 07:52:23 +03:00
Files
vue-select/docs/.vuepress/components/SlotSelectedOption.vue
T
2021-08-01 12:30:50 -07:00

29 lines
596 B
Vue

<template>
<v-select v-model="selected" :options="books" label="title">
<template #selected-option="{ title, author }">
<div style="display: flex; align-items: baseline">
<strong>{{ title }}</strong>
<em style="margin-left: 0.5rem"
>by {{ author.firstName }} {{ author.lastName }}</em
>
</div>
</template>
</v-select>
</template>
<script>
const book = {
title: "Old Man's War",
author: {
firstName: 'John',
lastName: 'Scalzi',
},
}
export default {
data: () => ({
books: [book],
selected: book,
}),
}
</script>