0👍
Try like following snippet:
new Vue({
el: '#demo',
data() {
return {
items: [{"select":["option1","option2","option3","option4"]}],
selected: ''
}
}
})
<script src="https://cdnjs.cloudflare.com/ajax/libs/vue/2.5.17/vue.js"></script>
<div id="demo">
<select v-model="selected">
<option disabled >Please select option</option>
<option v-for="(item, i) in items[0].select" :key="i" :value="item">
{{ item }}
</option>
</select>
<h3>{{ selected }}</h3>
</div>
- [Vuejs]-Ionic Vue pass Object via router-link
- [Vuejs]-Is there anyway to create a chart in Laravel without having to use routes and controllers?
Source:stackexchange.com