@alfsnd/vue-bootstrap-select
v0.4.4
Published
A vue version of bootstrap select
Downloads
4,475
Maintainers
Readme
@alfsnd/vue-bootstrap-select
A vue version of bootstrap select
Demo
Install
npm install @alfsnd/vue-bootstrap-select --save
Usage
import VSelect from '@alfsnd/vue-bootstrap-select'
export default {
name: 'app',
components: {
VSelect
},
data() {
return {
selectedValue: null
};
}
}
<template>
<div id="app">
<v-select :options="[{value: 1, text: 'Item 1'}, {value: 2, text: 'Item 2'}]" v-model="selectedValue" />
</div>
</template>
Passing options
The options
prop accepts arrays of strings
<v-select :options="['Item 1', 'Item 2']" />
And arrays of objects
<v-select :options="[{value: 1, text: 'Item 1'}, {value: 2, text: 'Item 2'}]" />