Notifications
Clear all
BugOverflow
1
Posty
1
Users
0
Reactions
817
Widok
0
13/08/2021 4:49 pm
Topic starter
example
1 Answer
0
13/08/2021 4:49 pm
Topic starter
Caller
<simple-select :options1="[{text: 'One', value: 1}, {text: 'Two', value: 2},]"></simple-select>
Component
<template> <MDBSelect v-model:options="options1" v-model:selected="selected1" filter/> <span>selected: {{ selectedText }}</span> </template> <script> import {MDBSelect} from "mdb-vue-ui-kit"; import {ref} from "vue"; const selected1 = ref(1); export default { components: { MDBSelect }, props: { options1: Object }, computed:{ selectedText(){ return this.options1[selected1.value-1].text; } }, setup() { return { selected1 }; } }; </script>