0👍
This is my working example without v-model same sens, i just appointed value to data
Template
<v-select :onChange="initialPriceControll" :options="price_types"></v-select>`,
js: `export default {
data() {
return {
price_type:'Fixed',
price_types: [
'Fixed',
'Negotiable',
'Giveaway'
],
show_negotiable_price: false
}
},
methods: {
initialPriceControll(e){
this.price_type = e;
if (e == 'Negotiable') {
this.show_negotiable_price = true
} else {
this.show_negotiable_price = false
}
this.$emit('selectPrice', {
display: this.show_negotiable_price,
price_type: this.price_type
});
}
}
}
0👍
in template:
<v-select
v-model="theModel"
v-bind:items="['a', 'b', 'c', 'd']"
label="theLabel"
></v-select>
in script:
data() {
return {
theModel: ""
}
}
- [Vuejs]-Custom font is not showing on Electron + Vue App
- [Vuejs]-Vue/Nuxt.js: How to handle 404 on nested routes (nuxt-child)
0👍
rather than v-model="xxx"
You can use v-model:selected="xxx"
You will get an array
references:
- [Vuejs]-Dynamic components doesn't work in script setup
- [Vuejs]-How do I use sass to make my class name dynamic depending on vue.js binding?
Source:stackexchange.com