lew-ui 2.7.57 → 2.7.59
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/LICENSE +21 -21
- package/dist/_components/CommonInput.vue.d.ts +499 -0
- package/dist/components/data/table/src/LewTable.vue.d.ts +1 -1
- package/dist/components/data/tree/src/LewTree.vue.d.ts +12 -1
- package/dist/components/data/tree/src/props.d.ts +5 -0
- package/dist/components/feedback/drawer/src/LewDrawer.vue.d.ts +22 -0
- package/dist/components/feedback/drawer/src/props.d.ts +10 -0
- package/dist/components/form/cascader/src/LewCascader.vue.d.ts +46 -31
- package/dist/components/form/cascader/src/cascader.d.ts +15 -0
- package/dist/components/form/cascader/src/emits.d.ts +8 -1
- package/dist/components/form/cascader/src/props.d.ts +15 -10
- package/dist/components/form/index.d.ts +0 -1
- package/dist/components/form/input/src/LewInput.vue.d.ts +2 -2
- package/dist/components/form/input-number/src/LewInputNumber.vue.d.ts +2 -2
- package/dist/components/form/input-tag/src/LewInputTag.vue.d.ts +4 -4
- package/dist/components/form/select/src/LewSelect.vue.d.ts +1480 -411
- package/dist/components/form/select/src/emits.d.ts +5 -1
- package/dist/components/form/select/src/props.d.ts +7 -2
- package/dist/components/form/textarea/src/LewTextarea.vue.d.ts +4 -2
- package/dist/components/form/tree-select/src/LewTreeSelect.vue.d.ts +40 -23
- package/dist/components/form/tree-select/src/props.d.ts +0 -5
- package/dist/components/form/tree-select-multiple/index.d.ts +3 -0
- package/dist/components/form/{select-multiple/src/LewSelectMultiple.vue.d.ts → tree-select-multiple/src/LewTreeSelectMultiple.vue.d.ts} +492 -930
- package/dist/components/form/tree-select-multiple/src/emits.d.ts +4 -0
- package/dist/components/form/{select-multiple → tree-select-multiple}/src/props.d.ts +63 -55
- package/dist/components/navigation/steps/src/LewSteps.vue.d.ts +21 -1
- package/dist/components/navigation/steps/src/props.d.ts +8 -0
- package/dist/hooks/index.d.ts +4 -2
- package/dist/hooks/useDOMCreate.d.ts +1 -0
- package/dist/hooks/useEventListener.d.ts +1 -0
- package/dist/hooks/useTreeSelection.d.ts +35 -0
- package/dist/index.css +1 -1
- package/dist/index.js +1615 -1720
- package/dist/index.umd.cjs +7 -7
- package/dist/types/components.d.ts +2 -1
- package/package.json +1 -1
- package/dist/components/form/select-multiple/index.d.ts +0 -3
- package/dist/components/form/select-multiple/src/emits.d.ts +0 -11
|
@@ -1,38 +1,25 @@
|
|
|
1
1
|
import { Property } from 'csstype';
|
|
2
|
-
import {
|
|
2
|
+
import { LewSize, LewTreeDataSource, LewTrigger } from '../../../..';
|
|
3
3
|
import { ExtractPublicPropTypes, PropType } from 'vue';
|
|
4
|
-
export declare const
|
|
4
|
+
export declare const treeSelectMultipleModel: {
|
|
5
5
|
modelValue: {
|
|
6
|
-
type:
|
|
7
|
-
default:
|
|
6
|
+
type: StringConstructor;
|
|
7
|
+
default: undefined;
|
|
8
8
|
};
|
|
9
9
|
};
|
|
10
|
-
export declare const
|
|
11
|
-
|
|
12
|
-
type: PropType<
|
|
10
|
+
export declare const treeSelectMultipleProps: {
|
|
11
|
+
dataSource: {
|
|
12
|
+
type: PropType<LewTreeDataSource[]>;
|
|
13
13
|
typePopKeys: string[];
|
|
14
14
|
validator: (value: any[] | undefined) => boolean;
|
|
15
15
|
};
|
|
16
|
-
trigger: {
|
|
17
|
-
type: PropType<LewTrigger>;
|
|
18
|
-
default: string;
|
|
19
|
-
typeValues: LewTrigger[];
|
|
20
|
-
validator: (value: any) => boolean;
|
|
21
|
-
};
|
|
22
16
|
width: {
|
|
23
17
|
type: PropType<Property.Width>;
|
|
24
18
|
default: string;
|
|
25
19
|
validator: (value: string | number | undefined) => boolean;
|
|
26
20
|
};
|
|
27
|
-
|
|
28
|
-
type: PropType<LewSelectMultipleValueLayout>;
|
|
29
|
-
default: string;
|
|
30
|
-
typeValues: LewSelectMultipleValueLayout[];
|
|
31
|
-
validator: (value: any) => boolean;
|
|
32
|
-
};
|
|
33
|
-
valueTextSplit: {
|
|
21
|
+
defaultValue: {
|
|
34
22
|
type: StringConstructor;
|
|
35
|
-
default: string;
|
|
36
23
|
validator: (value: any) => boolean;
|
|
37
24
|
};
|
|
38
25
|
placeholder: {
|
|
@@ -46,38 +33,44 @@ export declare const selectMultipleProps: {
|
|
|
46
33
|
typeValues: LewSize[];
|
|
47
34
|
validator: (value: any) => boolean;
|
|
48
35
|
};
|
|
49
|
-
|
|
50
|
-
type:
|
|
51
|
-
default:
|
|
36
|
+
disabled: {
|
|
37
|
+
type: BooleanConstructor;
|
|
38
|
+
default: boolean;
|
|
52
39
|
validator: (value: any) => boolean;
|
|
53
40
|
};
|
|
54
|
-
|
|
41
|
+
clearable: {
|
|
55
42
|
type: BooleanConstructor;
|
|
56
43
|
default: boolean;
|
|
57
44
|
validator: (value: any) => boolean;
|
|
58
45
|
};
|
|
59
|
-
|
|
60
|
-
type:
|
|
61
|
-
default:
|
|
46
|
+
checkable: {
|
|
47
|
+
type: BooleanConstructor;
|
|
48
|
+
default: boolean;
|
|
62
49
|
validator: (value: any) => boolean;
|
|
63
50
|
};
|
|
64
|
-
|
|
65
|
-
type:
|
|
66
|
-
default:
|
|
51
|
+
showAllLevels: {
|
|
52
|
+
type: BooleanConstructor;
|
|
53
|
+
default: boolean;
|
|
67
54
|
validator: (value: any) => boolean;
|
|
68
55
|
};
|
|
69
|
-
|
|
70
|
-
type:
|
|
71
|
-
default:
|
|
56
|
+
showCheckIcon: {
|
|
57
|
+
type: BooleanConstructor;
|
|
58
|
+
default: boolean;
|
|
72
59
|
validator: (value: any) => boolean;
|
|
73
60
|
};
|
|
74
|
-
|
|
75
|
-
type:
|
|
61
|
+
showLine: {
|
|
62
|
+
type: BooleanConstructor;
|
|
63
|
+
default: boolean;
|
|
76
64
|
validator: (value: any) => boolean;
|
|
77
65
|
};
|
|
78
|
-
|
|
79
|
-
type:
|
|
80
|
-
|
|
66
|
+
expandAll: {
|
|
67
|
+
type: BooleanConstructor;
|
|
68
|
+
default: boolean;
|
|
69
|
+
validator: (value: any) => boolean;
|
|
70
|
+
};
|
|
71
|
+
searchable: {
|
|
72
|
+
type: BooleanConstructor;
|
|
73
|
+
default: boolean;
|
|
81
74
|
validator: (value: any) => boolean;
|
|
82
75
|
};
|
|
83
76
|
searchDelay: {
|
|
@@ -85,35 +78,50 @@ export declare const selectMultipleProps: {
|
|
|
85
78
|
default: number;
|
|
86
79
|
validator: (value: any) => boolean;
|
|
87
80
|
};
|
|
88
|
-
|
|
81
|
+
readonly: {
|
|
89
82
|
type: BooleanConstructor;
|
|
90
83
|
default: boolean;
|
|
91
84
|
validator: (value: any) => boolean;
|
|
92
85
|
};
|
|
93
|
-
|
|
86
|
+
free: {
|
|
94
87
|
type: BooleanConstructor;
|
|
95
88
|
default: boolean;
|
|
96
89
|
validator: (value: any) => boolean;
|
|
97
90
|
};
|
|
98
|
-
|
|
99
|
-
type:
|
|
100
|
-
default:
|
|
91
|
+
trigger: {
|
|
92
|
+
type: PropType<LewTrigger>;
|
|
93
|
+
default: string;
|
|
94
|
+
typeValues: LewTrigger[];
|
|
101
95
|
validator: (value: any) => boolean;
|
|
102
96
|
};
|
|
103
|
-
|
|
104
|
-
type:
|
|
105
|
-
default:
|
|
97
|
+
keyField: {
|
|
98
|
+
type: StringConstructor;
|
|
99
|
+
default: string;
|
|
106
100
|
validator: (value: any) => boolean;
|
|
107
101
|
};
|
|
108
|
-
|
|
109
|
-
type:
|
|
110
|
-
default:
|
|
102
|
+
labelField: {
|
|
103
|
+
type: StringConstructor;
|
|
104
|
+
default: string;
|
|
111
105
|
validator: (value: any) => boolean;
|
|
112
106
|
};
|
|
113
|
-
|
|
114
|
-
type:
|
|
115
|
-
default:
|
|
116
|
-
validator: (value: any
|
|
107
|
+
disabledField: {
|
|
108
|
+
type: StringConstructor;
|
|
109
|
+
default: string;
|
|
110
|
+
validator: (value: any) => boolean;
|
|
111
|
+
};
|
|
112
|
+
initMethod: {
|
|
113
|
+
type: PropType<() => void>;
|
|
114
|
+
default: undefined;
|
|
115
|
+
validator: (value: any) => boolean;
|
|
116
|
+
};
|
|
117
|
+
initMethodId: {
|
|
118
|
+
type: StringConstructor;
|
|
119
|
+
validator: (value: any) => boolean;
|
|
120
|
+
};
|
|
121
|
+
loadMethod: {
|
|
122
|
+
type: PropType<() => void>;
|
|
123
|
+
default: undefined;
|
|
124
|
+
validator: (value: any) => boolean;
|
|
117
125
|
};
|
|
118
126
|
};
|
|
119
|
-
export type
|
|
127
|
+
export type LewTreeSelectMultipleProps = ExtractPublicPropTypes<typeof treeSelectMultipleProps>;
|
|
@@ -16,11 +16,20 @@ declare const _default: import('vue').DefineComponent<globalThis.ExtractPropType
|
|
|
16
16
|
default: string;
|
|
17
17
|
validator: (value: string | number | undefined) => boolean;
|
|
18
18
|
};
|
|
19
|
+
canClickItem: {
|
|
20
|
+
type: BooleanConstructor;
|
|
21
|
+
default: boolean;
|
|
22
|
+
};
|
|
23
|
+
canCrossSteps: {
|
|
24
|
+
type: BooleanConstructor;
|
|
25
|
+
default: boolean;
|
|
26
|
+
};
|
|
19
27
|
modelValue: {
|
|
20
28
|
type: globalThis.PropType<any>;
|
|
21
29
|
};
|
|
22
30
|
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
23
|
-
|
|
31
|
+
change: (...args: any[]) => void;
|
|
32
|
+
"update:modelValue": (value: any) => void;
|
|
24
33
|
}, string, import('vue').PublicProps, Readonly<globalThis.ExtractPropTypes<{
|
|
25
34
|
options: {
|
|
26
35
|
type: PropType<import('../../../..').LewStepsOption[]>;
|
|
@@ -39,13 +48,24 @@ declare const _default: import('vue').DefineComponent<globalThis.ExtractPropType
|
|
|
39
48
|
default: string;
|
|
40
49
|
validator: (value: string | number | undefined) => boolean;
|
|
41
50
|
};
|
|
51
|
+
canClickItem: {
|
|
52
|
+
type: BooleanConstructor;
|
|
53
|
+
default: boolean;
|
|
54
|
+
};
|
|
55
|
+
canCrossSteps: {
|
|
56
|
+
type: BooleanConstructor;
|
|
57
|
+
default: boolean;
|
|
58
|
+
};
|
|
42
59
|
modelValue: {
|
|
43
60
|
type: globalThis.PropType<any>;
|
|
44
61
|
};
|
|
45
62
|
}>> & Readonly<{
|
|
63
|
+
onChange?: ((...args: any[]) => any) | undefined;
|
|
46
64
|
"onUpdate:modelValue"?: ((value: any) => any) | undefined;
|
|
47
65
|
}>, {
|
|
48
66
|
minWidth: import("csstype").Property.Width<0 | (string & {})>;
|
|
49
67
|
status: import('../../../..').LewStepsStatus;
|
|
68
|
+
canClickItem: boolean;
|
|
69
|
+
canCrossSteps: boolean;
|
|
50
70
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement>;
|
|
51
71
|
export default _default;
|
|
@@ -24,5 +24,13 @@ export declare const stepsProps: {
|
|
|
24
24
|
default: string;
|
|
25
25
|
validator: (value: string | number | undefined) => boolean;
|
|
26
26
|
};
|
|
27
|
+
canClickItem: {
|
|
28
|
+
type: BooleanConstructor;
|
|
29
|
+
default: boolean;
|
|
30
|
+
};
|
|
31
|
+
canCrossSteps: {
|
|
32
|
+
type: BooleanConstructor;
|
|
33
|
+
default: boolean;
|
|
34
|
+
};
|
|
27
35
|
};
|
|
28
36
|
export type LewStepsProps = ExtractPublicPropTypes<typeof stepsProps>;
|
package/dist/hooks/index.d.ts
CHANGED
|
@@ -1,2 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { useDOMCreate } from './useDOMCreate';
|
|
2
|
+
import { useEventListener } from './useEventListener';
|
|
3
|
+
import { useTreeSelection } from './useTreeSelection';
|
|
4
|
+
export { useDOMCreate, useEventListener, useTreeSelection };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function useDOMCreate(nodeId: string): void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function useEventListener(target: EventTarget, event: string, callback: EventListenerOrEventListenerObject): void;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
export interface TreeNode {
|
|
2
|
+
key: string;
|
|
3
|
+
children?: TreeNode[];
|
|
4
|
+
disabled?: boolean;
|
|
5
|
+
[key: string]: any;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* 树形选择 Hook - 参考 Ant Design 和 Element UI 的实现
|
|
9
|
+
*
|
|
10
|
+
* 核心规则:
|
|
11
|
+
* 1. 选中状态和半选状态互斥
|
|
12
|
+
* 2. 选中节点时,所有子节点自动选中
|
|
13
|
+
* 3. 取消选中节点时,所有子节点自动取消选中
|
|
14
|
+
* 4. 子节点状态变化时,自动更新所有祖先节点状态
|
|
15
|
+
*/
|
|
16
|
+
export declare function useTreeSelection(): {
|
|
17
|
+
selectedKeys: globalThis.Ref<string[], string[]>;
|
|
18
|
+
indeterminateKeys: globalThis.Ref<string[], string[]>;
|
|
19
|
+
init: ({ tree: _tree, keys }: {
|
|
20
|
+
tree?: TreeNode[];
|
|
21
|
+
keys: string[];
|
|
22
|
+
}) => void;
|
|
23
|
+
addKey: (key: string) => void;
|
|
24
|
+
removeKey: (key: string) => void;
|
|
25
|
+
toggleKey: (key: string) => void;
|
|
26
|
+
isSelected: globalThis.ComputedRef<(key: string) => boolean>;
|
|
27
|
+
isIndeterminate: globalThis.ComputedRef<(key: string) => boolean>;
|
|
28
|
+
isNodeDisabled: (key: string) => boolean;
|
|
29
|
+
getSelectedLeafKeys: () => string[];
|
|
30
|
+
findItemsByValues: (values: string[]) => Array<{
|
|
31
|
+
key: string;
|
|
32
|
+
disabled?: boolean;
|
|
33
|
+
isLeaf: boolean;
|
|
34
|
+
}>;
|
|
35
|
+
};
|