1.4.15 • Published 3 years ago

vue-dadata-textarea v1.4.15

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

Vue Dadata Textarea

Publish

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

Link to RU documentation

Install

npm package

$ npm install vue-dadata-textarea --save

yarn package

$ yarn add vue-dadata-textarea

Usage

Global

import VueDadataTextarea from 'vue-dadata-textarea'

Vue.use(VueDadataTextarea)

Local

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

<script>
import VueDadataTextarea from 'vue-dadata-textarea'

export default {
  name: 'VueDadataTest',
  components: {
    'vue-dadata': VueDadataTextarea
  }
}
</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
inputTypeNostringInput type; input or textarea
textareaRowsNoNumberRows number for textarea

| fromBound | No | string | Dadata bound type FROM | | toBound | No | string | Dadata bound type TO | | highlightClassName | No | string | CSS class name applied to highlighted text | | unhighlightClassName | No | string | CSS class name applied to unhighlighted text | | highlightTag | No | string | Type of tag to wrap around highlighted matches; defaults to mark but can also be a component | | locationOptions | No | object | Location options for choosing cities or countries |

Dependencies

Issue Reporting

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

ToDo

Show project Vue Dadata

Milestones

Show milestones

Contact me

Contributors

CHANGELOG

CONTRIBUTING

LICENSE

Copyright (c) 2019 Ivan Monastyrev ikloster@yandex.ru. Licensed under the MIT license.