js对对象数组中的中文字段进行排序

// 排序
      this.Data.sort((a, b) => {
        return a.legend.localeCompare(b.legend)
      })

 

posted @ 2020-12-18 15:09  心心眼  阅读(1222)  评论(0编辑  收藏  举报