Skip to content

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

Notifications You must be signed in to change notification settings

sinchang/vue-distpicker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

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

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published