@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 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 { }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sl-material/sl-import",
3
- "version": "1.0.0-beta17",
3
+ "version": "1.0.0-beta18",
4
4
  "description": "导入组件 - 支持批量导入文件,提供多种模板配置",
5
5
  "main": "./sl-import.cjs.js",
6
6
  "module": "./sl-import.es.js",