更新记录

1.0.1(2020-01-19)

修复索引“#”无法选中,改进样式并使其独立

1.0.0(2020-01-15)

首次


平台兼容性

使用

<template>
    <view class="content">
        <jContacts ref="jContacts" :mode="mode" :hashFirst="hashFirst" @confirm="contactsConfirm" @cancel="contactsCancel"></jContacts>

        <button type="default" @tap="show('single')">单选模式</button>
        <button type="default" @tap="show('multi')">多选模式</button>
        <button type="default" @tap="chooseList = []">清除</button>

        <view class="res" v-for="(value, index) in chooseList" :key="index">
            {{value.name}}&nbsp;&nbsp;{{value.phone}}
        </view>

    </view>
</template>

<script>
    import jContacts from "@/components/j-contacts/j-contacts.vue"

    export default {
        components: {
            jContacts,
        },
        data() {
            return {
                showMask: false,
                mode: "single",
                hashFirst: false,
                chooseList: [],
            }
        },
        methods: {

            show(mode) {
                this.showMask = true
                this.mode = mode
                this.$refs.jContacts.show()
            },
            contactsConfirm(res) {
                this.chooseList = res
                console.log("返回结果:", JSON.stringify(this.chooseList))
            },
            contactsCancel(){

            },

        },
    }
</script>

隐私、权限声明

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

通讯录

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

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

许可协议

MIT协议

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