lew-ui 2.6.0 → 2.6.1
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/dist/components/dropdown/src/LewDropdown.vue.d.ts +13 -0
- package/dist/components/dropdown/src/props.d.ts +12 -0
- package/dist/directives/context-menu/src/LewContextMenu.vue.d.ts +3 -3
- package/dist/directives/context-menu/src/index.d.ts +30 -5
- package/dist/index.mjs +571 -123
- package/dist/index.umd.js +7 -7
- package/dist/locals/de.d.ts +56 -0
- package/dist/locals/en.d.ts +12 -2
- package/dist/locals/es.d.ts +56 -0
- package/dist/locals/fr.d.ts +56 -0
- package/dist/locals/index.d.ts +8 -1
- package/dist/locals/it.d.ts +56 -0
- package/dist/locals/ja.d.ts +56 -0
- package/dist/locals/ko.d.ts +56 -0
- package/dist/locals/pt.d.ts +56 -0
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -4,6 +4,7 @@ declare function __VLS_template(): {
|
|
|
4
4
|
default?(_: {}): any;
|
|
5
5
|
};
|
|
6
6
|
declare const __VLS_component: import('vue').DefineComponent<globalThis.ExtractPropTypes<{
|
|
7
|
+
selectedKeys: import('vue').PropType<string[]>;
|
|
7
8
|
trigger: {
|
|
8
9
|
type: PropType<import('../../..').DropdownTrigger>;
|
|
9
10
|
default: string;
|
|
@@ -23,12 +24,18 @@ declare const __VLS_component: import('vue').DefineComponent<globalThis.ExtractP
|
|
|
23
24
|
typeDesc: string;
|
|
24
25
|
validator(value: DropdownOptions[]): boolean;
|
|
25
26
|
};
|
|
27
|
+
checkbox: {
|
|
28
|
+
type: BooleanConstructor;
|
|
29
|
+
default: boolean;
|
|
30
|
+
description: string;
|
|
31
|
+
};
|
|
26
32
|
}>, {
|
|
27
33
|
show: () => void;
|
|
28
34
|
hide: () => void;
|
|
29
35
|
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
30
36
|
change: (...args: any[]) => void;
|
|
31
37
|
}, string, import('vue').PublicProps, Readonly<globalThis.ExtractPropTypes<{
|
|
38
|
+
selectedKeys: import('vue').PropType<string[]>;
|
|
32
39
|
trigger: {
|
|
33
40
|
type: PropType<import('../../..').DropdownTrigger>;
|
|
34
41
|
default: string;
|
|
@@ -48,12 +55,18 @@ declare const __VLS_component: import('vue').DefineComponent<globalThis.ExtractP
|
|
|
48
55
|
typeDesc: string;
|
|
49
56
|
validator(value: DropdownOptions[]): boolean;
|
|
50
57
|
};
|
|
58
|
+
checkbox: {
|
|
59
|
+
type: BooleanConstructor;
|
|
60
|
+
default: boolean;
|
|
61
|
+
description: string;
|
|
62
|
+
};
|
|
51
63
|
}>> & Readonly<{
|
|
52
64
|
onChange?: ((...args: any[]) => any) | undefined;
|
|
53
65
|
}>, {
|
|
54
66
|
placement: import('../../..').DropdownPlacement;
|
|
55
67
|
trigger: import('../../..').DropdownTrigger;
|
|
56
68
|
options: import('../../..').ContextMenus[];
|
|
69
|
+
checkbox: boolean;
|
|
57
70
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
58
71
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
|
|
59
72
|
export default _default;
|
|
@@ -4,6 +4,13 @@ import { ContextMenus } from '../../..';
|
|
|
4
4
|
export type DropdownTrigger = 'hover' | 'click';
|
|
5
5
|
export type DropdownPlacement = 'top' | 'top-start' | 'top-end' | 'bottom' | 'bottom-start' | 'bottom-end' | 'left' | 'left-start' | 'left-end' | 'right' | 'right-start' | 'right-end';
|
|
6
6
|
export type DropdownOptions = ContextMenus;
|
|
7
|
+
export declare const dropdownModel: {
|
|
8
|
+
selectedKeys: {
|
|
9
|
+
type: PropType<string[]>;
|
|
10
|
+
default: () => never[];
|
|
11
|
+
description: string;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
7
14
|
export declare const dropdownProps: {
|
|
8
15
|
trigger: {
|
|
9
16
|
type: PropType<DropdownTrigger>;
|
|
@@ -24,5 +31,10 @@ export declare const dropdownProps: {
|
|
|
24
31
|
typeDesc: string;
|
|
25
32
|
validator(value: DropdownOptions[]): boolean;
|
|
26
33
|
};
|
|
34
|
+
checkbox: {
|
|
35
|
+
type: BooleanConstructor;
|
|
36
|
+
default: boolean;
|
|
37
|
+
description: string;
|
|
38
|
+
};
|
|
27
39
|
};
|
|
28
40
|
export type DropdownProps = ExtractPropTypes<typeof dropdownProps>;
|
|
@@ -12,7 +12,7 @@ declare const _default: import('vue').DefineComponent<globalThis.ExtractPropType
|
|
|
12
12
|
description: string;
|
|
13
13
|
};
|
|
14
14
|
selectHandler: {
|
|
15
|
-
type:
|
|
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:
|
|
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:
|
|
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?:
|
|
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:
|
|
67
|
+
type: PropType<(item: ContextMenus) => void>;
|
|
44
68
|
default: () => void;
|
|
45
69
|
description: string;
|
|
46
70
|
};
|
|
47
71
|
};
|
|
72
|
+
export {};
|