Ant Design Pro ProTable 调整查询表单中字段的位置

Ant Design React About 497 words

order

查询表单中的权重,权重大排序靠前。

order数值越大越靠前。

const columns: ProColumns<TableListItem>[] = [
  {
    title: "Date",
    dataIndex: 'date',
    valueType: "dateRange",
    hideInTable: true,
    order: searchParams.get('from') ? 1 : undefined,
    search: {
      transform: (value, namePath, allValues) => ({
        from: new Date(new Date(value[0]).setHours(0, 0, 0, 0)).toISOString(),
        to: new Date(new Date(value[1]).setHours(24, 0, 0, -1)).toISOString(),
      })
    },
  },
]

文档

columns-列定义

Views: 7 · Posted: 2026-09-03

———         Thanks for Reading         ———

Give me a Star, Thanks:)

https://github.com/fendoudebb/LiteNote

扫描下方二维码关注公众号和小程序↓↓↓

扫描下方二维码关注公众号和小程序↓↓↓
Prev Post
Today In History
Browsing Refresh