chore: set col order
This commit is contained in:
@@ -3,6 +3,7 @@ import AutoTooltip from '@/components/auto-tooltip';
|
||||
import DropdownButtons from '@/components/drop-down-buttons';
|
||||
import { SealColumnProps } from '@/components/seal-table/types';
|
||||
import StatusTag from '@/components/status-tag';
|
||||
import { tableSorter } from '@/config/settings';
|
||||
import { useIntl } from '@umijs/max';
|
||||
import dayjs from 'dayjs';
|
||||
import { useMemo } from 'react';
|
||||
@@ -33,9 +34,7 @@ const useClusterColumns = (
|
||||
{
|
||||
title: intl.formatMessage({ id: 'common.table.name' }),
|
||||
dataIndex: 'name',
|
||||
sorter: {
|
||||
multiple: 1
|
||||
},
|
||||
sorter: tableSorter(1),
|
||||
span: 3,
|
||||
render: (text: string, record: ClusterListItem) => (
|
||||
<AutoTooltip ghost>{text}</AutoTooltip>
|
||||
@@ -44,9 +43,7 @@ const useClusterColumns = (
|
||||
{
|
||||
title: intl.formatMessage({ id: 'clusters.table.provider' }),
|
||||
dataIndex: 'provider',
|
||||
sorter: {
|
||||
multiple: 2
|
||||
},
|
||||
sorter: tableSorter(2),
|
||||
span: 4,
|
||||
render: (value: string) => (
|
||||
<AutoTooltip ghost minWidth={20}>
|
||||
@@ -93,9 +90,7 @@ const useClusterColumns = (
|
||||
title: intl.formatMessage({ id: 'common.table.createTime' }),
|
||||
dataIndex: 'created_at',
|
||||
defaultSortOrder: 'descend',
|
||||
sorter: {
|
||||
multiple: 5
|
||||
},
|
||||
sorter: tableSorter(5),
|
||||
span: 4,
|
||||
render: (value: string) => (
|
||||
<AutoTooltip ghost minWidth={20}>
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
// columns.ts
|
||||
import AutoTooltip from '@/components/auto-tooltip';
|
||||
import DropdownButtons from '@/components/drop-down-buttons';
|
||||
import { tableSorter } from '@/config/settings';
|
||||
import { useIntl } from '@umijs/max';
|
||||
import { ColumnsType } from 'antd/es/table';
|
||||
import type { SortOrder } from 'antd/es/table/interface';
|
||||
@@ -23,9 +24,7 @@ const useCredentialColumns = (
|
||||
{
|
||||
title: intl.formatMessage({ id: 'common.table.name' }),
|
||||
dataIndex: 'name',
|
||||
sorter: {
|
||||
multiple: 1
|
||||
},
|
||||
sorter: tableSorter(1),
|
||||
render: (text: string) => (
|
||||
<AutoTooltip ghost minWidth={20}>
|
||||
{text}
|
||||
@@ -43,9 +42,7 @@ const useCredentialColumns = (
|
||||
dataIndex: 'created_at',
|
||||
showSorterTooltip: false,
|
||||
defaultSortOrder: 'descend',
|
||||
sorter: {
|
||||
multiple: 3
|
||||
},
|
||||
sorter: tableSorter(3),
|
||||
ellipsis: {
|
||||
showTitle: false
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user