vue-tippy
Advanced tools
Comparing version 4.0.2 to 4.0.3
{ | ||
"name": "vue-tippy", | ||
"version": "4.0.2", | ||
"version": "4.0.3", | ||
"description": "Directive and Component wrapper for Tippy.js", | ||
@@ -5,0 +5,0 @@ "author": "Georges KABBOUCHI <georges.kabbouchi@gmail.com>", |
@@ -34,2 +34,4 @@ # VueTippy | ||
Vue.use(VueTippy); | ||
Vue.component("tippy", TippyComponent); | ||
// or | ||
@@ -47,4 +49,10 @@ Vue.use(VueTippy, { | ||
}); | ||
Vue.component("tippy", TippyComponent); | ||
Vue.component("tippy", TippyComponent); | ||
// Add additional themes. | ||
import "tippy.js/themes/light.css"; | ||
import "tippy.js/themes/light-border.css"; | ||
import "tippy.js/themes/google.css"; | ||
import "tippy.js/themes/translucent.css"; | ||
``` | ||
@@ -51,0 +59,0 @@ |
@@ -8,3 +8,3 @@ import tippy from 'tippy.js' | ||
const plugin = { | ||
install (Vue, options = {}) { | ||
install(Vue, options = {}) { | ||
tippyDirective = options.directive || 'tippy' | ||
@@ -14,3 +14,3 @@ | ||
function createTippy (el, binding, vnode) { | ||
function createTippy(el, binding, vnode) { | ||
const handlers = (vnode.data && vnode.data.on) || | ||
@@ -25,3 +25,3 @@ (vnode.componentOptions && vnode.componentOptions.listeners) | ||
opts.onShow = function (...args) { | ||
handlers['show'].fns(...args) | ||
return handlers['show'].fns(...args) | ||
} | ||
@@ -43,3 +43,3 @@ } | ||
opts.onHide = function (...args) { | ||
handlers['hide'].fns(...args) | ||
return handlers['hide'].fns(...args) | ||
} | ||
@@ -76,3 +76,3 @@ } | ||
Vue.directive(tippyDirective, { | ||
inserted (el, binding, vnode) { | ||
inserted(el, binding, vnode) { | ||
Vue.nextTick(() => { | ||
@@ -82,6 +82,6 @@ createTippy(el, binding, vnode) | ||
}, | ||
unbind (el) { | ||
unbind(el) { | ||
el._tippy && el._tippy.destroy() | ||
}, | ||
componentUpdated (el, binding, vnode) { | ||
componentUpdated(el, binding, vnode) { | ||
if (el._tippy) { | ||
@@ -114,2 +114,2 @@ const opts = binding.value || {} | ||
tippy, | ||
} | ||
} |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
707374
119
17975