vue2.0 实现汉字A-Z排序与手机通讯录效果

先上一张效果图:

列表html  template  (使用 ydui移动端UI  , 地址:http://vue.ydui.org/)


            
                
                {{i.Name}}
                
            
       

字母索引html

{{letter}}

script 

util.js (只对汉字做了排序)

//首字母截取使用的是 https://github.com/sxei/pinyinjs/点击打开链接 这个工具库  
//示例:
//
//
//

export default{
    pySort(arr){
        var $this = this;
        var letters = "ABCDEFGHJKLMNOPQRSTWXYZ".split('');
        var result = [];
        var curr;
        for(var i=0;i




你可能感兴趣的:(vue)