WikongGuan

关注

Ant Vue3 表格按时间排序

WikongGuan

关注

阅读 67

2022-05-06

**columns 排序**
const columns = [
{
    key: 'createdate',
    title: '创建时间',
    dataIndex: 'createdate',
    // defaultSortOrder: 'descend',
    hideInSearch: true,
    sorter: (a, b) => {
     // 需要先转		换成时间戳
      const aTime = new Date(a.createdate).getTime();
      const bTime = new Date(b.createdate).getTime();
      return aTime - bTime;
    },
  }
 ]

相关推荐

悄然丝语

vuetify1.5表格排序,按时间降序

悄然丝语 54 0 0

兽怪海北

vue3表格组件formatter

兽怪海北 43 0 0

八怪不姓丑

使用 Vue3 + Pinia + Ant Design Vue3 搭建后台管理系统

八怪不姓丑 46 0 0

醉东枫

#yyds干货盘点#ls命令按时间排序

醉东枫 158 0 0

无愠色

Vue3 setup 实时显示时间

无愠色 62 0 0

sunflower821

vue3 axios ant-design-vue cdn的方式使用

sunflower821 26 0 0

登高且赋

VUE3 使用 Ant Design Vue 图标库的图标

登高且赋 102 0 0

张宏涛心理

Ant Design Vue list表格组件

张宏涛心理 90 0 0

mafa1993

react ant 表格实现 拖拽排序和多选

mafa1993 40 0 0

静守幸福

vue3 实现拖拽排序效果 sortablejs

静守幸福 15 0 0

精彩评论(0)

0 0 举报