An open API service indexing awesome lists of open source software.

https://github.com/dengwb1991/dwb-city

🤔Imitate the IOS city plug-in
https://github.com/dengwb1991/dwb-city

city dwb vue vue-city vue-city-picker

Last synced: 4 months ago
JSON representation

🤔Imitate the IOS city plug-in

Awesome Lists containing this project

README

          

# Dwb-City

[![](https://img.shields.io/badge/vue-2.x-green.svg)]()
[![](https://img.shields.io/npm/v/dwb-city.svg?style=flat)](https://www.npmjs.com/package/dwb-city)
[![](https://img.shields.io/npm/dt/dwb-city.svg)]()
[![](https://img.shields.io/github/stars/dengwb1991/dwb-city.svg?style=social&label=Stars)]()

## Install

``` bash
npm i dwb-city --save
```

## Mount

### mount with global

``` javascript
import Vue from 'vue'
import City from 'dwb-city'

Vue.use(City)
```

### mount with component

``` javascript
import { dwbCity } from 'dwb-city'

export default {
components: {
dwbCity
}
}
```

## Use
``` html

```
``` javascript
data () {
return {
cityData: [CITY JSON], // 省市区json 不传默认引入
show: [True/False],
city: [110000, 110100, 110112]
}
}
// set Data Method or
this.$refs.city.setCurr(this.city)
```

## Example
```bash
npm install

npm run dev
```

[[Dwb City]](http://vuetool.dengwb.com/#/city)

## Author
[[Dengwb]](http://www.dengwb.com/app/welcome.html)