MCPcopy
hub / github.com/Akryum/floating-vue / bind

Function bind

packages/floating-vue/src/directives/v-tooltip.ts:129–148  ·  view source on GitHub ↗
(el, { value, modifiers })

Source from the content-addressed store, hash-verified

127}
128
129export function bind (el, { value, modifiers }) {
130 const options = getOptions(el, value, modifiers)
131 if (!options.content || getDefaultConfig(options.theme || 'tooltip', 'disabled')) {
132 destroyTooltip(el)
133 } else {
134 let directive
135 if (el.$_popper) {
136 directive = el.$_popper
137 directive.options.value = options
138 } else {
139 directive = createTooltip(el, value, modifiers)
140 }
141
142 // Manual show
143 if (typeof value.shown !== 'undefined' && value.shown !== el.$_popperOldShown) {
144 el.$_popperOldShown = value.shown
145 value.shown ? directive.show() : directive.hide()
146 }
147 }
148}
149
150export default {
151 beforeMount: bind,

Callers

nothing calls this directly

Calls 4

getDefaultConfigFunction · 0.90
getOptionsFunction · 0.85
destroyTooltipFunction · 0.85
createTooltipFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…