欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

Jeecg-Boot 将 table 中的数据按照时间进行排序

程序员文章站 2022-07-12 13:51:30
...

位置

  1. 打开后台生成后发给前端的代码,找到 data()
    Jeecg-Boot 将 table 中的数据按照时间进行排序
  2. 找到数据对应的位置
    Jeecg-Boot 将 table 中的数据按照时间进行排序

排序

sorter: (a, b) => {
  return a.createTime.localeCompare(b.createTime)
},

//注意
`a,b` 不要动,为你的得到的数据
`createTime` 为你得到数据里面存储时间的字段名称(重点  将其换为你的)

Jeecg-Boot 将 table 中的数据按照时间进行排序