hlyc-web-pack 2.7.6 → 2.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,12 +2,12 @@ import React from 'react';
2
2
  import { Rule } from 'rc-field-form/lib/interface';
3
3
  import { SelectType, AnyObjectType } from '../../unrelated/typings';
4
4
  declare type remoteValueType = string | undefined;
5
- declare type remotePromiseType = (value: remoteValueType) => Promise<SelectType[]>;
5
+ declare type remotePromiseType = (value: remoteValueType, record: AnyObjectType) => Promise<SelectType[]>;
6
6
  export interface EditableColumnsType {
7
7
  editable: boolean | ((record: AnyObjectType, index: number) => boolean);
8
8
  inputType: 'number';
9
9
  /** 单元格表单类型 */
10
- valueType: 'Select' | 'AutoComplete' | 'RemoteSearch' | 'RecordSelect' | 'DatePicker';
10
+ valueType: 'Select' | 'AutoComplete' | 'RecordSelect' | 'RemoteSearch' | 'DatePicker';
11
11
  valueEnum: SelectType[];
12
12
  recordSelectField: string;
13
13
  /** 表单值改变触发 */
@@ -22,6 +22,8 @@ export interface EditableColumnsType {
22
22
  formItemProps: {
23
23
  rules: Rule[];
24
24
  };
25
+ /** 自定义渲染值(在原有的内容上增加新的结构),childNode是原有的内容 */
26
+ controlRender: (record: AnyObjectType, childNode: React.ReactNode) => React.ReactNode;
25
27
  }
26
28
  /** 可编辑单元格 */
27
29
  declare type EditableCellProps = {
@@ -29,6 +31,7 @@ declare type EditableCellProps = {
29
31
  children: React.ReactNode;
30
32
  dataIndex: string;
31
33
  record: AnyObjectType;
34
+ /** 保存表单的值 */
32
35
  handleSave: (record: AnyObjectType) => void;
33
36
  } & EditableColumnsType;
34
37
  export declare const EditableRow: React.FC;