Ben Lin
2024-06-18 ebbd788fbb2c0b45d4473798efc57eec8ba74a25
src/components/Table/src/props.ts
@@ -8,11 +8,13 @@
  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 },
@@ -105,6 +107,7 @@
    type: Object as PropType<TableRowSelection | null>,
    default: null,
  },
  showSelectionBar: propTypes.bool,
  title: {
    type: [String, Function] as PropType<string | ((data: Recordable) => string)>,
    default: null,
@@ -118,7 +121,7 @@
    default: null,
  },
  rowKey: {
    type: [String, Function] as PropType<string | ((record: Recordable) => string)>,
    type: [String, Function] as PropType<BasicTableProps['rowKey']>,
    default: '',
  },
  bordered: propTypes.bool,
@@ -131,17 +134,11 @@
    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: {