Ninjas Practicing Multidimensionality

    vue-places

    2.2.2 • Public • Published

    vue-places

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

    Turn any into an address autocomplete

    circle-ci npm version Dependencies npm downloads code style: prettier License: MIT


    Installation

    # 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="options">
      </places>
    </template>
    
    <script>
    import Places from 'vue-places';
    
    export default {
      data() {
        return {
          options: {
            appId: <YOUR_PLACES_APP_ID>,
            apiKey: <YOUR_PLACES_API_KEY>,
            countries: ['US'],
          },
          form: {
            country: {
              label: null,
              data: {},
            },
          },
        };
      },
      components: {
        Places,
      },
    }
    </script>

    Algolia Places Documentation

    Install

    npm i vue-places

    DownloadsWeekly Downloads

    311

    Version

    2.2.2

    License

    MIT

    Unpacked Size

    54.6 kB

    Total Files

    8

    Last publish

    Collaborators

    • gomah