ExtJS网格支持汉语拼音排序的实现代码
复制代码代码如下所示:(方法。店。原型。applysort =功能){ / /重applysort
如果(this.sortinfo!这remotesort){。
var = this.sortinfo,F =中场;
var st = this.fields.get(F)。SortType;
函数(R1,R2){
var = ST(R1);
添加:修复异常bug的中文字符排序
如果(typeof(V1)= =字符串){ / /字符串
返回v1.localecompare(V2); / / localecompare Firefox和IE的中文字符的字符串比较,支持
添加一个结束
返回V1 V2 1:(V1 - V2 - 1:0);
};
This.data.sort(s.direction,FN);
如果(this.snapshot this.snapshot!=此数据){
This.snapshot.sort(s.direction,FN);
}
}
};