Vue-TWzipcode

Build Status Coverage Status

Rewrite jQuery-TWzipcode in Vue.js

Example

Set default zipcode

Javascript

new Vue({
  el: '#example1',
  components: {
    twzipcode: twzipcode,
  },
});

Html

<twzipcode
    :class-names="{county: 'form-control', district: 'form-control', zipcode: 'form-control'}"
    default-zipcode="403"
    v-ref:example1
>
</twzipcode>

Set default county and district

Javascript

new Vue({
  el: '#example2',
  components: {
    twzipcode: twzipcode,
  },
});

Html

<twzipcode
    :class-names="{county: 'form-control', district: 'form-control', zipcode: 'form-control'}"
    default-county="桃園市"
    default-district="中壢區"
    v-ref:example2
>
</twzipcode>

Contributing

All contributions (in the form on pull requests, issues and feature-requests) are welcome.

License

Licenced under the MIT License (MIT). Please see the license file for more information.