vue 机场引导
@ alfsnd / vue-bootstrap-select (@alfsnd/vue-bootstrap-select)
A vue version of bootstrap select.
引导选择的Vue版本。
安装 (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
options
道具接受字符串数组
<v-select :options="['Item 1', 'Item 2']" />
And arrays of objects
和对象数组
<v-select :options="[{value: 1, text: 'Item 1'}, {value: 2, text: 'Item 2'}]" />
翻译自: https://vuejsexamples.com/a-vue-version-of-bootstrap-select/
vue 机场引导