Home

Awesome

VueJS cascading address component

CircleCI npm version License FOSSA Status

How it looks:

Dependencies

Usage

INSTALLATION

npm install vue-cascading-address --save

ES6

import cascadingAdress from 'vue-cascading-address'
export {
  components: {
    cascadingAddress
  },
  methods: {
    confirmCity(data){
      console.log(data);// { province: 'xxx' , city: 'xxx' , area: 'xxx' }
    }
  }
}

HTML

  <cascading-address @confirm="confirmCity"></cascading-address>

API

Props

nametyperequireddescription
inputClassStringfalsecustom classes added to input like 'input-sm'
readonlyBooleanfalseset the input to be readonly

Events

nameattributeslisten todescription
confirm(data)@confirmEmitted after confirm button, data structure: { province: String, city: String, area: String}

License

FOSSA Status