更新记录

1.0.8(2020-04-10) 下载此版本

修改输入部分数据,报错的bug

1.0.6(2020-04-10) 下载此版本

清除所有调试console打印

1.0.4(2020-04-10) 下载此版本

1.修改查找丢一部分数据的bug 2.修改:index="false"索引还是显示的bug

查看更多

平台兼容性

云图 - 通讯录插件

云图通讯录插件,支持索引跳转,根据姓名搜索

实现功能

  1. 列表展示
  2. 大写字母索引跳转
  3. item点击响应
  4. 搜索功能(仅支持根据姓名查询

参数

  • datas 父组件传过来的值
  • name 展示姓名的key键
  • index 是否显示索引
  • color 首字图标的背景色
复制代码        props: {
            datas: {
                type: Array,
                default () {
                    return [];
                }
            },
            name: {
                type: String,
                default () {
                    return "name";
                }
            },
            index: {
                type: Boolean,
                default: true
            },
            color: {
                type:String,
                default:"#f44336"
            }
        },

事件

  • ev item被点击时的响应事件
复制代码<script>import txl from '@/components/txl/index.vue';</script>  
<txl @ev="evFunc" :datas="datas" name="employeeName"></txl>

使用教程

复制代码<template>
    <view>
        <txl @ev="evFunc" :datas="datas" color="red" :index="true" name="employeeName"></txl>
    </view>
</template>

<script>
import txl from '@/components/txl/index.vue';
export default {
    components:{txl},
    data() {
    let datas = [{
        "employeeId": "test1",
                "employeeName": "郭冰冰",
                "companyId": "1",
                "companyName": "test company",
                "departmentId": "testdeptid",
                "departmentName": "test dept",
                "postId": "testpostid",
                "postName": "testpost",
    }]
        return {
            datas:datas
        };
    },
    methods: {
        evFunc(data){
            console.log(data)
        }
    },
    mounted() {
    }
};
</script>

效果图片

ios.png

search-ios.png web.png search-web.png

感谢

感谢@waterchestnut作者大大的汉字转拼音库

隐私、权限声明

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

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

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

许可协议

MIT协议
j-1***@foxmail.com

2023-05-15

搜索框底下不显示,可以在created时请求接口,我的这样可以解决问题

920***@qq.com

2023-01-31

感谢大佬,在原有的基础上我创建了出属于自己风格的简单易用的app通讯录!

845***@qq.com

2023-01-11

太牛了!!!!!!

145***@qq.com

2022-12-30

怎么右侧的索引字母不显示呀

185***@163.com

2022-11-23

vue3 使用时 修改 @/components/yt-txl/index.vue

import {pin} from "@/components/yt-txl/pinyin.js" 在pinyin,js 里加上导出 export const pin=new Pinyin({charCase: 0});

spa***@163.com

2022-07-27

似乎不支持vue3

zhm

2022-07-12

如何滚动时页面最上显示的字母和右侧字母做一个联动,类似加粗右侧字母

435***@qq.com

2022-06-14

小程序只有搜索框 然后啥都没有

760***@qq.com

2021-12-07

右边的索引能26个都显示出来不?

怅依

2021-11-25

作者您好,请问一下在组件里边增加的image为什么不显示图片,图片路径是正确的

2023-03-27

项目里一次性载入了六千多条用户,除去接口请求的时间加载大概要8-11秒,有没有考虑优化一下这方面的

2021-08-01

是不是name 数据不能以数字开头,好像渲染不出来