@baosight/er4j 0.0.22 → 0.0.24

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.
@@ -479,6 +479,8 @@ export declare namespace ER {
479
479
  maxFileSize?: number;
480
480
  maxBlobSize?: number;
481
481
  allowDownload?: boolean;
482
+ allowDelete?: boolean;
483
+ deleteBySelf?: boolean;
482
484
  showFileDateTime?: boolean;
483
485
  showFileSize?: boolean;
484
486
  refreshKey?: string;
@@ -498,15 +500,33 @@ export declare namespace ER {
498
500
  interface RadioGroupOption {
499
501
  title: string;
500
502
  key: string;
503
+ style?: any;
501
504
  options: CheckboxOption[];
502
505
  }
506
+ interface InputOption {
507
+ title: string;
508
+ type: 'input' | 'inputNumber' | 'datePicker';
509
+ style?: any;
510
+ key: string;
511
+ }
503
512
  interface SelectModalOptions {
504
513
  checkboxOptions?: CheckboxOption[];
505
514
  radioGroups?: RadioGroupOption[];
515
+ inputOptions?: InputOption[];
506
516
  title?: string;
507
517
  width?: number;
508
518
  okText?: string;
509
519
  cancelText?: string;
520
+ default?: {
521
+ checkboxOptions?: string[];
522
+ radioGroups?: {
523
+ [key: string]: string;
524
+ };
525
+ inputOptions?: {
526
+ [key: string]: any;
527
+ };
528
+ };
529
+ style?: any;
510
530
  }
511
531
  class Class {
512
532
  #private;
@@ -701,6 +721,20 @@ export declare namespace ER {
701
721
  * @returns void
702
722
  */
703
723
  static readFiles(callBack: (files: any[]) => void, options?: any): void;
724
+ /**
725
+ * 读取Excel文件
726
+ * @param callBack 回调函数
727
+ * @returns void
728
+ */
729
+ static readExcelFile(callBack: (data: any[]) => void): void;
730
+ /**
731
+ * 导入Excel文件
732
+ * @param grid grid实例
733
+ * @param processData 回调函数[返回true则导入,返回false则跳过]
734
+ * @param improtData 导入数据回调函数
735
+ * @returns void
736
+ */
737
+ static importExcelFile(grid: any, processData?: (row: any) => boolean, improtData?: (data: Model[]) => void): void;
704
738
  /**
705
739
  * 判断颜色是否为透明色
706
740
  * @param color 颜色
@@ -726,13 +760,14 @@ export declare namespace ER {
726
760
  */
727
761
  static getGridHeaderTemplate(header: any): string;
728
762
  /**
729
- * 弹出一个包含 checkbox + 多个 radiogroup 的 modal
730
- * @param config 弹窗内容配置
731
- * @param onConfirm 用户点击“确认”后的回调,返回 { checkboxes, radios }
732
- */
763
+ * 弹出一个包含 checkbox + 多个 radiogroup 的 modal
764
+ * @param config 弹窗内容配置
765
+ * @param onConfirm 用户点击“确认”后的回调,返回 { checkboxes, radios }
766
+ */
733
767
  static openSelectOptionsModal(config: SelectModalOptions, onConfirm: (result: {
734
- checkboxes: string[];
735
- radios: Record<string, string>;
768
+ checkboxes?: string[];
769
+ radios?: Record<string, string>;
770
+ inputs?: Record<string, any>;
736
771
  }) => void): void;
737
772
  /**
738
773
  * 暂停当前线程一段时间
@@ -3985,6 +4020,23 @@ export declare namespace ER {
3985
4020
  setGridToolbarVisible(configId: string, toolbarVisible: {
3986
4021
  [key: 'refresh' | 'addrow' | 'copyrow' | 'delete' | 'save' | 'cancel' | 'excel' | 'import' | string]: boolean;
3987
4022
  }): FormHelper;
4023
+ /**
4024
+ * 设置工具栏Grid工具栏按钮动作
4025
+ * @param configId Grid配置代码
4026
+ * @param name 按钮名称
4027
+ * @param action 动作
4028
+ * @param preventDefault 是否阻止默认动作
4029
+ * @param messageConfirm 是否显示确认对话框
4030
+ * @returns this
4031
+ */
4032
+ setGridToolbarAction(configId: string, name: string, action: Function, preventDefault?: boolean, messageConfirm?: boolean): FormHelper;
4033
+ /**
4034
+ * 设置Grid授权按钮动作
4035
+ * @param configId Grid配置代码
4036
+ * @param action 动作
4037
+ * @returns this
4038
+ */
4039
+ setGridAuthButtonAction(configId: string, action: (params: any) => void): FormHelper;
3988
4040
  /**
3989
4041
  * 获取工具栏Grid工具栏按钮是否可见
3990
4042
  * @param configId Grid配置代码
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@baosight/er4j",
3
- "version": "0.0.22",
3
+ "version": "0.0.24",
4
4
  "description": "er4j 辅助开发",
5
5
  "private": false,
6
6
  "type": "module",