vue-tippy
Advanced tools
Comparing version 2.0.13 to 2.0.15
{ | ||
"name": "vue-tippy", | ||
"version": "2.0.13", | ||
"version": "2.0.15", | ||
"description": "Directive wrapper for Tippy.js", | ||
@@ -5,0 +5,0 @@ "author": "Georges KABBOUCHI <georges.kabbouchi@gmail.com>", |
@@ -58,7 +58,7 @@ import Tippy from 'tippy.js/dist/tippy.all' | ||
if (opts.html) { | ||
if (opts.reactive) { | ||
opts.html = document.querySelector(opts.html) | ||
var selector = opts.html | ||
if (opts.reactive || !(typeof selector === 'string')) { | ||
opts.html = selector instanceof Element ? selector : (selector instanceof Vue ? selector.$el : document.querySelector(selector)) | ||
} else { | ||
const htmlElement = document.querySelector(opts.html) | ||
if (htmlElement) { | ||
@@ -102,2 +102,6 @@ if (htmlElement._tipppyReferences) { | ||
function isObjectLiteral (value) { | ||
return {}.toString.call(value) === '[object Object]' | ||
} | ||
Vue.directive('tippy', { | ||
@@ -104,0 +108,0 @@ inserted (el, binding, vnode) { |
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
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
428524
9078