@jiaozhiye/qm-design-react 1.10.0 → 1.10.2

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.
@@ -105,11 +105,11 @@ declare class QmForm extends Component<IProps, IState> {
105
105
  initialHandle(): void;
106
106
  checkFieldNames(): void;
107
107
  getFormItemRequired(rules?: Record<string, any>[]): boolean;
108
- createOtherValue(values: IFormData): IFormData;
108
+ createOtherValue(values: IFormData): IFormData<string | number, string | number | (string | number)[] | undefined>;
109
109
  createExtraValue(values: IExtraData): IExtraData;
110
110
  createDividerExpand(): IExpandData;
111
- getInitialValue(item: IFormItem, val?: ValueOf<IFormData>): string | number | any[] | undefined;
112
- createFormValue(values: IFormData): IFormData;
111
+ getInitialValue(item: IFormItem, val?: ValueOf<IFormData>): string | number | (string | number)[] | Record<string, string | number> | undefined;
112
+ createFormValue(values: IFormData): IFormData<string | number, string | number | (string | number)[] | undefined>;
113
113
  createInitialValues(): void;
114
114
  createInitialOthers(): void;
115
115
  createInitialExtras(): void;
@@ -127,7 +127,7 @@ declare class QmForm extends Component<IProps, IState> {
127
127
  type: any;
128
128
  fieldName: any;
129
129
  }): boolean;
130
- formatFormValue(values: IFormData): IFormData;
130
+ formatFormValue(values: IFormData): IFormData<string | number, string | number | (string | number)[] | undefined>;
131
131
  setFieldAuth(key: string, value: IFieldAuthItem): void;
132
132
  createFormAuth(): Promise<void>;
133
133
  INPUT(option: IFormItem): JSXElement;
@@ -181,7 +181,7 @@ declare class QmForm extends Component<IProps, IState> {
181
181
  errorFields: any;
182
182
  }) => void;
183
183
  set_fields_other(values: IFormData): void;
184
- get_fields_other(fields?: string[]): IFormData;
184
+ get_fields_other(fields?: string[]): IFormData<string | number, string | number | (string | number)[] | undefined>;
185
185
  openValidateInfo: (errorFields: any) => void;
186
186
  scrollToField: (fieldName?: string) => void;
187
187
  formValidate(): Promise<IFormData>;
@@ -57,7 +57,7 @@ export declare enum ETimeFormat {
57
57
  'hour-minute' = "HH:mm",
58
58
  'hour-minute-second' = "HH:mm:ss"
59
59
  }
60
- export type IFormData = Record<string, string | number | any[] | undefined>;
60
+ export type IFormData<U = string | number, T = U | U[] | undefined> = Record<string, T | Record<string, U>>;
61
61
  export type IFetchHeader = Record<string, string>;
62
62
  export type IFetchParams = Record<string, any>;
63
63
  export type IFieldData = {
@@ -183,11 +183,15 @@ export type IFormItem = {
183
183
  maxCount?: number;
184
184
  fileTypes?: string[];
185
185
  fileSize?: number;
186
+ draggable?: boolean;
187
+ editable?: boolean;
186
188
  fileDirection?: IFormLayout;
187
189
  showTip?: boolean;
188
190
  openCropper?: boolean;
189
191
  onPreview?: (file: UploadFile, cb: (file?: UploadFile) => void) => void;
190
192
  onRemove?: (file: UploadFile) => void;
193
+ onSortChange?: (fileList: UploadFile[]) => void;
194
+ onEditChange?: (file: UploadFile, fileList: UploadFile[]) => void;
191
195
  fixedSize?: [number, number] | undefined;
192
196
  quality?: number;
193
197
  tinymce?: Record<string, any>;
@@ -49,13 +49,13 @@ export declare const createShConfig: (data: any, fieldName: string, createFetch:
49
49
  hideHeader?: boolean | undefined;
50
50
  columns?: import("../..").QmTableColumn[] | undefined;
51
51
  width?: string | number | undefined;
52
- initialValue?: import("./types").IFormData | undefined;
52
+ initialValue?: import("./types").IFormData<string | number, string | number | (string | number)[] | undefined> | undefined;
53
53
  onlySelect?: boolean | undefined;
54
54
  autoQueryAssign?: boolean | undefined;
55
55
  closeRemoteMatch?: boolean | undefined;
56
56
  fieldAliasMap?: Record<string, string> | (() => Record<string, string>) | undefined;
57
57
  extraAliasMap?: Record<string, string> | (() => Record<string, string>) | undefined;
58
58
  filterAliasMap?: string[] | Record<string, (input: string) => string> | (() => string[] | Record<string, (input: string) => string>) | undefined;
59
- beforeOpen?: ((formData: import("./types").IFormData) => boolean | void | Promise<void>) | undefined;
59
+ beforeOpen?: ((formData: import("./types").IFormData<string | number, string | number | (string | number)[] | undefined>) => boolean | void | Promise<void>) | undefined;
60
60
  closed?: ((rowData: Record<string, any>) => void) | undefined;
61
61
  };