@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.
- package/lib/form/src/form-upload-file.d.ts +0 -8
- package/lib/form/src/form-upload-img.d.ts +0 -8
- package/lib/form/src/types.d.ts +4 -1
- package/lib/index.esm.js +1 -1
- package/lib/index.full.js +1 -1
- package/lib/index.js +1 -1
- package/lib/upload-file/src/upload-file.d.ts +13 -2
- package/lib/upload-file/style/index.less +18 -18
- package/lib/upload-img/src/upload-img.d.ts +9 -1
- package/package.json +138 -138
|
@@ -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;
|
package/lib/form/src/types.d.ts
CHANGED
|
@@ -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
|
-
|
|
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>;
|