| | |
| | | TableCustomRecord, |
| | | TableRowSelection, |
| | | SizeType, |
| | | BasicTableProps, |
| | | } from './types/table'; |
| | | import type { FormProps } from '/@/components/Form'; |
| | | import type { FormProps } from '@/components/Form'; |
| | | |
| | | import { DEFAULT_FILTER_FN, DEFAULT_SORT_FN, FETCH_SETTING, DEFAULT_SIZE } from './const'; |
| | | import { propTypes } from '/@/utils/propTypes'; |
| | | import { propTypes } from '@/utils/propTypes'; |
| | | import type { Key } from 'ant-design-vue/lib/table/interface'; |
| | | |
| | | export const basicProps = { |
| | | clickToRowSelect: { type: Boolean, default: true }, |
| | |
| | | type: Object as PropType<TableRowSelection | null>, |
| | | default: null, |
| | | }, |
| | | showSelectionBar: propTypes.bool, |
| | | title: { |
| | | type: [String, Function] as PropType<string | ((data: Recordable) => string)>, |
| | | default: null, |
| | |
| | | default: null, |
| | | }, |
| | | rowKey: { |
| | | type: [String, Function] as PropType<string | ((record: Recordable) => string)>, |
| | | type: [String, Function] as PropType<BasicTableProps['rowKey']>, |
| | | default: '', |
| | | }, |
| | | bordered: propTypes.bool, |
| | |
| | | type: Function as PropType<(record: TableCustomRecord<any>, index: number) => string>, |
| | | }, |
| | | scroll: { |
| | | type: Object as PropType<{ x: number | string | true; y: number | string }>, |
| | | default: null, |
| | | type: Object as PropType<PropType<BasicTableProps['scroll']>>, |
| | | }, |
| | | beforeEditSubmit: { |
| | | type: Function as PropType< |
| | | (data: { |
| | | record: Recordable; |
| | | index: number; |
| | | key: string | number; |
| | | value: any; |
| | | }) => Promise<any> |
| | | (data: { record: Recordable; index: number; key: Key; value: any }) => Promise<any> |
| | | >, |
| | | }, |
| | | size: { |