vue-selector-search
v0.1.1
Published
Vue select search
Downloads
14
Readme
vue-selector-search
Description
This is a fast-implement vue selector with search available.
Advices, recommendations... are welcome :heart:
Live Demo
TODO List
- [ ] Review styles
- [ ] Add a live demo (Doc)
- [ ] Improve Styling
Usage
There are two ways of usage
Local scoped
- Add your import on top of you vue file.
import VueSelectorSearch from 'vue-selector-search';
- Add as a component into you Vue view/component.
components: {
VueSelectorSearch
}
- Add the component's tag into your template.
<VueSelectorSearch :options="options.roles" v-model="parameters.roles" />
Global Scoped
- Add your import on top of your main.js and add as a Vue plugin
import Vue from 'vue';
import VueSelectorSearch from 'vue-selector-search';
Vue.use(VueSelectorSearch);
- Use it wherever you want
<vue-selector-search :options="options.roles" v-model="parameters.roles" />
Parameters
- options This is a Object with attributes "label" and "value" whose will be displayed on the dropdown.
- v-model If you work with vue, you know that. Set there the parameter where the component will emit the value.
Return
Array of selected values. Values will be those given in the "options" parameter.