An open API service indexing awesome lists of open source software.

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

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).