lew-ui 2.6.0 → 2.6.2

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.
@@ -99,6 +99,8 @@ export declare const uploadByCardProps: {
99
99
  validator: (value: LewSize) => boolean;
100
100
  };
101
101
  };
102
- export declare const statusMap: Record<UploadStatus, string>;
103
- export declare const statusColorMap: Record<UploadStatus, string>;
102
+ export declare const statusConfig: Record<UploadStatus, {
103
+ text: string;
104
+ color: string;
105
+ }>;
104
106
  export type UploadProps = ExtractPropTypes<typeof uploadProps>;
@@ -12,7 +12,7 @@ declare const _default: import('vue').DefineComponent<globalThis.ExtractPropType
12
12
  description: string;
13
13
  };
14
14
  selectHandler: {
15
- type: FunctionConstructor;
15
+ type: PropType<(item: ContextMenus) => void>;
16
16
  default: () => void;
17
17
  description: string;
18
18
  };
@@ -30,7 +30,7 @@ declare const _default: import('vue').DefineComponent<globalThis.ExtractPropType
30
30
  description: string;
31
31
  };
32
32
  selectHandler: {
33
- type: FunctionConstructor;
33
+ type: PropType<(item: ContextMenus) => void>;
34
34
  default: () => void;
35
35
  description: string;
36
36
  };
@@ -39,6 +39,6 @@ declare const _default: import('vue').DefineComponent<globalThis.ExtractPropType
39
39
  }>, {
40
40
  disabled: boolean;
41
41
  options: ContextMenus[];
42
- selectHandler: Function;
42
+ selectHandler: (item: ContextMenus) => void;
43
43
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
44
44
  export default _default;
@@ -1,13 +1,35 @@
1
1
  import { App } from 'vue';
2
2
 
3
+ interface SelectHandlerParams {
4
+ item: ContextMenus;
5
+ parent: ContextMenus[];
6
+ value: string;
7
+ menuConfig: any;
8
+ }
9
+ /**
10
+ * 全局右键菜单配置接口
11
+ */
12
+ interface LewContextMenuConfig {
13
+ menu: Record<string, {
14
+ options: ContextMenus[];
15
+ selectHandler: (params: SelectHandlerParams) => void;
16
+ disabled: boolean;
17
+ }>;
18
+ contextMenu: ((e: MouseEvent) => void) | null;
19
+ instance: any;
20
+ menuInstance: Record<string, any>;
21
+ }
22
+ declare global {
23
+ interface Window {
24
+ LewContextMenu: LewContextMenuConfig;
25
+ }
26
+ }
3
27
  /**
4
- * 初始化右键菜单
5
- * 创建全局右键菜单实例和相关配置
28
+ * 初始化右键菜单配置
6
29
  */
7
30
  export declare const initLewContextMenu: () => void;
8
31
  /**
9
32
  * 右键菜单指令
10
- * 提供右键菜单功能的Vue指令
11
33
  */
12
34
  export declare const LewVContextMenu: {
13
35
  install(app: App): void;
@@ -22,7 +44,9 @@ export interface ContextMenus {
22
44
  children?: ContextMenus[];
23
45
  disabled?: boolean;
24
46
  level?: number;
25
- isDividerLine?: false;
47
+ isDividerLine?: boolean;
48
+ checkbox?: boolean;
49
+ checked?: boolean;
26
50
  [key: string]: any;
27
51
  }
28
52
  /**
@@ -40,8 +64,9 @@ export declare const contextMenuProps: {
40
64
  description: string;
41
65
  };
42
66
  selectHandler: {
43
- type: FunctionConstructor;
67
+ type: PropType<(item: ContextMenus) => void>;
44
68
  default: () => void;
45
69
  description: string;
46
70
  };
47
71
  };
72
+ export {};