# elvis-region
# 省、市、区、街道  一级联动 二级联动 三级联动 四级联动 多级联动
### 组件引入
```sh
	import ElvisRegion from "@/uni_modules/elvis-region/components/elvis-region/evlisRegion.vue"
```

### 页面使用
```sh
<template>
	<view class="content">
		<view>
			<view>您选择的地区是</view>
			<view v-for="(item, index) in region" >{{item.name}} </view>
			<button  @click.native="onOpenRegion">选择地区</button>
		</view>
		
		<elvis-region ref="elvis" v-model='region' :address="address"></elvis-region>
	</view>
</template>

<script>
	import ElvisRegion from "@/uni_modules/elvis-region/components/elvis-region/evlisRegion.vue"
	export default {
		components: {
			ElvisRegion
		},
		data() {
			return {
				title: 'Hello',
				region: {},
				address: {
					"1":{"code":"140000000000","parent":"0","name":"山西省","level":"1"},
					"2":{"code":"140400000000","parent":"140000000000","name":"长治市","level":"2"},
					"3":{"code":"140406000000","parent":"140400000000","name":"潞城区","level":"3"},
					"4":{"code":"140406100000","parent":"140406000000","name":"店上镇","level":"4"},
				}
			}
		},
		onLoad() {

		},
		methods: {
			onOpenRegion() {
				this.$refs.elvis.open()
			}
		}
	}
</script>

<style>
	.content {
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
	}
</style>

```