Sfoglia il codice sorgente

fix(bugs): 排序自定

tangning 3 anni fa
parent
commit
3c1b22903c
1 ha cambiato i file con 4 aggiunte e 1 eliminazioni
  1. 4 1
      src/views/staff/list.vue

+ 4 - 1
src/views/staff/list.vue

@@ -104,7 +104,7 @@
           title: t('common.state'),
           dataIndex: 'status',
           slots: { customRender: 'status' },
-          sorter: true,
+          // sorter: true,
           width: 80,
         },
 
@@ -150,6 +150,9 @@
         rowKey: 'id',
         pagination: { pageSize: 20 },
         bordered: true,
+        sortFn: (sortInfo) => {
+          return { ...sortInfo, sidx: sortInfo.field, order: sortInfo.order.replace('end', '') };
+        },
       });
 
       function renderRoleType(type: number): string {