Home Examples Charts Dashboard Projects Menu

Vue.js examples
Learn Vue.js

vue places

Related:
Vue: Step-By-Step Guide To Mastering Vue.js From Beginner To Advanced (Vue.js, Learning Vue js 2)

Places component is based on places.js for Vue 2.x.

This component is named vue-places.

Places provides an address search autocomplete JavaScript library. Added to an input box, this will auto suggest places.

Places.js lets you auto complete places:

places

Installation

You need npm or yarn to install this module.

# yarn
$ yarn add vue-places

# npm
$ npm install vue-places --save

Example

<template>
<places
v-model="form.country.label"
placeholder="Where are we going ?"
@change="val => { form.country.data = val }"
:options="{ countries: ['US'] }">
</places>
</template>

<script>
import Places from 'vue-places'

export default {
data() {
return {
form: {
country: {
label: null,
data: {},
},
},
};
},
components: {
Places
}
}
</script>

Github: http://github.com/Gomah/vue-places#readme


← vue tabs vue tiny pagination →

© vuejsexamples.net - Privacy Policy - Cookie Policy