更新记录

0.0.1(2023-05-23) 下载此版本

elvis-region

省、市、区、街道 一级联动 二级联动 三级联动 四级联动 多级联动

组件引入

    import ElvisRegion from "@/uni_modules/elvis-region/components/elvis-region/evlisRegion.vue"

页面使用

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

平台兼容性

Vue2 Vue3
App 快应用 微信小程序 支付宝小程序 百度小程序 字节小程序 QQ小程序
app-vue app-nvue
钉钉小程序 快手小程序 飞书小程序 京东小程序
H5-Safari Android Browser 微信浏览器(Android) QQ浏览器(Android) Chrome IE Edge Firefox PC-Safari

elvis-region

省、市、区、街道 一级联动 二级联动 三级联动 四级联动 多级联动

组件引入

    import ElvisRegion from "@/uni_modules/elvis-region/components/elvis-region/evlisRegion.vue"

页面使用

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

隐私、权限声明

1. 本插件需要申请的系统权限列表:

2. 本插件采集的数据、发送的服务器地址、以及数据用途说明:

3. 本插件是否包含广告,如包含需详细说明广告表达方式、展示频率:

许可协议

MIT协议

使用中有什么不明白的地方,就向插件作者提问吧~ 我要提问