@opentiny/tiny-robot 0.2.9 → 0.2.11
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/action-group/index.js +38 -35
- package/dist/base-popper/index.js +107 -0
- package/dist/dropdown-menu/index.js +71 -65
- package/dist/flow-layout-buttons/index.js +24 -21
- package/dist/index.d.ts +273 -23
- package/dist/index2.js +386 -319
- package/dist/sender/index.js +386 -380
- package/dist/style.css +1 -1
- package/dist/suggestion-pills/index.js +181 -131
- package/dist/suggestion-popover/index.js +117 -112
- package/package.json +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -10,6 +10,7 @@ import { ComponentOptionsBase } from 'vue';
|
|
|
10
10
|
import { ComponentOptionsMixin } from 'vue';
|
|
11
11
|
import { ComponentProvideOptions } from 'vue';
|
|
12
12
|
import { ComponentPublicInstance } from 'vue';
|
|
13
|
+
import { ComputedRef } from 'vue';
|
|
13
14
|
import { CreateComponentPublicInstanceWithMixins } from 'vue';
|
|
14
15
|
import { CSSProperties } from 'vue';
|
|
15
16
|
import { DebuggerEvent } from 'vue';
|
|
@@ -18,6 +19,7 @@ import { ExtractPropTypes } from 'vue';
|
|
|
18
19
|
import { GlobalComponents } from 'vue';
|
|
19
20
|
import { GlobalDirectives } from 'vue';
|
|
20
21
|
import { InputMode as InputMode_2 } from './index.type';
|
|
22
|
+
import { MaybeElement } from '@vueuse/core';
|
|
21
23
|
import { nextTick } from 'vue';
|
|
22
24
|
import { OnCleanup } from '@vue/reactivity';
|
|
23
25
|
import { Options } from 'markdown-it';
|
|
@@ -33,6 +35,7 @@ import { SubmitTrigger as SubmitTrigger_2 } from './index.type';
|
|
|
33
35
|
import { TemplateEditorProps as TemplateEditorProps_2 } from './index.type';
|
|
34
36
|
import { ThemeType as ThemeType_2 } from './index.type';
|
|
35
37
|
import { TooltipContentProps } from './components/Tooltip.vue';
|
|
38
|
+
import { TransitionProps } from 'vue';
|
|
36
39
|
import { VNode } from 'vue';
|
|
37
40
|
import { VNodeProps } from 'vue';
|
|
38
41
|
import { WatchOptions } from 'vue';
|
|
@@ -85,10 +88,10 @@ onOpen?: (() => any) | undefined;
|
|
|
85
88
|
}>, {
|
|
86
89
|
title: string;
|
|
87
90
|
trigger: "click" | "manual";
|
|
88
|
-
topOffset: string | number;
|
|
89
91
|
groupShowMoreTrigger: "click" | "hover";
|
|
90
92
|
popoverWidth: string | number;
|
|
91
93
|
popoverHeight: string | number;
|
|
94
|
+
topOffset: string | number;
|
|
92
95
|
}, {}, {}, {}, string, ComponentProvideOptions, false, {
|
|
93
96
|
popoverTriggerRef: HTMLDivElement;
|
|
94
97
|
popoverRef: HTMLDivElement;
|
|
@@ -128,12 +131,102 @@ declare const __VLS_component_3: DefineComponent<DropdownMenuProps, {}, {}, {},
|
|
|
128
131
|
"onItem-click"?: ((item: DropdownMenuItem) => any) | undefined;
|
|
129
132
|
"onClick-outside"?: ((event: MouseEvent) => any) | undefined;
|
|
130
133
|
}>, {
|
|
131
|
-
trigger: "click" | "manual";
|
|
132
|
-
minWidth: string | number;
|
|
133
|
-
topOffset: string | number;
|
|
134
|
+
trigger: "click" | "hover" | "manual";
|
|
134
135
|
}, {}, {}, {}, string, ComponentProvideOptions, false, {
|
|
135
|
-
|
|
136
|
-
|
|
136
|
+
basePopperRef: ({
|
|
137
|
+
$: ComponentInternalInstance;
|
|
138
|
+
$data: {};
|
|
139
|
+
$props: {
|
|
140
|
+
readonly offset?: number | {
|
|
141
|
+
mainAxis?: number;
|
|
142
|
+
crossAxis?: number;
|
|
143
|
+
} | undefined;
|
|
144
|
+
readonly placement?: "top-center" | "bottom-center" | "top-left" | "top-right" | "bottom-left" | "bottom-right" | undefined;
|
|
145
|
+
readonly preventOverflow?: boolean | undefined;
|
|
146
|
+
readonly renderAllTriggers?: boolean | undefined;
|
|
147
|
+
readonly show?: boolean | undefined;
|
|
148
|
+
readonly transitionProps?: TransitionProps | undefined;
|
|
149
|
+
readonly triggerEvents?: Partial<Record<`on${Capitalize<string>}`, (...args: any[]) => void>> | undefined;
|
|
150
|
+
} & VNodeProps & AllowedComponentProps & ComponentCustomProps;
|
|
151
|
+
$attrs: {
|
|
152
|
+
[x: string]: unknown;
|
|
153
|
+
};
|
|
154
|
+
$refs: {
|
|
155
|
+
[x: string]: unknown;
|
|
156
|
+
} & {
|
|
157
|
+
popperRef: HTMLDivElement;
|
|
158
|
+
};
|
|
159
|
+
$slots: Readonly<{
|
|
160
|
+
[name: string]: Slot<any> | undefined;
|
|
161
|
+
}>;
|
|
162
|
+
$root: ComponentPublicInstance | null;
|
|
163
|
+
$parent: ComponentPublicInstance | null;
|
|
164
|
+
$host: Element | null;
|
|
165
|
+
$emit: (event: string, ...args: any[]) => void;
|
|
166
|
+
$el: any;
|
|
167
|
+
$options: ComponentOptionsBase<Readonly<{
|
|
168
|
+
offset?: number | {
|
|
169
|
+
mainAxis?: number;
|
|
170
|
+
crossAxis?: number;
|
|
171
|
+
};
|
|
172
|
+
placement?: "top-center" | "bottom-center" | "top-left" | "top-right" | "bottom-left" | "bottom-right";
|
|
173
|
+
preventOverflow?: boolean;
|
|
174
|
+
renderAllTriggers?: boolean;
|
|
175
|
+
show?: boolean;
|
|
176
|
+
transitionProps?: TransitionProps;
|
|
177
|
+
triggerEvents?: Partial<Record<`on${Capitalize<string>}`, (...args: any[]) => void>>;
|
|
178
|
+
}> & Readonly<{}>, {
|
|
179
|
+
triggerRef: ComputedRef<MaybeElement>;
|
|
180
|
+
triggerRefs: Ref<MaybeElement[], MaybeElement[]>;
|
|
181
|
+
popperRef: Ref<HTMLDivElement | null, HTMLDivElement | null>;
|
|
182
|
+
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, {
|
|
183
|
+
placement: "top-center" | "bottom-center" | "top-left" | "top-right" | "bottom-left" | "bottom-right";
|
|
184
|
+
}, {}, string, {}, GlobalComponents, GlobalDirectives, string, ComponentProvideOptions> & {
|
|
185
|
+
beforeCreate?: (() => void) | (() => void)[];
|
|
186
|
+
created?: (() => void) | (() => void)[];
|
|
187
|
+
beforeMount?: (() => void) | (() => void)[];
|
|
188
|
+
mounted?: (() => void) | (() => void)[];
|
|
189
|
+
beforeUpdate?: (() => void) | (() => void)[];
|
|
190
|
+
updated?: (() => void) | (() => void)[];
|
|
191
|
+
activated?: (() => void) | (() => void)[];
|
|
192
|
+
deactivated?: (() => void) | (() => void)[];
|
|
193
|
+
beforeDestroy?: (() => void) | (() => void)[];
|
|
194
|
+
beforeUnmount?: (() => void) | (() => void)[];
|
|
195
|
+
destroyed?: (() => void) | (() => void)[];
|
|
196
|
+
unmounted?: (() => void) | (() => void)[];
|
|
197
|
+
renderTracked?: ((e: DebuggerEvent) => void) | ((e: DebuggerEvent) => void)[];
|
|
198
|
+
renderTriggered?: ((e: DebuggerEvent) => void) | ((e: DebuggerEvent) => void)[];
|
|
199
|
+
errorCaptured?: ((err: unknown, instance: ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: ComponentPublicInstance | null, info: string) => boolean | void)[];
|
|
200
|
+
};
|
|
201
|
+
$forceUpdate: () => void;
|
|
202
|
+
$nextTick: nextTick;
|
|
203
|
+
$watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, OnCleanup]) => any : (...args: [any, any, OnCleanup]) => any, options?: WatchOptions): WatchStopHandle;
|
|
204
|
+
} & Readonly<{
|
|
205
|
+
placement: "top-center" | "bottom-center" | "top-left" | "top-right" | "bottom-left" | "bottom-right";
|
|
206
|
+
}> & Omit<Readonly<{
|
|
207
|
+
offset?: number | {
|
|
208
|
+
mainAxis?: number;
|
|
209
|
+
crossAxis?: number;
|
|
210
|
+
};
|
|
211
|
+
placement?: "top-center" | "bottom-center" | "top-left" | "top-right" | "bottom-left" | "bottom-right";
|
|
212
|
+
preventOverflow?: boolean;
|
|
213
|
+
renderAllTriggers?: boolean;
|
|
214
|
+
show?: boolean;
|
|
215
|
+
transitionProps?: TransitionProps;
|
|
216
|
+
triggerEvents?: Partial<Record<`on${Capitalize<string>}`, (...args: any[]) => void>>;
|
|
217
|
+
}> & Readonly<{}>, "placement" | "triggerRef" | "triggerRefs" | "popperRef"> & ShallowUnwrapRef< {
|
|
218
|
+
triggerRef: ComputedRef<MaybeElement>;
|
|
219
|
+
triggerRefs: Ref<MaybeElement[], MaybeElement[]>;
|
|
220
|
+
popperRef: Ref<HTMLDivElement | null, HTMLDivElement | null>;
|
|
221
|
+
}> & {} & ComponentCustomProperties & {} & {
|
|
222
|
+
$slots: Readonly<{
|
|
223
|
+
trigger?: () => VNode | VNode[];
|
|
224
|
+
content?: () => VNode | VNode[];
|
|
225
|
+
}> & {
|
|
226
|
+
trigger?: () => VNode | VNode[];
|
|
227
|
+
content?: () => VNode | VNode[];
|
|
228
|
+
};
|
|
229
|
+
}) | null;
|
|
137
230
|
}, any>;
|
|
138
231
|
|
|
139
232
|
declare const __VLS_component_4: DefineComponent<PromptsProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
|
|
@@ -172,6 +265,7 @@ hasContent: boolean;
|
|
|
172
265
|
allowSpeech: boolean;
|
|
173
266
|
allowFiles: boolean;
|
|
174
267
|
submitType: SubmitTrigger_2;
|
|
268
|
+
stopText: string;
|
|
175
269
|
autoSize: AutoSize_2;
|
|
176
270
|
maxLength: number;
|
|
177
271
|
suggestions: string[];
|
|
@@ -873,9 +967,11 @@ declare const __VLS_component_8: DefineComponent<__VLS_PublicProps_2, {}, {}, {}
|
|
|
873
967
|
"onUpdate:showAll"?: ((value: boolean | undefined) => any) | undefined;
|
|
874
968
|
}>, {
|
|
875
969
|
showAllButtonOn: "hover" | "always";
|
|
970
|
+
overflowMode: "expand" | "scroll";
|
|
876
971
|
}, {}, {}, {}, string, ComponentProvideOptions, false, {
|
|
877
972
|
containerWrapperRef: HTMLDivElement;
|
|
878
973
|
containerRef: HTMLDivElement;
|
|
974
|
+
floatingItemsRef: HTMLDivElement;
|
|
879
975
|
}, HTMLDivElement>;
|
|
880
976
|
|
|
881
977
|
declare const __VLS_component_9: DefineComponent<SuggestionPillButtonProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<SuggestionPillButtonProps> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLButtonElement>;
|
|
@@ -959,10 +1055,104 @@ declare function __VLS_template_2(): {
|
|
|
959
1055
|
|
|
960
1056
|
declare function __VLS_template_3(): {
|
|
961
1057
|
attrs: Partial<{}>;
|
|
962
|
-
slots:
|
|
1058
|
+
slots: {
|
|
1059
|
+
trigger?(_: {}): any;
|
|
1060
|
+
};
|
|
963
1061
|
refs: {
|
|
964
|
-
|
|
965
|
-
|
|
1062
|
+
basePopperRef: ({
|
|
1063
|
+
$: ComponentInternalInstance;
|
|
1064
|
+
$data: {};
|
|
1065
|
+
$props: {
|
|
1066
|
+
readonly offset?: number | {
|
|
1067
|
+
mainAxis?: number;
|
|
1068
|
+
crossAxis?: number;
|
|
1069
|
+
} | undefined;
|
|
1070
|
+
readonly placement?: "top-center" | "bottom-center" | "top-left" | "top-right" | "bottom-left" | "bottom-right" | undefined;
|
|
1071
|
+
readonly preventOverflow?: boolean | undefined;
|
|
1072
|
+
readonly renderAllTriggers?: boolean | undefined;
|
|
1073
|
+
readonly show?: boolean | undefined;
|
|
1074
|
+
readonly transitionProps?: TransitionProps | undefined;
|
|
1075
|
+
readonly triggerEvents?: Partial<Record<`on${Capitalize<string>}`, (...args: any[]) => void>> | undefined;
|
|
1076
|
+
} & VNodeProps & AllowedComponentProps & ComponentCustomProps;
|
|
1077
|
+
$attrs: {
|
|
1078
|
+
[x: string]: unknown;
|
|
1079
|
+
};
|
|
1080
|
+
$refs: {
|
|
1081
|
+
[x: string]: unknown;
|
|
1082
|
+
} & {
|
|
1083
|
+
popperRef: HTMLDivElement;
|
|
1084
|
+
};
|
|
1085
|
+
$slots: Readonly<{
|
|
1086
|
+
[name: string]: Slot<any> | undefined;
|
|
1087
|
+
}>;
|
|
1088
|
+
$root: ComponentPublicInstance | null;
|
|
1089
|
+
$parent: ComponentPublicInstance | null;
|
|
1090
|
+
$host: Element | null;
|
|
1091
|
+
$emit: (event: string, ...args: any[]) => void;
|
|
1092
|
+
$el: any;
|
|
1093
|
+
$options: ComponentOptionsBase<Readonly<{
|
|
1094
|
+
offset?: number | {
|
|
1095
|
+
mainAxis?: number;
|
|
1096
|
+
crossAxis?: number;
|
|
1097
|
+
};
|
|
1098
|
+
placement?: "top-center" | "bottom-center" | "top-left" | "top-right" | "bottom-left" | "bottom-right";
|
|
1099
|
+
preventOverflow?: boolean;
|
|
1100
|
+
renderAllTriggers?: boolean;
|
|
1101
|
+
show?: boolean;
|
|
1102
|
+
transitionProps?: TransitionProps;
|
|
1103
|
+
triggerEvents?: Partial<Record<`on${Capitalize<string>}`, (...args: any[]) => void>>;
|
|
1104
|
+
}> & Readonly<{}>, {
|
|
1105
|
+
triggerRef: ComputedRef<MaybeElement>;
|
|
1106
|
+
triggerRefs: Ref<MaybeElement[], MaybeElement[]>;
|
|
1107
|
+
popperRef: Ref<HTMLDivElement | null, HTMLDivElement | null>;
|
|
1108
|
+
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, {
|
|
1109
|
+
placement: "top-center" | "bottom-center" | "top-left" | "top-right" | "bottom-left" | "bottom-right";
|
|
1110
|
+
}, {}, string, {}, GlobalComponents, GlobalDirectives, string, ComponentProvideOptions> & {
|
|
1111
|
+
beforeCreate?: (() => void) | (() => void)[];
|
|
1112
|
+
created?: (() => void) | (() => void)[];
|
|
1113
|
+
beforeMount?: (() => void) | (() => void)[];
|
|
1114
|
+
mounted?: (() => void) | (() => void)[];
|
|
1115
|
+
beforeUpdate?: (() => void) | (() => void)[];
|
|
1116
|
+
updated?: (() => void) | (() => void)[];
|
|
1117
|
+
activated?: (() => void) | (() => void)[];
|
|
1118
|
+
deactivated?: (() => void) | (() => void)[];
|
|
1119
|
+
beforeDestroy?: (() => void) | (() => void)[];
|
|
1120
|
+
beforeUnmount?: (() => void) | (() => void)[];
|
|
1121
|
+
destroyed?: (() => void) | (() => void)[];
|
|
1122
|
+
unmounted?: (() => void) | (() => void)[];
|
|
1123
|
+
renderTracked?: ((e: DebuggerEvent) => void) | ((e: DebuggerEvent) => void)[];
|
|
1124
|
+
renderTriggered?: ((e: DebuggerEvent) => void) | ((e: DebuggerEvent) => void)[];
|
|
1125
|
+
errorCaptured?: ((err: unknown, instance: ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: ComponentPublicInstance | null, info: string) => boolean | void)[];
|
|
1126
|
+
};
|
|
1127
|
+
$forceUpdate: () => void;
|
|
1128
|
+
$nextTick: nextTick;
|
|
1129
|
+
$watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, OnCleanup]) => any : (...args: [any, any, OnCleanup]) => any, options?: WatchOptions): WatchStopHandle;
|
|
1130
|
+
} & Readonly<{
|
|
1131
|
+
placement: "top-center" | "bottom-center" | "top-left" | "top-right" | "bottom-left" | "bottom-right";
|
|
1132
|
+
}> & Omit<Readonly<{
|
|
1133
|
+
offset?: number | {
|
|
1134
|
+
mainAxis?: number;
|
|
1135
|
+
crossAxis?: number;
|
|
1136
|
+
};
|
|
1137
|
+
placement?: "top-center" | "bottom-center" | "top-left" | "top-right" | "bottom-left" | "bottom-right";
|
|
1138
|
+
preventOverflow?: boolean;
|
|
1139
|
+
renderAllTriggers?: boolean;
|
|
1140
|
+
show?: boolean;
|
|
1141
|
+
transitionProps?: TransitionProps;
|
|
1142
|
+
triggerEvents?: Partial<Record<`on${Capitalize<string>}`, (...args: any[]) => void>>;
|
|
1143
|
+
}> & Readonly<{}>, "placement" | "triggerRef" | "triggerRefs" | "popperRef"> & ShallowUnwrapRef< {
|
|
1144
|
+
triggerRef: ComputedRef<MaybeElement>;
|
|
1145
|
+
triggerRefs: Ref<MaybeElement[], MaybeElement[]>;
|
|
1146
|
+
popperRef: Ref<HTMLDivElement | null, HTMLDivElement | null>;
|
|
1147
|
+
}> & {} & ComponentCustomProperties & {} & {
|
|
1148
|
+
$slots: Readonly<{
|
|
1149
|
+
trigger?: () => VNode | VNode[];
|
|
1150
|
+
content?: () => VNode | VNode[];
|
|
1151
|
+
}> & {
|
|
1152
|
+
trigger?: () => VNode | VNode[];
|
|
1153
|
+
content?: () => VNode | VNode[];
|
|
1154
|
+
};
|
|
1155
|
+
}) | null;
|
|
966
1156
|
};
|
|
967
1157
|
rootEl: any;
|
|
968
1158
|
};
|
|
@@ -1671,6 +1861,7 @@ declare function __VLS_template_8(): {
|
|
|
1671
1861
|
refs: {
|
|
1672
1862
|
containerWrapperRef: HTMLDivElement;
|
|
1673
1863
|
containerRef: HTMLDivElement;
|
|
1864
|
+
floatingItemsRef: HTMLDivElement;
|
|
1674
1865
|
};
|
|
1675
1866
|
rootEl: HTMLDivElement;
|
|
1676
1867
|
};
|
|
@@ -1784,6 +1975,7 @@ export declare interface ActionButtonsProps {
|
|
|
1784
1975
|
submitType?: SubmitTrigger;
|
|
1785
1976
|
showShortcuts?: boolean;
|
|
1786
1977
|
isOverLimit?: boolean;
|
|
1978
|
+
stopText?: string;
|
|
1787
1979
|
}
|
|
1788
1980
|
|
|
1789
1981
|
export declare type AutoSize = boolean | {
|
|
@@ -2036,11 +2228,25 @@ export { _default_9 as Welcome }
|
|
|
2036
2228
|
|
|
2037
2229
|
export declare interface DropdownMenuEmits {
|
|
2038
2230
|
(e: 'item-click', item: DropdownMenuItem): void;
|
|
2231
|
+
/**
|
|
2232
|
+
* 点击外部区域时触发, 仅在 trigger 为 'click' 或 'manual' 时有效
|
|
2233
|
+
*/
|
|
2039
2234
|
(e: 'click-outside', event: MouseEvent): void;
|
|
2040
2235
|
}
|
|
2041
2236
|
|
|
2237
|
+
export declare interface DropdownMenuEventProps {
|
|
2238
|
+
onItemClick?: (item: DropdownMenuItem) => void;
|
|
2239
|
+
onClickOutside?: (event: MouseEvent) => void;
|
|
2240
|
+
}
|
|
2241
|
+
|
|
2042
2242
|
export declare interface DropdownMenuEvents {
|
|
2243
|
+
/**
|
|
2244
|
+
* @deprecated
|
|
2245
|
+
*/
|
|
2043
2246
|
itemClick?: (item: DropdownMenuItem) => void;
|
|
2247
|
+
/**
|
|
2248
|
+
* @deprecated
|
|
2249
|
+
*/
|
|
2044
2250
|
clickOutside?: (event: MouseEvent) => void;
|
|
2045
2251
|
}
|
|
2046
2252
|
|
|
@@ -2058,13 +2264,11 @@ export declare interface DropdownMenuProps {
|
|
|
2058
2264
|
/**
|
|
2059
2265
|
* 触发方式。默认值为 'click'
|
|
2060
2266
|
*/
|
|
2061
|
-
trigger?: 'click' | 'manual';
|
|
2062
|
-
minWidth?: string | number;
|
|
2063
|
-
topOffset?: string | number;
|
|
2267
|
+
trigger?: 'click' | 'hover' | 'manual';
|
|
2064
2268
|
}
|
|
2065
2269
|
|
|
2066
2270
|
export declare interface DropdownMenuSlots {
|
|
2067
|
-
|
|
2271
|
+
trigger?: () => VNode | VNode[];
|
|
2068
2272
|
}
|
|
2069
2273
|
|
|
2070
2274
|
export declare interface FeedbackEvents {
|
|
@@ -2333,6 +2537,7 @@ export declare interface SenderProps {
|
|
|
2333
2537
|
template?: string;
|
|
2334
2538
|
hasContent?: boolean;
|
|
2335
2539
|
templateInitialValues?: Record<string, string>;
|
|
2540
|
+
stopText?: string;
|
|
2336
2541
|
}
|
|
2337
2542
|
|
|
2338
2543
|
/**
|
|
@@ -2437,16 +2642,7 @@ export declare interface SuggestionItem {
|
|
|
2437
2642
|
|
|
2438
2643
|
declare type SuggestionItem_2<T = Record<string, unknown>> = SuggestionBaseItem & T;
|
|
2439
2644
|
|
|
2440
|
-
export declare type SuggestionPillAction =
|
|
2441
|
-
type: 'popover';
|
|
2442
|
-
props: SuggestionPopoverProps;
|
|
2443
|
-
slots?: Omit<SuggestionPopoverSlots, 'default'>;
|
|
2444
|
-
events?: SuggestionPopoverEvents;
|
|
2445
|
-
} | {
|
|
2446
|
-
type: 'menu';
|
|
2447
|
-
props: DropdownMenuProps;
|
|
2448
|
-
events?: DropdownMenuEvents;
|
|
2449
|
-
};
|
|
2645
|
+
export declare type SuggestionPillAction = SuggestionPillPopoverAction | SuggestionPillMenuAction;
|
|
2450
2646
|
|
|
2451
2647
|
export declare type SuggestionPillBaseItem<T> = {
|
|
2452
2648
|
id: string;
|
|
@@ -2476,6 +2672,25 @@ export declare type SuggestionPillItem<T = Record<string, unknown>> = Suggestion
|
|
|
2476
2672
|
icon: VNode | Component;
|
|
2477
2673
|
});
|
|
2478
2674
|
|
|
2675
|
+
export declare type SuggestionPillMenuAction = {
|
|
2676
|
+
type: 'menu';
|
|
2677
|
+
props: DropdownMenuProps & DropdownMenuEventProps;
|
|
2678
|
+
/**
|
|
2679
|
+
* @deprecated use onXXX in props instead
|
|
2680
|
+
*/
|
|
2681
|
+
events?: DropdownMenuEvents;
|
|
2682
|
+
};
|
|
2683
|
+
|
|
2684
|
+
export declare type SuggestionPillPopoverAction = {
|
|
2685
|
+
type: 'popover';
|
|
2686
|
+
props: SuggestionPopoverProps & SuggestionPopoverEventProps;
|
|
2687
|
+
slots?: Omit<SuggestionPopoverSlots, 'default'>;
|
|
2688
|
+
/**
|
|
2689
|
+
* @deprecated use onXXX in props instead
|
|
2690
|
+
*/
|
|
2691
|
+
events?: SuggestionPopoverEvents;
|
|
2692
|
+
};
|
|
2693
|
+
|
|
2479
2694
|
export declare interface SuggestionPillsEmits {
|
|
2480
2695
|
(e: 'item-click', item: SuggestionPillItem): void;
|
|
2481
2696
|
(e: 'click-outside', event: MouseEvent): void;
|
|
@@ -2494,6 +2709,18 @@ export declare interface SuggestionPillsProps {
|
|
|
2494
2709
|
* @default 'hover'
|
|
2495
2710
|
*/
|
|
2496
2711
|
showAllButtonOn?: 'hover' | 'always';
|
|
2712
|
+
/**
|
|
2713
|
+
* 控制多余按钮如何展示
|
|
2714
|
+
* - expand: 点击更多按钮展开所有项
|
|
2715
|
+
* - scroll: 横向滚动显示多余项
|
|
2716
|
+
* @default 'expand'
|
|
2717
|
+
*/
|
|
2718
|
+
overflowMode?: 'expand' | 'scroll';
|
|
2719
|
+
/**
|
|
2720
|
+
* 鼠标悬停时是否自动滚动到可见区域
|
|
2721
|
+
* @default false
|
|
2722
|
+
*/
|
|
2723
|
+
autoScrollOnHover?: boolean;
|
|
2497
2724
|
}
|
|
2498
2725
|
|
|
2499
2726
|
/**
|
|
@@ -2503,11 +2730,34 @@ export declare interface SuggestionPillsSlots {
|
|
|
2503
2730
|
default?: () => VNode | VNode[];
|
|
2504
2731
|
}
|
|
2505
2732
|
|
|
2733
|
+
declare interface SuggestionPopoverEventProps {
|
|
2734
|
+
onItemClick?: (item: SuggestionItem_2) => void;
|
|
2735
|
+
onGroupClick?: (group: SuggestionGroup) => void;
|
|
2736
|
+
onOpen?: () => void;
|
|
2737
|
+
onClose?: () => void;
|
|
2738
|
+
onClickOutside?: (event: MouseEvent) => void;
|
|
2739
|
+
}
|
|
2740
|
+
|
|
2506
2741
|
declare interface SuggestionPopoverEvents {
|
|
2742
|
+
/**
|
|
2743
|
+
* @deprecated use onItemClick in props instead
|
|
2744
|
+
*/
|
|
2507
2745
|
itemClick?: (item: SuggestionItem_2) => void;
|
|
2746
|
+
/**
|
|
2747
|
+
* @deprecated use onGroupClick in props instead
|
|
2748
|
+
*/
|
|
2508
2749
|
groupClick?: (group: SuggestionGroup) => void;
|
|
2750
|
+
/**
|
|
2751
|
+
* @deprecated use onOpen in props instead
|
|
2752
|
+
*/
|
|
2509
2753
|
open?: () => void;
|
|
2754
|
+
/**
|
|
2755
|
+
* @deprecated use onClose in props instead
|
|
2756
|
+
*/
|
|
2510
2757
|
close?: () => void;
|
|
2758
|
+
/**
|
|
2759
|
+
* @deprecated use onClickOutside in props instead
|
|
2760
|
+
*/
|
|
2511
2761
|
clickOutside?: (event: MouseEvent) => void;
|
|
2512
2762
|
}
|
|
2513
2763
|
|