|
|
|
|
/*
|
|
|
|
|
* @Author: zhoux zhouxia@supervision.ltd
|
|
|
|
|
* @Date: 2023-11-13 11:32:26
|
|
|
|
|
* @LastEditors: zhoux zhouxia@supervision.ltd
|
|
|
|
|
* @LastEditTime: 2023-11-21 13:36:39
|
|
|
|
|
* @FilePath: \general-ai-platform-web\config\defaultTable.ts
|
|
|
|
|
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
|
|
|
|
*/
|
|
|
|
|
import { ProColumns } from "@ant-design/pro-components";
|
|
|
|
|
import { PaginationProps } from "antd";
|
|
|
|
|
// 通用列表配置
|
|
|
|
|
export const proTableCommonOptions: Record<string,any> = {
|
|
|
|
|
scrollX: 'max-content', // 保证左右侧列的固定,并能保证没列标题不换行
|
|
|
|
|
scrollY: 500, // 保证列表高度固定
|
|
|
|
|
commscrollX: 1300,
|
|
|
|
|
commscrollY: 500, // 保证列表高度固定
|
|
|
|
|
searchLabelWidth: 'auto', // 整体对齐,label根据实际字数自适应
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 操作栏位配置
|
|
|
|
|
export const proTableActionColumnOptions: Record<string,any> = {
|
|
|
|
|
dataIndex: 'option',
|
|
|
|
|
valueType: 'option',
|
|
|
|
|
align: 'center',
|
|
|
|
|
fixed: 'right',
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 分页器配置
|
|
|
|
|
export const proTablePaginationOptions: PaginationProps = {
|
|
|
|
|
showSizeChanger: true,
|
|
|
|
|
// showQuickJumper: true,
|
|
|
|
|
showTotal: (total) => `共${total}条`,
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 默认索引列配置
|
|
|
|
|
// export const proTableIndexColumnOptions : ProColumns = {
|
|
|
|
|
// title: '序号',
|
|
|
|
|
// dataIndex: 'index',
|
|
|
|
|
// valueType: 'index', // 增加该属性以添加边框
|
|
|
|
|
// fixed: 'left', // 将该列固定在左侧
|
|
|
|
|
// width: 70,
|
|
|
|
|
// align:'center'
|
|
|
|
|
// }
|