@sl-material/sl-import 1.0.0-beta17 → 1.0.0-beta18
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/index.d.ts +9 -5
- package/package.json +1 -1
- package/sl-import.cjs.js +1 -1
- package/sl-import.es.js +126 -179
- package/sl-import.umd.umd.js +33 -30
package/index.d.ts
CHANGED
|
@@ -195,7 +195,7 @@ declare class ImportDialog {
|
|
|
195
195
|
}) => void): void;
|
|
196
196
|
onBrandChange(callback: (value: string | number) => void): void;
|
|
197
197
|
private static getInstance;
|
|
198
|
-
static open(options?: OpenModalOptions): Promise<ImportSubmitData>;
|
|
198
|
+
static open(options?: OpenModalOptions): Promise<ImportSubmitData | null>;
|
|
199
199
|
static close(): void;
|
|
200
200
|
static setLoading(loading: boolean): void;
|
|
201
201
|
static isReady(): boolean;
|
|
@@ -347,10 +347,6 @@ export declare interface OpenModalOptions {
|
|
|
347
347
|
url: string;
|
|
348
348
|
activeTab?: TabConfig;
|
|
349
349
|
}) => void;
|
|
350
|
-
onFileChange?: (files: FileUploadItem[]) => void;
|
|
351
|
-
onUploadProgress?: (file: FileUploadItem, progress: number) => void;
|
|
352
|
-
onUploadSuccess?: (file: FileUploadItem, response: any) => void;
|
|
353
|
-
onUploadError?: (file: FileUploadItem, error: Error) => void;
|
|
354
350
|
}
|
|
355
351
|
|
|
356
352
|
/**
|
|
@@ -472,6 +468,14 @@ export declare interface UploadConfig {
|
|
|
472
468
|
* 主要用于延迟上传场景,控制上传过程中的 UI 反馈
|
|
473
469
|
*/
|
|
474
470
|
confirmLoading?: boolean;
|
|
471
|
+
/** 文件列表变化回调(添加/删除文件时触发) */
|
|
472
|
+
onFileChange?: (files: FileUploadItem[]) => void;
|
|
473
|
+
/** 上传进度回调 */
|
|
474
|
+
onProgress?: (file: FileUploadItem, progress: number) => void;
|
|
475
|
+
/** 上传成功回调 */
|
|
476
|
+
onSuccess?: (file: FileUploadItem, response: any) => void;
|
|
477
|
+
/** 上传失败回调 */
|
|
478
|
+
onError?: (file: FileUploadItem, error: Error) => void;
|
|
475
479
|
}
|
|
476
480
|
|
|
477
481
|
export { }
|