vue-bootstrap-typeahead (vue-bootstrap-typeahead)
A simple list-group based typeahead/autocomplete using Bootstrap 4 and Vue 2.
使用Bootstrap 4和Vue 2的基于列表组的简单预输入/自动完成功能。
安装 (Installation)
> npm i vue-bootstrap-typeahead --save
用法 (Usage)
Import and register the component
导入并注册组件
import VueBootstrapTypeahead from 'vue-bootstrap-typeahead'
// Global registration
Vue.component('vue-bootstrap-typeahead', VueBootstrapTypeahead)
// OR
// Local registration
export default {
components: {
VueBootstrapTypeahead
}
}
基本用法 (Basic Usage)
The only required attribute is a data
array.
唯一需要的属性是data
数组。
<vue-bootstrap-typeahead
v-model="query"
:data="['Canada', 'USA'