@dazhicheng/ui 1.5.111 → 1.5.113
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/components/PanelMiddle.vue.d.ts +199 -4
- 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 +11 -1
- package/dist/components/tt-panel-select/src/hooks/usePanelSelectSelection.d.ts +5 -0
- package/dist/components/tt-panel-select/src/props.d.ts +31 -21
- package/dist/components/tt-text/index.vue.d.ts +2 -2
- package/dist/index.js +26049 -25936
- 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 +1 -1
|
@@ -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
|
* 表单组件类型字符串联合类型
|
|
@@ -11,24 +11,219 @@ type __VLS_Props = {
|
|
|
11
11
|
selectedValues: PanelSelectValue[];
|
|
12
12
|
isAllChecked: boolean;
|
|
13
13
|
isIndeterminate: boolean;
|
|
14
|
-
scrollToGroupValue?: PanelSelectValue;
|
|
15
14
|
groupCheckedMap: Record<string, boolean>;
|
|
16
15
|
groupIndeterminateMap: Record<string, boolean>;
|
|
16
|
+
scrollToGroupValue?: PanelSelectValue;
|
|
17
|
+
pasteSearch: boolean;
|
|
18
|
+
separator: string;
|
|
17
19
|
};
|
|
18
20
|
declare function scrollToGroup(groupValue: PanelSelectValue): Promise<void>;
|
|
19
21
|
declare const _default: import('vue').DefineComponent<__VLS_Props, {
|
|
20
22
|
scrollToGroup: typeof scrollToGroup;
|
|
21
23
|
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
22
|
-
checkAll: (checked: boolean) => any;
|
|
23
24
|
"update:keyword": (value: string) => any;
|
|
25
|
+
checkAll: (checked: boolean) => any;
|
|
24
26
|
groupCheck: (groupValue: PanelSelectValue, checked: boolean) => any;
|
|
25
27
|
optionCheck: (value: PanelSelectValue, checked: boolean) => any;
|
|
28
|
+
optionsCheck: (values: PanelSelectValue[], checked: boolean) => any;
|
|
26
29
|
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
27
|
-
onCheckAll?: ((checked: boolean) => any) | undefined;
|
|
28
30
|
"onUpdate:keyword"?: ((value: string) => any) | undefined;
|
|
31
|
+
onCheckAll?: ((checked: boolean) => any) | undefined;
|
|
29
32
|
onGroupCheck?: ((groupValue: PanelSelectValue, checked: boolean) => any) | undefined;
|
|
30
33
|
onOptionCheck?: ((value: PanelSelectValue, checked: boolean) => any) | undefined;
|
|
31
|
-
|
|
34
|
+
onOptionsCheck?: ((values: PanelSelectValue[], checked: boolean) => any) | undefined;
|
|
35
|
+
}>, {
|
|
36
|
+
pasteSearch: boolean;
|
|
37
|
+
separator: string;
|
|
38
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
39
|
+
searchInputRef: ({
|
|
40
|
+
$: import('vue').ComponentInternalInstance;
|
|
41
|
+
$data: {};
|
|
42
|
+
$props: {
|
|
43
|
+
readonly id?: string | undefined;
|
|
44
|
+
readonly size?: import('element-plus').ComponentSize | undefined;
|
|
45
|
+
readonly disabled?: boolean | undefined;
|
|
46
|
+
readonly modelValue?: string | number | null | undefined | undefined;
|
|
47
|
+
readonly modelModifiers?: import('element-plus').InputModelModifiers | undefined;
|
|
48
|
+
readonly maxlength?: string | number | undefined;
|
|
49
|
+
readonly minlength?: string | number | undefined;
|
|
50
|
+
readonly type?: import('element-plus').InputType | undefined;
|
|
51
|
+
readonly resize?: "none" | "both" | "horizontal" | "vertical" | undefined;
|
|
52
|
+
readonly autosize?: import('element-plus').InputAutoSize | undefined;
|
|
53
|
+
readonly autocomplete?: string | undefined;
|
|
54
|
+
readonly formatter?: ((value: string) => string) | undefined;
|
|
55
|
+
readonly parser?: ((value: string) => string) | undefined;
|
|
56
|
+
readonly placeholder?: string | undefined;
|
|
57
|
+
readonly form?: string | undefined;
|
|
58
|
+
readonly readonly?: boolean | undefined;
|
|
59
|
+
readonly clearable?: boolean | undefined;
|
|
60
|
+
readonly clearIcon?: import('element-plus/es/utils/index.mjs').IconPropType | undefined;
|
|
61
|
+
readonly showPassword?: boolean | undefined;
|
|
62
|
+
readonly showWordLimit?: boolean | undefined;
|
|
63
|
+
readonly wordLimitPosition?: "inside" | "outside" | undefined;
|
|
64
|
+
readonly suffixIcon?: import('element-plus/es/utils/index.mjs').IconPropType | undefined;
|
|
65
|
+
readonly prefixIcon?: import('element-plus/es/utils/index.mjs').IconPropType | undefined;
|
|
66
|
+
readonly containerRole?: string | undefined;
|
|
67
|
+
readonly tabindex?: string | number | undefined;
|
|
68
|
+
readonly validateEvent?: boolean | undefined;
|
|
69
|
+
readonly inputStyle?: import('vue').StyleValue;
|
|
70
|
+
readonly autofocus?: boolean | undefined;
|
|
71
|
+
readonly rows?: number | undefined;
|
|
72
|
+
readonly ariaLabel?: string | undefined;
|
|
73
|
+
readonly inputmode?: "search" | "none" | "url" | "text" | "tel" | "email" | "numeric" | "decimal" | undefined;
|
|
74
|
+
readonly name?: string | undefined;
|
|
75
|
+
readonly countGraphemes?: ((value: string) => number) | undefined;
|
|
76
|
+
readonly onBlur?: ((evt: FocusEvent) => any) | undefined | undefined;
|
|
77
|
+
readonly onChange?: ((value: string, evt?: Event | undefined) => any) | undefined | undefined;
|
|
78
|
+
readonly onCompositionend?: ((evt: CompositionEvent) => any) | undefined | undefined;
|
|
79
|
+
readonly onCompositionstart?: ((evt: CompositionEvent) => any) | undefined | undefined;
|
|
80
|
+
readonly onCompositionupdate?: ((evt: CompositionEvent) => any) | undefined | undefined;
|
|
81
|
+
readonly onFocus?: ((evt: FocusEvent) => any) | undefined | undefined;
|
|
82
|
+
readonly onInput?: ((value: string) => any) | undefined | undefined;
|
|
83
|
+
readonly onKeydown?: ((evt: Event | KeyboardEvent) => any) | undefined | undefined;
|
|
84
|
+
readonly onMouseenter?: ((evt: MouseEvent) => any) | undefined | undefined;
|
|
85
|
+
readonly onMouseleave?: ((evt: MouseEvent) => any) | undefined | undefined;
|
|
86
|
+
readonly "onUpdate:modelValue"?: ((value: string) => any) | undefined | undefined;
|
|
87
|
+
readonly onClear?: ((evt: MouseEvent | undefined) => any) | undefined | undefined;
|
|
88
|
+
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps;
|
|
89
|
+
$attrs: {
|
|
90
|
+
[x: string]: unknown;
|
|
91
|
+
};
|
|
92
|
+
$refs: {
|
|
93
|
+
[x: string]: unknown;
|
|
94
|
+
};
|
|
95
|
+
$slots: Readonly<{
|
|
96
|
+
[name: string]: import('vue').Slot<any> | undefined;
|
|
97
|
+
}>;
|
|
98
|
+
$root: import('vue').ComponentPublicInstance | null;
|
|
99
|
+
$parent: import('vue').ComponentPublicInstance | null;
|
|
100
|
+
$host: Element | null;
|
|
101
|
+
$emit: ((event: "input", value: string) => void) & ((event: "blur", evt: FocusEvent) => void) & ((event: "change", value: string, evt?: Event | undefined) => void) & ((event: "compositionend", evt: CompositionEvent) => void) & ((event: "compositionstart", evt: CompositionEvent) => void) & ((event: "compositionupdate", evt: CompositionEvent) => void) & ((event: "focus", evt: FocusEvent) => void) & ((event: "keydown", evt: Event | KeyboardEvent) => void) & ((event: "mouseenter", evt: MouseEvent) => void) & ((event: "mouseleave", evt: MouseEvent) => void) & ((event: "clear", evt: MouseEvent | undefined) => void) & ((event: "update:modelValue", value: string) => void);
|
|
102
|
+
$el: any;
|
|
103
|
+
$options: import('vue').ComponentOptionsBase<Readonly<import('element-plus').InputProps> & Readonly<{
|
|
104
|
+
onBlur?: ((evt: FocusEvent) => any) | undefined;
|
|
105
|
+
onChange?: ((value: string, evt?: Event | undefined) => any) | undefined;
|
|
106
|
+
onCompositionend?: ((evt: CompositionEvent) => any) | undefined;
|
|
107
|
+
onCompositionstart?: ((evt: CompositionEvent) => any) | undefined;
|
|
108
|
+
onCompositionupdate?: ((evt: CompositionEvent) => any) | undefined;
|
|
109
|
+
onFocus?: ((evt: FocusEvent) => any) | undefined;
|
|
110
|
+
onInput?: ((value: string) => any) | undefined;
|
|
111
|
+
onKeydown?: ((evt: Event | KeyboardEvent) => any) | undefined;
|
|
112
|
+
onMouseenter?: ((evt: MouseEvent) => any) | undefined;
|
|
113
|
+
onMouseleave?: ((evt: MouseEvent) => any) | undefined;
|
|
114
|
+
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
115
|
+
onClear?: ((evt: MouseEvent | undefined) => any) | undefined;
|
|
116
|
+
}>, {
|
|
117
|
+
input: import('vue').ShallowRef<HTMLInputElement | undefined, HTMLInputElement | undefined>;
|
|
118
|
+
textarea: import('vue').ShallowRef<HTMLTextAreaElement | undefined, HTMLTextAreaElement | undefined>;
|
|
119
|
+
ref: import('vue').ComputedRef<HTMLInputElement | HTMLTextAreaElement | undefined>;
|
|
120
|
+
textareaStyle: import('vue').ComputedRef<import('vue').StyleValue>;
|
|
121
|
+
autosize: import('vue').Ref<import('element-plus').InputAutoSize | undefined, import('element-plus').InputAutoSize | undefined>;
|
|
122
|
+
isComposing: import('vue').Ref<boolean, boolean>;
|
|
123
|
+
passwordVisible: import('vue').Ref<boolean, boolean>;
|
|
124
|
+
focus: () => void | undefined;
|
|
125
|
+
blur: () => void | undefined;
|
|
126
|
+
select: () => void;
|
|
127
|
+
clear: (evt?: MouseEvent) => void;
|
|
128
|
+
resizeTextarea: () => void;
|
|
129
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
130
|
+
blur: (evt: FocusEvent) => void;
|
|
131
|
+
change: (value: string, evt?: Event | undefined) => void;
|
|
132
|
+
compositionend: (evt: CompositionEvent) => void;
|
|
133
|
+
compositionstart: (evt: CompositionEvent) => void;
|
|
134
|
+
compositionupdate: (evt: CompositionEvent) => void;
|
|
135
|
+
focus: (evt: FocusEvent) => void;
|
|
136
|
+
input: (value: string) => void;
|
|
137
|
+
keydown: (evt: Event | KeyboardEvent) => void;
|
|
138
|
+
mouseenter: (evt: MouseEvent) => void;
|
|
139
|
+
mouseleave: (evt: MouseEvent) => void;
|
|
140
|
+
"update:modelValue": (value: string) => void;
|
|
141
|
+
clear: (evt: MouseEvent | undefined) => void;
|
|
142
|
+
}, string, {
|
|
143
|
+
type: import('element-plus').InputType;
|
|
144
|
+
disabled: boolean;
|
|
145
|
+
modelValue: string | number | null;
|
|
146
|
+
modelModifiers: import('element-plus').InputModelModifiers;
|
|
147
|
+
autocomplete: string;
|
|
148
|
+
clearIcon: import('element-plus/es/utils/index.mjs').IconPropType;
|
|
149
|
+
wordLimitPosition: "inside" | "outside";
|
|
150
|
+
tabindex: string | number;
|
|
151
|
+
validateEvent: boolean;
|
|
152
|
+
inputStyle: string | false | import('vue').CSSProperties | import('vue').StyleValue[] | null;
|
|
153
|
+
rows: number;
|
|
154
|
+
}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & {
|
|
155
|
+
beforeCreate?: (() => void) | (() => void)[];
|
|
156
|
+
created?: (() => void) | (() => void)[];
|
|
157
|
+
beforeMount?: (() => void) | (() => void)[];
|
|
158
|
+
mounted?: (() => void) | (() => void)[];
|
|
159
|
+
beforeUpdate?: (() => void) | (() => void)[];
|
|
160
|
+
updated?: (() => void) | (() => void)[];
|
|
161
|
+
activated?: (() => void) | (() => void)[];
|
|
162
|
+
deactivated?: (() => void) | (() => void)[];
|
|
163
|
+
beforeDestroy?: (() => void) | (() => void)[];
|
|
164
|
+
beforeUnmount?: (() => void) | (() => void)[];
|
|
165
|
+
destroyed?: (() => void) | (() => void)[];
|
|
166
|
+
unmounted?: (() => void) | (() => void)[];
|
|
167
|
+
renderTracked?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
|
|
168
|
+
renderTriggered?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
|
|
169
|
+
errorCaptured?: ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void)[];
|
|
170
|
+
};
|
|
171
|
+
$forceUpdate: () => void;
|
|
172
|
+
$nextTick: typeof nextTick;
|
|
173
|
+
$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;
|
|
174
|
+
} & Readonly<{
|
|
175
|
+
type: import('element-plus').InputType;
|
|
176
|
+
disabled: boolean;
|
|
177
|
+
modelValue: string | number | null;
|
|
178
|
+
modelModifiers: import('element-plus').InputModelModifiers;
|
|
179
|
+
autocomplete: string;
|
|
180
|
+
clearIcon: import('element-plus/es/utils/index.mjs').IconPropType;
|
|
181
|
+
wordLimitPosition: "inside" | "outside";
|
|
182
|
+
tabindex: string | number;
|
|
183
|
+
validateEvent: boolean;
|
|
184
|
+
inputStyle: string | false | import('vue').CSSProperties | import('vue').StyleValue[] | null;
|
|
185
|
+
rows: number;
|
|
186
|
+
}> & Omit<Readonly<import('element-plus').InputProps> & Readonly<{
|
|
187
|
+
onBlur?: ((evt: FocusEvent) => any) | undefined;
|
|
188
|
+
onChange?: ((value: string, evt?: Event | undefined) => any) | undefined;
|
|
189
|
+
onCompositionend?: ((evt: CompositionEvent) => any) | undefined;
|
|
190
|
+
onCompositionstart?: ((evt: CompositionEvent) => any) | undefined;
|
|
191
|
+
onCompositionupdate?: ((evt: CompositionEvent) => any) | undefined;
|
|
192
|
+
onFocus?: ((evt: FocusEvent) => any) | undefined;
|
|
193
|
+
onInput?: ((value: string) => any) | undefined;
|
|
194
|
+
onKeydown?: ((evt: Event | KeyboardEvent) => any) | undefined;
|
|
195
|
+
onMouseenter?: ((evt: MouseEvent) => any) | undefined;
|
|
196
|
+
onMouseleave?: ((evt: MouseEvent) => any) | undefined;
|
|
197
|
+
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
198
|
+
onClear?: ((evt: MouseEvent | undefined) => any) | undefined;
|
|
199
|
+
}>, "type" | "input" | "select" | "textarea" | "blur" | "focus" | "disabled" | "clear" | "ref" | "tabindex" | "modelValue" | "validateEvent" | "autocomplete" | "clearIcon" | "inputStyle" | "modelModifiers" | "autosize" | "wordLimitPosition" | "rows" | "textareaStyle" | "isComposing" | "passwordVisible" | "resizeTextarea"> & import('vue').ShallowUnwrapRef<{
|
|
200
|
+
input: import('vue').ShallowRef<HTMLInputElement | undefined, HTMLInputElement | undefined>;
|
|
201
|
+
textarea: import('vue').ShallowRef<HTMLTextAreaElement | undefined, HTMLTextAreaElement | undefined>;
|
|
202
|
+
ref: import('vue').ComputedRef<HTMLInputElement | HTMLTextAreaElement | undefined>;
|
|
203
|
+
textareaStyle: import('vue').ComputedRef<import('vue').StyleValue>;
|
|
204
|
+
autosize: import('vue').Ref<import('element-plus').InputAutoSize | undefined, import('element-plus').InputAutoSize | undefined>;
|
|
205
|
+
isComposing: import('vue').Ref<boolean, boolean>;
|
|
206
|
+
passwordVisible: import('vue').Ref<boolean, boolean>;
|
|
207
|
+
focus: () => void | undefined;
|
|
208
|
+
blur: () => void | undefined;
|
|
209
|
+
select: () => void;
|
|
210
|
+
clear: (evt?: MouseEvent) => void;
|
|
211
|
+
resizeTextarea: () => void;
|
|
212
|
+
}> & {} & import('vue').ComponentCustomProperties & {} & {
|
|
213
|
+
$slots: {
|
|
214
|
+
prepend?: (props: {}) => any;
|
|
215
|
+
} & {
|
|
216
|
+
prefix?: (props: {}) => any;
|
|
217
|
+
} & {
|
|
218
|
+
suffix?: (props: {}) => any;
|
|
219
|
+
} & {
|
|
220
|
+
'password-icon'?: (props: {
|
|
221
|
+
visible: boolean;
|
|
222
|
+
}) => any;
|
|
223
|
+
} & {
|
|
224
|
+
append?: (props: {}) => any;
|
|
225
|
+
};
|
|
226
|
+
}) | null;
|
|
32
227
|
scrollbarRef: ({
|
|
33
228
|
$: import('vue').ComponentInternalInstance;
|
|
34
229
|
$data: {};
|
|
@@ -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;
|
|
@@ -1,19 +1,29 @@
|
|
|
1
1
|
import { PanelContainerProps, PanelSelectOption, PanelSelectValue } from '../props';
|
|
2
|
+
/**
|
|
3
|
+
* 面板内部统一使用的树节点结构。
|
|
4
|
+
*/
|
|
2
5
|
export type PanelTreeNode = PanelSelectOption & {
|
|
3
6
|
label: string;
|
|
4
7
|
value: PanelSelectValue;
|
|
5
8
|
disabled?: boolean;
|
|
6
9
|
children?: PanelTreeNode[];
|
|
7
|
-
|
|
10
|
+
pid?: PanelSelectValue | null;
|
|
8
11
|
level: number;
|
|
9
12
|
path: PanelTreeNode[];
|
|
10
13
|
raw: PanelSelectOption;
|
|
11
14
|
};
|
|
15
|
+
/**
|
|
16
|
+
* 中间列表按组展示时的分组结构。
|
|
17
|
+
*/
|
|
12
18
|
export type OptionGroup = {
|
|
13
19
|
value: PanelSelectValue;
|
|
14
20
|
label: string;
|
|
15
21
|
options: PanelTreeNode[];
|
|
16
22
|
};
|
|
23
|
+
/**
|
|
24
|
+
* 面板数据层:负责拉取数据、树结构归一化、扁平化与分组。
|
|
25
|
+
* @param props 组件 props
|
|
26
|
+
*/
|
|
17
27
|
export declare function usePanelSelectData(props: PanelContainerProps): {
|
|
18
28
|
loading: import('vue').Ref<boolean, boolean>;
|
|
19
29
|
fetchApi: () => Promise<void>;
|
|
@@ -7,6 +7,10 @@ type UsePanelSelectSelectionParams = {
|
|
|
7
7
|
selectedValues: WritableComputedRef<PanelSelectValue[]>;
|
|
8
8
|
leafNodes: Readonly<Ref<PanelTreeNode[]>>;
|
|
9
9
|
};
|
|
10
|
+
/**
|
|
11
|
+
* 管理面板选中状态与右侧已选列表。
|
|
12
|
+
* @param params 选择逻辑所需的响应式参数
|
|
13
|
+
*/
|
|
10
14
|
export declare function usePanelSelectSelection(params: UsePanelSelectSelectionParams): {
|
|
11
15
|
selectedOptions: import('vue').ComputedRef<PanelTreeNode[]>;
|
|
12
16
|
isAllChecked: import('vue').ComputedRef<boolean>;
|
|
@@ -15,6 +19,7 @@ export declare function usePanelSelectSelection(params: UsePanelSelectSelectionP
|
|
|
15
19
|
isGroupIndeterminate: (group: OptionGroup) => boolean;
|
|
16
20
|
handleGroupCheck: (group: OptionGroup, checked: boolean) => void;
|
|
17
21
|
handleOptionCheck: (value: PanelSelectValue, checked: boolean) => void;
|
|
22
|
+
handleOptionsCheck: (values: PanelSelectValue[], checked: boolean) => void;
|
|
18
23
|
handleCheckAll: (checked: boolean) => void;
|
|
19
24
|
removeSelected: (value: PanelSelectValue) => void;
|
|
20
25
|
};
|
|
@@ -7,35 +7,45 @@ export interface PanelSelectOption extends Recordable {
|
|
|
7
7
|
disabled?: boolean;
|
|
8
8
|
children?: PanelSelectOption[];
|
|
9
9
|
}
|
|
10
|
+
export interface PanelSelectTreeConfig {
|
|
11
|
+
/** 是否将平铺数据自动转换为树结构 */
|
|
12
|
+
transform?: boolean;
|
|
13
|
+
/** 显示字段名 */
|
|
14
|
+
labelField?: string;
|
|
15
|
+
/** 值字段名 */
|
|
16
|
+
valueField?: string;
|
|
17
|
+
/** 禁用字段名 */
|
|
18
|
+
disabledField?: string;
|
|
19
|
+
/** 子节点字段名 */
|
|
20
|
+
childrenField?: string;
|
|
21
|
+
/** 父节点字段名(平铺结构使用) */
|
|
22
|
+
parentField?: string;
|
|
23
|
+
/** 根节点父值(平铺结构使用) */
|
|
24
|
+
rootParentValue?: PanelSelectValue | null;
|
|
25
|
+
}
|
|
10
26
|
export interface PanelContainerProps {
|
|
11
|
-
/**
|
|
27
|
+
/** 是否显示左侧导航树 */
|
|
12
28
|
showNav?: boolean;
|
|
13
29
|
/** 是否多选 */
|
|
14
30
|
multiple?: boolean;
|
|
15
|
-
/**
|
|
16
|
-
api?: (arg?: any) => Promise<
|
|
17
|
-
/**
|
|
31
|
+
/** 远程加载函数 */
|
|
32
|
+
api?: (arg?: any) => Promise<any[] | any>;
|
|
33
|
+
/** 传给 api 的参数 */
|
|
18
34
|
params?: Recordable;
|
|
19
|
-
/**
|
|
35
|
+
/** 当 api 返回对象时,用于提取列表的字段路径 */
|
|
20
36
|
resultField?: string;
|
|
21
|
-
/**
|
|
37
|
+
/** 本地数据源,支持树形或平铺结构 */
|
|
22
38
|
options?: PanelSelectOption[];
|
|
23
|
-
/**
|
|
24
|
-
|
|
25
|
-
/**
|
|
26
|
-
valueField?: string;
|
|
27
|
-
/** disabled 字段名 */
|
|
28
|
-
disabledField?: string;
|
|
29
|
-
/** children 字段名,传树结构时使用 */
|
|
30
|
-
childrenField?: string;
|
|
31
|
-
/** parent 字段名,传平铺结构时用于转树 */
|
|
32
|
-
parentField?: string;
|
|
33
|
-
/** 根节点 parent 值 */
|
|
34
|
-
rootParentValue?: PanelSelectValue | null;
|
|
35
|
-
/** 是否立即请求远程数据 */
|
|
39
|
+
/** 树转换与字段映射配置 */
|
|
40
|
+
treeConfig?: PanelSelectTreeConfig;
|
|
41
|
+
/** 是否在组件初始化时立即请求 */
|
|
36
42
|
immediate?: boolean;
|
|
37
|
-
/**
|
|
43
|
+
/** 请求前钩子 */
|
|
38
44
|
beforeFetch?: AnyPromiseFunction<any, any>;
|
|
39
|
-
/**
|
|
45
|
+
/** 请求后钩子 */
|
|
40
46
|
afterFetch?: AnyPromiseFunction<any, any>;
|
|
47
|
+
/** 粘贴拆分分隔符 */
|
|
48
|
+
separator?: string;
|
|
49
|
+
/** 粘贴后是否触发搜索 */
|
|
50
|
+
pasteSearch?: boolean;
|
|
41
51
|
}
|
|
@@ -3,9 +3,9 @@ type __VLS_Props = {
|
|
|
3
3
|
modelValue?: string;
|
|
4
4
|
/** 是否开启toolTip */
|
|
5
5
|
toolTip?: boolean;
|
|
6
|
-
/** 几行省略 */
|
|
7
|
-
placement?: string;
|
|
8
6
|
/** toolTip 的位置 */
|
|
7
|
+
placement?: string;
|
|
8
|
+
/** 几行省略 */
|
|
9
9
|
toolTipLine?: number;
|
|
10
10
|
/** toolTip 的最大宽度 */
|
|
11
11
|
toolTipMaxWidth?: 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800;
|