2
0
mirror of https://github.com/tenrok/vue-select.git synced 2026-06-07 07:12:23 +03:00

Add reproduction for #790

This commit is contained in:
Jeff
2019-04-28 22:25:22 -07:00
parent 8c68718c84
commit 074c0b6686
@@ -0,0 +1,33 @@
<template>
<v-select :options="books" label="title">
<template #selected-option="{author, title}">
<component :is="option" v-bind="{author, title}"/>
</template>
<template #option="{author, title}">
<component :is="option" v-bind="{author, title}"/>
</template>
</v-select>
</template>
<script>
import vSelect from '../../../src/components/Select';
import books from '../data/books';
export default {
components: {vSelect},
computed: {
books: () => books,
option: () => ({
functional: true,
render: (h, {props}) => h('div', {class: {author: true}}, [
h('strong', props.title),
h('i', `${props.author.firstName} ${props.author.lastName}`),
]),
}),
},
};
</script>
<style scoped>
</style>