@@ -97,7 +97,7 @@ const {
97
97
placement: placementProp ,
98
98
middleware: [
99
99
floating .offset (6 ),
100
- floating .flip (),
100
+ floating .flip ({ fallbackAxisSideDirection: " end " , crossAxis: false } ),
101
101
floating .shift ({ padding: 5 }),
102
102
floating .arrow ({ element: arrowRef }),
103
103
],
@@ -122,16 +122,12 @@ const isTooltipHovered = useElementHover(floatingRef, {
122
122
});
123
123
const isTriggered = computed ((): boolean => {
124
124
const triggered = triggerRef .value ?? isTargetHovered .value ;
125
- if (interactive .value ) {
126
- return triggered || isTooltipHovered .value ;
127
- } else {
128
- return triggered ;
129
- }
125
+ const t = triggered || (interactive .value && isTooltipHovered .value );
126
+ return t ;
130
127
});
131
128
132
129
watch (isTriggered , (show ) => {
133
130
if (show ) {
134
- update ();
135
131
props .onShow ?.();
136
132
} else {
137
133
props .onHide ?.();
@@ -199,6 +195,7 @@ const arrowStyles = computed(() => {
199
195
.floating-content {
200
196
display : grid ;
201
197
background-color : white ;
198
+ border-radius : 3px ;
202
199
z-index : 10002 ;
203
200
}
204
201
@@ -217,6 +214,7 @@ const arrowStyles = computed(() => {
217
214
.floating-wrapper [data-theme ~= " light" ] {
218
215
background-color : white ;
219
216
border : 1px solid black ;
217
+ box-shadow : 0 4px 4px rgb (0 0 0 / .2 );
220
218
221
219
.floating-content {
222
220
background-color : white ;
@@ -229,28 +227,24 @@ const arrowStyles = computed(() => {
229
227
}
230
228
231
229
.floating-wrapper [data-placement ~= " top" ] {
232
- box-shadow : 0 4px 4px rgba (0 , 0 , 0 , 0.2 );
233
230
.floating-arrow {
234
231
border-width : 0 1px 1px 0 ;
235
232
bottom : -5px !important ;
236
233
}
237
234
}
238
235
.floating-wrapper [data-placement ~= " right" ] {
239
- box-shadow : -4px 0 4px rgba (0 , 0 , 0 , 0.2 );
240
236
.floating-arrow {
241
237
border-width : 0 0 1px 1px ;
242
238
left : -5px !important ;
243
239
}
244
240
}
245
241
.floating-wrapper [data-placement ~= " bottom" ] {
246
- box-shadow : 0 -4px 4px rgba (0 , 0 , 0 , 0.2 );
247
242
.floating-arrow {
248
243
border-width : 1px 0 0 1px ;
249
244
top : -5px !important ;
250
245
}
251
246
}
252
247
.floating-wrapper [data-placement ~= " left" ] {
253
- box-shadow : 4px 0 4px rgba (0 , 0 , 0 , 0.2 );
254
248
.floating-arrow {
255
249
border-width : 1px 1px 0 0 ;
256
250
right : -5px !important ;
0 commit comments