File tree Expand file tree Collapse file tree 1 file changed +19
-13
lines changed
Expand file tree Collapse file tree 1 file changed +19
-13
lines changed Original file line number Diff line number Diff line change @@ -60,12 +60,16 @@ const props = defineProps({
6060 blockShiftY: {
6161 type: Boolean ,
6262 default: false ,
63+ },
64+ isFullscreen: {
65+ type: Boolean ,
66+ default: false
6367 }
6468});
6569
6670const tooltip = ref (null )
6771
68- const clientPosition = ref (useMouse ());
72+ const clientPosition = ref (useMouse (props . parent ));
6973
7074const position = computed (() => {
7175 return calcTooltipPosition ({
@@ -85,18 +89,20 @@ const convertedBackground = computed(() => {
8589 </script >
8690
8791<template >
88- <div
89- ref =" tooltip"
90- data-cy =" tooltip"
91- :class =" {'vue-data-ui-custom-tooltip' : isCustom, 'vue-data-ui-tooltip': !isCustom}"
92- v-if =" show"
93- :style =" `pointer-events:none;top:${position.top}px;left:${position.left}px;${isCustom ? '' : `background:${convertedBackground};color:${color};max-width:${maxWidth};font-size:${fontSize}px`};border-radius:${borderRadius}px;border:${borderWidth}px solid ${borderColor};`"
94- >
95- <slot name =" tooltip-before" />
96- <slot />
97- <div v-html =" content" />
98- <slot name =" tooltip-after" />
99- </div >
92+ <teleport :to =" isFullscreen ? parent : 'body'" >
93+ <div
94+ ref =" tooltip"
95+ data-cy =" tooltip"
96+ :class =" {'vue-data-ui-custom-tooltip' : isCustom, 'vue-data-ui-tooltip': !isCustom}"
97+ v-if =" show"
98+ :style =" `pointer-events:none;top:${position.top}px;left:${position.left}px;${isCustom ? '' : `background:${convertedBackground};color:${color};max-width:${maxWidth};font-size:${fontSize}px`};border-radius:${borderRadius}px;border:${borderWidth}px solid ${borderColor};`"
99+ >
100+ <slot name =" tooltip-before" />
101+ <slot />
102+ <div v-html =" content" />
103+ <slot name =" tooltip-after" />
104+ </div >
105+ </teleport >
100106</template >
101107
102108<style >
You can’t perform that action at this time.
0 commit comments