1.0.1 • Published 5 years ago

area-selection v1.0.1

Weekly downloads
-
License
ISC
Repository
-
Last release
5 years ago

Install

Using npm:

npm install area-selection --save

import AreaSelect from 'area-selection';
Vue.component(AreaSelect.name,AreaSelect);


## Usage

```js
<template>
	<areaSelect ref="area" @on-change="addressAreaChange" :province="provinceInfo" :city="cityInfo" :county="countyInfo"
		:level="2"></areaSelect>
</template>
<script>
    export default {
        data () {
            return {
                provinceInfo: {},
                cityInfo: {},
                countyInfo: {}
				}
        },
        methods: {
			addressAreaChange(value, level){
                level === 0 ? this.provinceInfo = value : '';
                level === 1 ? this.cityInfo = value : '';
                level === 2 ? this.countyInfo = value : '';
            }
        }
    }
</script>
1.0.1

5 years ago

1.0.0

5 years ago