Skip to content

Latest commit

 

History

History
67 lines (52 loc) · 1.1 KB

README.md

File metadata and controls

67 lines (52 loc) · 1.1 KB

Dwb-City

Install

npm i dwb-city --save

Mount

mount with global

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

Vue.use(City)

mount with component

import { dwbCity } from 'dwb-city'

export default {
  components: {
    dwbCity
  }
}

Use

<dwb-city v-model="show"
      :data="cityData"
      :city="city"
      ref="city"
      @change="getData"/>
data () {
  return {
    cityData: [CITY JSON], // 省市区json 不传默认引入
    show: [True/False],
    city: [110000, 110100, 110112]
  }
}
// set Data Method or
this.$refs.city.setCurr(this.city)

Example

npm install

npm run dev

[Dwb City]

Author

[Dengwb]