mirror of
https://github.com/didi/KnowStreaming.git
synced 2026-01-07 23:28:24 +08:00
kafka-manager 2.0
This commit is contained in:
35
kafka-manager-console/src/constants/table.ts
Normal file
35
kafka-manager-console/src/constants/table.ts
Normal file
@@ -0,0 +1,35 @@
|
||||
import { PaginationConfig } from 'component/antd';
|
||||
|
||||
export const pagination: PaginationConfig = {
|
||||
position: 'bottom',
|
||||
showQuickJumper: true,
|
||||
showSizeChanger: true,
|
||||
pageSizeOptions: ['10', '20', '50', '100', '200', '500'],
|
||||
showTotal: (total) => `共 ${total} 条`,
|
||||
};
|
||||
|
||||
export const customPagination: PaginationConfig = {
|
||||
position: 'bottom',
|
||||
showQuickJumper: true,
|
||||
showSizeChanger: true,
|
||||
showTotal: (total) => `共 ${total} 条`,
|
||||
};
|
||||
|
||||
export const cellStyle = {
|
||||
overflow: 'hidden',
|
||||
whiteSpace: 'nowrap',
|
||||
textOverflow: 'ellipsis',
|
||||
cursor: 'pointer',
|
||||
};
|
||||
|
||||
export const searchProps = {
|
||||
optionFilterProp: 'children',
|
||||
showSearch: true,
|
||||
filterOption: (input: any, option: any) => {
|
||||
if ( typeof option.props.children === 'object' ) {
|
||||
const { props } = option.props.children as any;
|
||||
return (props.children + '').toLowerCase().indexOf(input.toLowerCase()) >= 0;
|
||||
}
|
||||
return (option.props.children + '').toLowerCase().indexOf(input.toLowerCase()) >= 0;
|
||||
},
|
||||
};
|
||||
Reference in New Issue
Block a user