1.0.5 • Published 3 years ago

@fivestarsmobi/vue-dadata v1.0.5

Weekly downloads
15
License
MIT
Repository
github
Last release
3 years ago

Vue Dadata

Publish

It's a vue component for hinting addresses using DaData.ru.

Link to RU documentation

Install

npm package

$ npm install @fivestarsmobi/vue-dadata --save

Usage

Global

import VueDadata from '@fivestarsmobi/vue-dadata'

Vue.use(VueDadata)

Local

<template>
  <div id="app">
    <vue-dadata token="dadata_api_key"></vue-dadata>
  </div>
</template>

<script>
import VueDadata from 'vue-dadata'

export default {
  name: 'VueDadataTest',
  components: {
    'vue-dadata': VueDadata
  }
}
</script>

Properties

PropRequiredTypeDescription
tokenYesstringAuth token DaData.ru
placeholderNostringText placeholder
queryNostringInitial state input field
autoloadNobooleanIf true, then a request for tips will be initialed in the background in the created hook
onChangeNofunction(suggestion: DadataSuggestion) -> voidFunction called when selecting a tooltip
autocompleteNostringAutocomplete field
defaultClassNostringDefault class ofr component, default value - vue-dadata
classesNostringExtra classes
inputNameNostringInput name attribute
fromBoundNostringDadata bound type FROM
toBoundNostringDadata bound type TO
highlightClassNameNostringCSS class name applied to highlighted text
unhighlightClassNameNostringCSS class name applied to unhighlighted text
highlightTagNostringType of tag to wrap around highlighted matches; defaults to mark but can also be a component
locationOptionsNoobjectLocation options for choosing cities or countries
metroNobooleanMetro display or not

Dependencies

Issue Reporting

If you have found a bug or if you have a feature request, please report them at this repository issues section.

Contributors

Licensed under the MIT license.