dwb-city
v0.0.15
Published
city
Downloads
3
Readme
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