tooltip in try

This commit is contained in:
Dmitry Belyaev 2021-06-05 13:46:59 +03:00
parent ec4f5e2e4c
commit ef626766ef
Signed by: b4tman
GPG Key ID: 41A00BF15EA7E5F3

View File

@ -11,18 +11,32 @@ window.jQuery = window.$ = require("jquery");
const app = createApp(App).use(store).use(router); const app = createApp(App).use(store).use(router);
const pass = () => {};
app.directive("tooltip", { app.directive("tooltip", {
mounted(el, binding) { mounted(el, binding) {
try {
window.$(el).tooltip({ window.$(el).tooltip({
placement: binding.arg, placement: binding.arg,
trigger: "hover", trigger: "hover",
}); });
} catch {
pass();
}
}, },
updated(el) { updated(el) {
try {
window.$(el).tooltip("update"); window.$(el).tooltip("update");
} catch {
pass();
}
}, },
unmounted(el) { unmounted(el) {
try {
window.$(el).tooltip("dispose"); window.$(el).tooltip("dispose");
} catch {
pass();
}
}, },
}); });