JSFiddle - React, Tailwind, and code Playground
HTML
<script src="https://unpkg.com/vue/dist/vue.js"></script>
<div id="app">
<p>{{ message }}</p>
<myselect v-bind:option="option"></myselect>
{{option}}
</div>
JavaScript
Vue.component('myselect', {
props: ['option'],
render: function(createElement) {
var self = this
return createElement(
'select', {
domProps: {
value: self.option.value
},
on: {
input: function(event) {
self.option.value = event.target.value
}
}
}, [
createElement('option', {
attrs: {
value: 0
}
}, 'Under 1'),
createElement('option', {
attrs: {
value: 1
}
}, '1'),
]
)
},
})
new Vue({
el: '#app',
data: {
message: 'Hello Vue.js!',
option: {
value: 0
}
}
})