Skip to content

Latest commit

 

History

History
47 lines (35 loc) · 1.53 KB

README.md

File metadata and controls

47 lines (35 loc) · 1.53 KB

vue-distpicker

NPM version NPM downloads CircleCI codecov

A simple Vue component for picking provinces, cities and districts of China.

Install

yarn add vue-distpicker

CDN: UNPKG | jsDelivr (available as window.Distpicker)

Usage

<template>
  <distpicker></distpicker>
</template>

<script>
import Distpicker from 'vue-distpicker'

export default {
  components: {
    Distpicker
  }
}
</script>

API

Name Type Description
ids Array 默认传入省市区的 id
change Function 返回选择的省市区数据包含 id 以及 name
prov String 省份选择框 name 值
city String 城市选择框 name 值
dist String 地区选择框 name 值
prov-placeholder String 省份选择框 placeholder 值
city-placeholder String 城市选择框 placeholder 值
dist-placeholder String 地区选择框 placeholder 值

License

MIT © sinchang