@dazhicheng/ui 1.5.112 → 1.5.114
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/tt-form/src/types.d.ts +2 -0
- package/dist/components/tt-panel-select/src/common.d.ts +1 -0
- package/dist/components/tt-panel-select/src/components/PanelLeft.vue.d.ts +1 -2
- package/dist/components/tt-panel-select/src/components/PanelMiddle.vue.d.ts +7 -3
- package/dist/components/tt-panel-select/src/components/PanelRight.vue.d.ts +132 -1
- package/dist/components/tt-panel-select/src/hooks/usePanelSelectData.d.ts +2 -1
- package/dist/components/tt-panel-select/src/hooks/usePanelSelectSelection.d.ts +2 -1
- package/dist/components/tt-panel-select/src/props.d.ts +9 -1
- package/dist/index.js +52614 -28557
- package/dist/{index.modern-JWUyik9a.js → index.modern-CTe-bW9A.js} +2 -2
- package/dist/plugins.js +1 -1
- package/dist/style.css +1 -1
- package/package.json +4 -3
|
@@ -7,6 +7,7 @@ import { TtSelectProp } from '../../tt-select';
|
|
|
7
7
|
import { TtUploadProps } from '../../tt-upload';
|
|
8
8
|
import { Props as TtApiComponentProps } from '../../tt-api-component';
|
|
9
9
|
import { FieldEntry, FieldArrayContext } from './types/forms';
|
|
10
|
+
import { PanelContainerProps } from '../../tt-panel-select';
|
|
10
11
|
import { FormApi } from './formApi';
|
|
11
12
|
export type FormLayout = "horizontal" | "inline" | "vertical";
|
|
12
13
|
export interface BaseFormComponentMap {
|
|
@@ -29,6 +30,7 @@ export interface BaseFormComponentMap {
|
|
|
29
30
|
TtUpload: TtUploadProps;
|
|
30
31
|
ElColorPicker: ColorPickerProps;
|
|
31
32
|
TtApiComponent: TtApiComponentProps<Component>;
|
|
33
|
+
TtPanelSelect: PanelContainerProps;
|
|
32
34
|
}
|
|
33
35
|
/**
|
|
34
36
|
* 表单组件类型字符串联合类型
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const ALL = "all";
|
|
@@ -2,7 +2,6 @@ import { PanelSelectValue } from '../props';
|
|
|
2
2
|
import { PanelTreeNode } from '../hooks/usePanelSelectData';
|
|
3
3
|
type __VLS_Props = {
|
|
4
4
|
prefixCls: string;
|
|
5
|
-
showNav: boolean;
|
|
6
5
|
keyword: string;
|
|
7
6
|
treeData: PanelTreeNode[];
|
|
8
7
|
expandedKeys: PanelSelectValue[];
|
|
@@ -13,5 +12,5 @@ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {
|
|
|
13
12
|
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
14
13
|
onSelect?: ((node: PanelTreeNode) => any) | undefined;
|
|
15
14
|
"onUpdate:keyword"?: ((value: string) => any) | undefined;
|
|
16
|
-
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {},
|
|
15
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
17
16
|
export default _default;
|
|
@@ -11,30 +11,34 @@ type __VLS_Props = {
|
|
|
11
11
|
selectedValues: PanelSelectValue[];
|
|
12
12
|
isAllChecked: boolean;
|
|
13
13
|
isIndeterminate: boolean;
|
|
14
|
+
allChecked: boolean;
|
|
14
15
|
groupCheckedMap: Record<string, boolean>;
|
|
15
16
|
groupIndeterminateMap: Record<string, boolean>;
|
|
16
17
|
scrollToGroupValue?: PanelSelectValue;
|
|
17
18
|
pasteSearch: boolean;
|
|
18
19
|
separator: string;
|
|
20
|
+
showAll: boolean;
|
|
19
21
|
};
|
|
20
22
|
declare function scrollToGroup(groupValue: PanelSelectValue): Promise<void>;
|
|
21
23
|
declare const _default: import('vue').DefineComponent<__VLS_Props, {
|
|
22
24
|
scrollToGroup: typeof scrollToGroup;
|
|
23
25
|
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
24
|
-
checkAll: (checked: boolean) => any;
|
|
25
26
|
"update:keyword": (value: string) => any;
|
|
27
|
+
checkAll: (checked: boolean) => any;
|
|
28
|
+
allCheck: (checked: boolean) => any;
|
|
26
29
|
groupCheck: (groupValue: PanelSelectValue, checked: boolean) => any;
|
|
27
30
|
optionCheck: (value: PanelSelectValue, checked: boolean) => any;
|
|
28
31
|
optionsCheck: (values: PanelSelectValue[], checked: boolean) => any;
|
|
29
32
|
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
30
|
-
onCheckAll?: ((checked: boolean) => any) | undefined;
|
|
31
33
|
"onUpdate:keyword"?: ((value: string) => any) | undefined;
|
|
34
|
+
onCheckAll?: ((checked: boolean) => any) | undefined;
|
|
35
|
+
onAllCheck?: ((checked: boolean) => any) | undefined;
|
|
32
36
|
onGroupCheck?: ((groupValue: PanelSelectValue, checked: boolean) => any) | undefined;
|
|
33
37
|
onOptionCheck?: ((value: PanelSelectValue, checked: boolean) => any) | undefined;
|
|
34
38
|
onOptionsCheck?: ((values: PanelSelectValue[], checked: boolean) => any) | undefined;
|
|
35
39
|
}>, {
|
|
36
|
-
separator: string;
|
|
37
40
|
pasteSearch: boolean;
|
|
41
|
+
separator: string;
|
|
38
42
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
39
43
|
searchInputRef: ({
|
|
40
44
|
$: import('vue').ComponentInternalInstance;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { nextTick } from 'vue';
|
|
1
2
|
import { PanelTreeNode } from '../hooks/usePanelSelectData';
|
|
2
3
|
import { PanelSelectValue } from '../props';
|
|
3
4
|
type __VLS_Props = {
|
|
@@ -11,5 +12,135 @@ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {
|
|
|
11
12
|
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
12
13
|
onRemove?: ((value: PanelSelectValue) => any) | undefined;
|
|
13
14
|
onClearAll?: (() => any) | undefined;
|
|
14
|
-
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
15
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
16
|
+
scrollbarRef: ({
|
|
17
|
+
$: import('vue').ComponentInternalInstance;
|
|
18
|
+
$data: {};
|
|
19
|
+
$props: {
|
|
20
|
+
readonly distance?: number | undefined;
|
|
21
|
+
readonly height?: number | string | undefined;
|
|
22
|
+
readonly maxHeight?: number | string | undefined;
|
|
23
|
+
readonly native?: boolean | undefined;
|
|
24
|
+
readonly wrapStyle?: import('vue').StyleValue;
|
|
25
|
+
readonly wrapClass?: string | string[] | undefined;
|
|
26
|
+
readonly viewClass?: string | string[] | undefined;
|
|
27
|
+
readonly viewStyle?: import('vue').StyleValue;
|
|
28
|
+
readonly noresize?: boolean | undefined;
|
|
29
|
+
readonly tag?: (keyof HTMLElementTagNameMap | (string & {})) | undefined;
|
|
30
|
+
readonly always?: boolean | undefined;
|
|
31
|
+
readonly minSize?: number | undefined;
|
|
32
|
+
readonly tabindex?: number | string | undefined;
|
|
33
|
+
readonly id?: string | undefined;
|
|
34
|
+
readonly role?: string | undefined;
|
|
35
|
+
readonly ariaLabel?: string | undefined;
|
|
36
|
+
readonly ariaOrientation?: "horizontal" | "vertical" | "undefined" | undefined;
|
|
37
|
+
readonly onScroll?: ((args_0: {
|
|
38
|
+
scrollTop: number;
|
|
39
|
+
scrollLeft: number;
|
|
40
|
+
}) => any) | undefined | undefined;
|
|
41
|
+
readonly "onEnd-reached"?: ((direction: import('element-plus').ScrollbarDirection) => any) | undefined | undefined;
|
|
42
|
+
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps;
|
|
43
|
+
$attrs: {
|
|
44
|
+
[x: string]: unknown;
|
|
45
|
+
};
|
|
46
|
+
$refs: {
|
|
47
|
+
[x: string]: unknown;
|
|
48
|
+
};
|
|
49
|
+
$slots: Readonly<{
|
|
50
|
+
[name: string]: import('vue').Slot<any> | undefined;
|
|
51
|
+
}>;
|
|
52
|
+
$root: import('vue').ComponentPublicInstance | null;
|
|
53
|
+
$parent: import('vue').ComponentPublicInstance | null;
|
|
54
|
+
$host: Element | null;
|
|
55
|
+
$emit: ((event: "scroll", args_0: {
|
|
56
|
+
scrollTop: number;
|
|
57
|
+
scrollLeft: number;
|
|
58
|
+
}) => void) & ((event: "end-reached", direction: import('element-plus').ScrollbarDirection) => void);
|
|
59
|
+
$el: any;
|
|
60
|
+
$options: import('vue').ComponentOptionsBase<Readonly<import('element-plus').ScrollbarProps> & Readonly<{
|
|
61
|
+
onScroll?: ((args_0: {
|
|
62
|
+
scrollTop: number;
|
|
63
|
+
scrollLeft: number;
|
|
64
|
+
}) => any) | undefined;
|
|
65
|
+
"onEnd-reached"?: ((direction: import('element-plus').ScrollbarDirection) => any) | undefined;
|
|
66
|
+
}>, {
|
|
67
|
+
wrapRef: import('vue').Ref<HTMLDivElement | undefined, HTMLDivElement | undefined>;
|
|
68
|
+
update: () => void;
|
|
69
|
+
scrollTo: {
|
|
70
|
+
(xCord: number, yCord?: number): void;
|
|
71
|
+
(options: ScrollToOptions): void;
|
|
72
|
+
};
|
|
73
|
+
setScrollTop: (value: number) => void;
|
|
74
|
+
setScrollLeft: (value: number) => void;
|
|
75
|
+
handleScroll: () => void;
|
|
76
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
77
|
+
scroll: (args_0: {
|
|
78
|
+
scrollTop: number;
|
|
79
|
+
scrollLeft: number;
|
|
80
|
+
}) => void;
|
|
81
|
+
"end-reached": (direction: import('element-plus').ScrollbarDirection) => void;
|
|
82
|
+
}, string, {
|
|
83
|
+
tabindex: number | string;
|
|
84
|
+
height: number | string;
|
|
85
|
+
maxHeight: number | string;
|
|
86
|
+
tag: keyof HTMLElementTagNameMap | (string & {});
|
|
87
|
+
distance: number;
|
|
88
|
+
wrapStyle: string | false | import('vue').CSSProperties | import('vue').StyleValue[] | null;
|
|
89
|
+
wrapClass: string | string[];
|
|
90
|
+
viewClass: string | string[];
|
|
91
|
+
viewStyle: string | false | import('vue').CSSProperties | import('vue').StyleValue[] | null;
|
|
92
|
+
minSize: number;
|
|
93
|
+
}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & {
|
|
94
|
+
beforeCreate?: (() => void) | (() => void)[];
|
|
95
|
+
created?: (() => void) | (() => void)[];
|
|
96
|
+
beforeMount?: (() => void) | (() => void)[];
|
|
97
|
+
mounted?: (() => void) | (() => void)[];
|
|
98
|
+
beforeUpdate?: (() => void) | (() => void)[];
|
|
99
|
+
updated?: (() => void) | (() => void)[];
|
|
100
|
+
activated?: (() => void) | (() => void)[];
|
|
101
|
+
deactivated?: (() => void) | (() => void)[];
|
|
102
|
+
beforeDestroy?: (() => void) | (() => void)[];
|
|
103
|
+
beforeUnmount?: (() => void) | (() => void)[];
|
|
104
|
+
destroyed?: (() => void) | (() => void)[];
|
|
105
|
+
unmounted?: (() => void) | (() => void)[];
|
|
106
|
+
renderTracked?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
|
|
107
|
+
renderTriggered?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
|
|
108
|
+
errorCaptured?: ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void)[];
|
|
109
|
+
};
|
|
110
|
+
$forceUpdate: () => void;
|
|
111
|
+
$nextTick: typeof nextTick;
|
|
112
|
+
$watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import('@vue/reactivity').OnCleanup]) => any : (...args: [any, any, import('@vue/reactivity').OnCleanup]) => any, options?: import('vue').WatchOptions): import('vue').WatchStopHandle;
|
|
113
|
+
} & Readonly<{
|
|
114
|
+
tabindex: number | string;
|
|
115
|
+
height: number | string;
|
|
116
|
+
maxHeight: number | string;
|
|
117
|
+
tag: keyof HTMLElementTagNameMap | (string & {});
|
|
118
|
+
distance: number;
|
|
119
|
+
wrapStyle: string | false | import('vue').CSSProperties | import('vue').StyleValue[] | null;
|
|
120
|
+
wrapClass: string | string[];
|
|
121
|
+
viewClass: string | string[];
|
|
122
|
+
viewStyle: string | false | import('vue').CSSProperties | import('vue').StyleValue[] | null;
|
|
123
|
+
minSize: number;
|
|
124
|
+
}> & Omit<Readonly<import('element-plus').ScrollbarProps> & Readonly<{
|
|
125
|
+
onScroll?: ((args_0: {
|
|
126
|
+
scrollTop: number;
|
|
127
|
+
scrollLeft: number;
|
|
128
|
+
}) => any) | undefined;
|
|
129
|
+
"onEnd-reached"?: ((direction: import('element-plus').ScrollbarDirection) => any) | undefined;
|
|
130
|
+
}>, "height" | "tabindex" | "tag" | "handleScroll" | "maxHeight" | "scrollTo" | "update" | "distance" | "wrapStyle" | "wrapClass" | "viewClass" | "viewStyle" | "minSize" | "wrapRef" | "setScrollTop" | "setScrollLeft"> & import('vue').ShallowUnwrapRef<{
|
|
131
|
+
wrapRef: import('vue').Ref<HTMLDivElement | undefined, HTMLDivElement | undefined>;
|
|
132
|
+
update: () => void;
|
|
133
|
+
scrollTo: {
|
|
134
|
+
(xCord: number, yCord?: number): void;
|
|
135
|
+
(options: ScrollToOptions): void;
|
|
136
|
+
};
|
|
137
|
+
setScrollTop: (value: number) => void;
|
|
138
|
+
setScrollLeft: (value: number) => void;
|
|
139
|
+
handleScroll: () => void;
|
|
140
|
+
}> & {} & import('vue').ComponentCustomProperties & {} & {
|
|
141
|
+
$slots: {
|
|
142
|
+
default?: (props: {}) => any;
|
|
143
|
+
};
|
|
144
|
+
}) | null;
|
|
145
|
+
}, HTMLDivElement>;
|
|
15
146
|
export default _default;
|
|
@@ -7,7 +7,7 @@ export type PanelTreeNode = PanelSelectOption & {
|
|
|
7
7
|
value: PanelSelectValue;
|
|
8
8
|
disabled?: boolean;
|
|
9
9
|
children?: PanelTreeNode[];
|
|
10
|
-
|
|
10
|
+
pid?: PanelSelectValue | null;
|
|
11
11
|
level: number;
|
|
12
12
|
path: PanelTreeNode[];
|
|
13
13
|
raw: PanelSelectOption;
|
|
@@ -35,4 +35,5 @@ export declare function usePanelSelectData(props: PanelContainerProps): {
|
|
|
35
35
|
label: string;
|
|
36
36
|
}>(nodes: T[], keyword: string) => T[];
|
|
37
37
|
buildOptionGroups: (nodes: PanelTreeNode[], keyword: string) => OptionGroup[];
|
|
38
|
+
isFirstLoaded: import('vue').Ref<boolean, boolean>;
|
|
38
39
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Ref, WritableComputedRef } from 'vue';
|
|
2
|
-
import { OptionGroup, PanelTreeNode } from './usePanelSelectData';
|
|
3
2
|
import { PanelSelectModelValue, PanelSelectValue } from '../props';
|
|
3
|
+
import { OptionGroup, PanelTreeNode } from './usePanelSelectData';
|
|
4
4
|
type UsePanelSelectSelectionParams = {
|
|
5
5
|
multiple: Readonly<Ref<boolean>>;
|
|
6
6
|
modelValue: Ref<PanelSelectModelValue>;
|
|
@@ -18,6 +18,7 @@ export declare function usePanelSelectSelection(params: UsePanelSelectSelectionP
|
|
|
18
18
|
isGroupChecked: (group: OptionGroup) => boolean;
|
|
19
19
|
isGroupIndeterminate: (group: OptionGroup) => boolean;
|
|
20
20
|
handleGroupCheck: (group: OptionGroup, checked: boolean) => void;
|
|
21
|
+
handleAllOptionCheck: (checked: boolean) => void;
|
|
21
22
|
handleOptionCheck: (value: PanelSelectValue, checked: boolean) => void;
|
|
22
23
|
handleOptionsCheck: (values: PanelSelectValue[], checked: boolean) => void;
|
|
23
24
|
handleCheckAll: (checked: boolean) => void;
|
|
@@ -29,7 +29,7 @@ export interface PanelContainerProps {
|
|
|
29
29
|
/** 是否多选 */
|
|
30
30
|
multiple?: boolean;
|
|
31
31
|
/** 远程加载函数 */
|
|
32
|
-
api?: (arg?: any) => Promise<
|
|
32
|
+
api?: (arg?: any) => Promise<any[] | any>;
|
|
33
33
|
/** 传给 api 的参数 */
|
|
34
34
|
params?: Recordable;
|
|
35
35
|
/** 当 api 返回对象时,用于提取列表的字段路径 */
|
|
@@ -48,4 +48,12 @@ export interface PanelContainerProps {
|
|
|
48
48
|
separator?: string;
|
|
49
49
|
/** 粘贴后是否触发搜索 */
|
|
50
50
|
pasteSearch?: boolean;
|
|
51
|
+
/** 打开下拉框时是否总是请求接口加载数据源 */
|
|
52
|
+
alwaysLoad?: boolean;
|
|
53
|
+
/** 是否展示全部选项 */
|
|
54
|
+
showAll?: boolean;
|
|
55
|
+
/** 是否按照中文拼音的首个字母进行转换成树结构进行分组展示(优先级高于showOriginMode,低于treeConfig) */
|
|
56
|
+
showPinyinMode?: boolean;
|
|
57
|
+
/** 是否平铺原样展示数据,如果数据中是数据结构还是按照默认进行展示 */
|
|
58
|
+
showOriginMode?: boolean;
|
|
51
59
|
}
|