Skip to content

yyc1217/twzipcode-vue

Repository files navigation

twzipcode-vue

中華郵政郵遞區號 Vuejs components

Github actions Coverage Status npm npm npm dependencies devDependency GitHub stars

特點 Feature

  • 縣市和郵遞區號自動產生 demo
  • 可修改 value 與 text 的格式 demo
  • 可切換成英語 demo
  • callback demo

安裝 Install

npm

npm install twzipcode-vue --save

用法 Usage

import Vue from 'vue'
import { Zipcode, County, ZipcodeGroupby } from 'twzipcode-vue'

// or
import Zipcode from 'twzipcode-vue/zipcode'
import ZipcodeGroupby from 'twzipcode-vue/zipcode-groupby'
import County from 'twzipcode-vue/county'

new Vue({
  el: '#app',
  components: {

    // 縣市
    County,

    // 郵遞區號
    Zipcode,

    // 依縣市分組的郵遞區號
    ZipcodeGroupby
  }
})

Showcases

https://yyc1217.github.io/twzipcode-vue/

Build Setup

# install dependencies
npm install

# serve with hot reload at localhost:8080
npm run dev

# run tests
npm run test

資料來源 Data

twzipcode-data