@jiaozhiye/qm-design-react 2.0.2 → 2.0.4

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.
@@ -3,14 +3,6 @@ import type { IFormItem } from './types';
3
3
  type IProps = {
4
4
  option: IFormItem;
5
5
  };
6
- export interface UploadFile {
7
- uid: string;
8
- name: string;
9
- fileName?: string;
10
- url?: string;
11
- thumbUrl?: string;
12
- status?: 'error' | 'success' | 'done' | 'uploading';
13
- }
14
6
  declare class FormUploadFile extends Component<IProps> {
15
7
  static contextType: React.Context<import("./context").IFormContext | undefined>;
16
8
  render(): React.JSX.Element;
@@ -3,14 +3,6 @@ import type { IFormItem } from './types';
3
3
  type IProps = {
4
4
  option: IFormItem;
5
5
  };
6
- export interface UploadFile {
7
- uid: string;
8
- name: string;
9
- fileName?: string;
10
- url?: string;
11
- thumbUrl?: string;
12
- status?: 'error' | 'success' | 'done' | 'uploading';
13
- }
14
6
  declare class FormUploadImg extends Component<IProps> {
15
7
  static contextType: React.Context<import("./context").IFormContext | undefined>;
16
8
  render(): React.JSX.Element;
@@ -4,6 +4,7 @@ import type { Dayjs } from 'dayjs';
4
4
  import type { UploadProps } from '../../antd';
5
5
  import type { BuildInPlacements } from 'rc-trigger';
6
6
  import type { IFetch, IColumn, IRowKey } from '../../table/src/table/types';
7
+ import type { UploadFile } from '../../upload-file/src/upload-file';
7
8
  import type { CSSProperties, ComponentSize, JSXElement, ValueOf, AjaxResponse, IDict, IAuth } from '../../_utils/types';
8
9
  export declare const DEFAULT_COL = 4;
9
10
  export declare const DEFAULT_ROWS = 1;
@@ -154,6 +155,7 @@ export type IFormItem = {
154
155
  allowHalf?: boolean;
155
156
  tooltips?: string[];
156
157
  count?: number;
158
+ labelToSwitch?: boolean;
157
159
  filterable?: boolean;
158
160
  listHeight?: number;
159
161
  collapseTags?: boolean;
@@ -178,7 +180,8 @@ export type IFormItem = {
178
180
  fileSize?: number;
179
181
  showTip?: boolean;
180
182
  openCropper?: boolean;
181
- onRemove?: (file: any) => void;
183
+ onPreview?: (file: UploadFile, cb: (file?: UploadFile) => void) => void;
184
+ onRemove?: (file: UploadFile) => void;
182
185
  fixedSize?: [number, number] | undefined;
183
186
  quality?: number;
184
187
  tinymce?: Record<string, any>;