@wangeditor-next/core 1.7.38 → 1.7.40
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.
|
@@ -90,15 +90,15 @@ interface IInsertVideoConfig {
|
|
|
90
90
|
checkVideo: (src: string, poster: string) => string | boolean | undefined;
|
|
91
91
|
parseVideoSrc: (url: string) => string;
|
|
92
92
|
}
|
|
93
|
-
export
|
|
94
|
-
|
|
95
|
-
export interface IUploadImageConfig extends IUploadConfig {
|
|
93
|
+
export type IUploadVideoConfig = IUploadConfig;
|
|
94
|
+
export type IUploadImageConfig = IUploadConfig & {
|
|
96
95
|
base64LimitSize: number;
|
|
97
|
-
}
|
|
96
|
+
};
|
|
98
97
|
interface ICodeLangConfig {
|
|
99
98
|
codeLangs: {
|
|
100
99
|
text: string;
|
|
101
100
|
value: string;
|
|
101
|
+
selected?: boolean;
|
|
102
102
|
}[];
|
|
103
103
|
}
|
|
104
104
|
export interface IMenuConfig {
|
|
@@ -7,11 +7,7 @@ type FilesType = {
|
|
|
7
7
|
[key: string]: UppyFile<{}, {}>;
|
|
8
8
|
};
|
|
9
9
|
type InsertFn = (src: string, poster?: string, alt?: string, href?: string) => void | Promise<void>;
|
|
10
|
-
|
|
11
|
-
* 配置参考 https://uppy.io/docs/uppy/
|
|
12
|
-
*/
|
|
13
|
-
export interface IUploadConfig {
|
|
14
|
-
server: string;
|
|
10
|
+
interface IBaseUploadConfig {
|
|
15
11
|
fieldName?: string;
|
|
16
12
|
maxFileSize?: number;
|
|
17
13
|
maxNumberOfFiles?: number;
|
|
@@ -32,4 +28,16 @@ export interface IUploadConfig {
|
|
|
32
28
|
uppyConfig?: Record<string, any>;
|
|
33
29
|
xhrConfig?: Record<string, any>;
|
|
34
30
|
}
|
|
31
|
+
interface IUploadConfigWithCustomUpload extends IBaseUploadConfig {
|
|
32
|
+
server?: string;
|
|
33
|
+
customUpload: (files: File, insertFn: InsertFn) => void;
|
|
34
|
+
}
|
|
35
|
+
interface IUploadConfigWithoutCustomUpload extends IBaseUploadConfig {
|
|
36
|
+
server: string;
|
|
37
|
+
customUpload?: never;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* 配置参考 https://uppy.io/docs/uppy/
|
|
41
|
+
*/
|
|
42
|
+
export type IUploadConfig = IUploadConfigWithCustomUpload | IUploadConfigWithoutCustomUpload;
|
|
35
43
|
export {};
|