File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
packages/vuetify/src/directives/tooltip Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,9 @@ import { VTooltip } from '@/components/VTooltip'
44// Composables
55import { useDirectiveComponent } from '@/composables/directiveComponent'
66
7+ // Utilities
8+ import { isObject } from '@/util'
9+
710// Types
811import type { DirectiveBinding } from 'vue'
912import type { Anchor } from '@/util'
@@ -14,8 +17,12 @@ export interface TooltipDirectiveBinding extends Omit<DirectiveBinding<string>,
1417}
1518
1619export const Tooltip = useDirectiveComponent < TooltipDirectiveBinding > ( VTooltip , binding => {
20+ const disabled = isObject ( binding . value )
21+ ? ! binding . value . text
22+ : [ '' , false , null ] . includes ( binding . value ) // undefined means true
23+
1724 return {
18- activator : 'parent' ,
25+ activator : disabled ? null : 'parent' ,
1926 location : binding . arg ?. replace ( '-' , ' ' ) ,
2027 text : typeof binding . value === 'boolean' ? undefined : binding . value ,
2128 }
You can’t perform that action at this time.
0 commit comments