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
- Host: GitHub
- URL: https://github.com/dengwb1991/dwb-city
- Owner: dengwb1991
- License: mit
- Created: 2018-05-18T11:35:31.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-10-22T07:20:32.000Z (about 7 years ago)
- Last Synced: 2025-04-23T02:47:52.307Z (7 months ago)
- Topics: city, dwb, vue, vue-city, vue-city-picker
- Language: Vue
- Homepage:
- Size: 259 KB
- Stars: 4
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Dwb-City
[]()
[](https://www.npmjs.com/package/dwb-city)
[]()
[]()
## 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)