How to add or override the height of this v-select2-component
?
The field is so small,
Code sample for reference: https://github.com/godbasin/vue-select2
Have tried but doest work: How do I change select2 box height
Install
// npm install
npm install v-select2-component --save
Use as component
import as global component.
// import Select2Component
import Select2 from 'v-select2-component';
Vue.component('Select2', Select2);
new Vue({
// ...
})
import into a single component.
// import Select2Component
import Select2 from 'v-select2-component';
<template>
<div>
<Select2 v-model="myValue" :options="myOptions" :settings="{ settingOption: value, settingOption: value }" @change="myChangeEvent($event)" @select="mySelectEvent($event)" />
<h4>Value: {{ myValue }}</h4>
</div>
</template>
<script>
export default {
// declare Select2Component
components: {Select2},
data() {
return {
myValue: '',
myOptions: ['op1', 'op2', 'op3'] // or [{id: key, text: value}, {id: key, text: value}]
}
},
methods: {
myChangeEvent(val){
console.log(val);
},
mySelectEvent({id, text}){
console.log({id, text})
}
}
}
</script>