area-selection

1.0.1 • Public • Published

Install

Using npm:

npm install area-selection --save

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


## Usage

```vue
<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>

Readme

Keywords

Package Sidebar

Install

npm i area-selection

Weekly Downloads

2

Version

1.0.1

License

ISC

Unpacked Size

1.32 MB

Total Files

7

Last publish

Collaborators

  • whilee