无木
2021-09-06 044e2e4e866dd5b120daab03c47aba1ca1f9140a
src/components/Table/src/types/table.ts
@@ -25,7 +25,7 @@
  /**
   * Callback executed when select/deselect one row
   * @type FunctionT
   * @type Function
   */
  onSelect?: (record: T, selected: boolean, selectedRows: Object[], nativeEvent: Event) => any;
@@ -95,9 +95,13 @@
  setPagination: (info: Partial<PaginationProps>) => void;
  setTableData: <T = Recordable>(values: T[]) => void;
  updateTableDataRecord: (rowKey: string | number, record: Recordable) => Recordable | void;
  deleteTableDataRecord: (record: Recordable | Recordable[]) => Recordable | void;
  insertTableDataRecord: (record: Recordable, index?: number) => Recordable | void;
  findTableDataRecord: (rowKey: string | number) => Recordable | void;
  getColumns: (opt?: GetColumnsParams) => BasicColumn[];
  setColumns: (columns: BasicColumn[] | string[]) => void;
  getDataSource: <T = Recordable>() => T[];
  getRawDataSource: <T = Recordable>() => T;
  setLoading: (loading: boolean) => void;
  setProps: (props: Partial<BasicTableProps>) => void;
  redoHeight: () => void;
@@ -165,7 +169,7 @@
  // 查询条件请求之前处理
  handleSearchInfoFn?: Fn;
  // 请求接口配置
  fetchSetting?: FetchSetting;
  fetchSetting?: Partial<FetchSetting>;
  // 立即请求接口
  immediate?: boolean;
  // 在开起搜索表单的时候,如果没有数据是否显示表格
@@ -287,7 +291,7 @@
   * Row's className
   * @type Function
   */
  rowClassName?: (record: TableCustomRecord<T>) => string;
  rowClassName?: (record: TableCustomRecord<T>, index: number) => string;
  /**
   * Row selection config
@@ -361,6 +365,18 @@
  transformCellText?: Function;
  /**
   * Callback executed before editable cell submit value, not for row-editor
   *
   * The cell will not submit data while callback return false
   */
  beforeEditSubmit?: (data: {
    record: Recordable;
    index: number;
    key: string | number;
    value: any;
  }) => Promise<any>;
  /**
   * Callback executed when pagination, filters or sorter is changed
   * @param pagination
   * @param filters