(el, { value, modifiers })
| 127 | } |
| 128 | |
| 129 | export 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 | |
| 150 | export default { |
| 151 | beforeMount: bind, |
nothing calls this directly
no test coverage detected
searching dependent graphs…