https://github.com/lassehaslev/vue-autocomplete
Simple autocomplete for vue
https://github.com/lassehaslev/vue-autocomplete
Last synced: about 1 month ago
JSON representation
Simple autocomplete for vue
- Host: GitHub
- URL: https://github.com/lassehaslev/vue-autocomplete
- Owner: LasseHaslev
- Created: 2017-03-12T10:04:24.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-03-31T17:25:16.000Z (over 9 years ago)
- Last Synced: 2025-02-05T12:52:22.695Z (over 1 year ago)
- Language: JavaScript
- Size: 16.6 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# @lassehaslev/vue-autocomplete
> Autocomplete input using Vue
## Installation
Run ```npm install @lassehaslev/vue-autocomplete --save``` in your project folder
## Usage
``` js
import {Autocomplete} from '@lassehaslev/vue-autocomplete';
export default {
template: `
`,
methods: {
adaptor( data ) {
return data.data;
},
onSearch( query ) {
return axios.get( 'http://localhost:1337/api/states?q=' + query );
},
onSelected( selected ) {
console.log( selected );
}
},
components: {
Autocomplete,
}
}
```
## Build Setup
``` bash
# install dependencies
npm install
# serve with hot reload at localhost:8080
npm run dev
# build for production with minification
npm run build
```
For detailed explanation on how things work, consult the [docs for vue-loader](http://vuejs.github.io/vue-loader).