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) {
window.$(el).tooltip({ try {
placement: binding.arg, window.$(el).tooltip({
trigger: "hover", placement: binding.arg,
}); trigger: "hover",
});
} catch {
pass();
}
}, },
updated(el) { updated(el) {
window.$(el).tooltip("update"); try {
window.$(el).tooltip("update");
} catch {
pass();
}
}, },
unmounted(el) { unmounted(el) {
window.$(el).tooltip("dispose"); try {
window.$(el).tooltip("dispose");
} catch {
pass();
}
}, },
}); });