tooltip in try
This commit is contained in:
parent
ec4f5e2e4c
commit
ef626766ef
14
src/main.js
14
src/main.js
@ -11,18 +11,32 @@ window.jQuery = window.$ = require("jquery");
|
||||
|
||||
const app = createApp(App).use(store).use(router);
|
||||
|
||||
const pass = () => {};
|
||||
|
||||
app.directive("tooltip", {
|
||||
mounted(el, binding) {
|
||||
try {
|
||||
window.$(el).tooltip({
|
||||
placement: binding.arg,
|
||||
trigger: "hover",
|
||||
});
|
||||
} catch {
|
||||
pass();
|
||||
}
|
||||
},
|
||||
updated(el) {
|
||||
try {
|
||||
window.$(el).tooltip("update");
|
||||
} catch {
|
||||
pass();
|
||||
}
|
||||
},
|
||||
unmounted(el) {
|
||||
try {
|
||||
window.$(el).tooltip("dispose");
|
||||
} catch {
|
||||
pass();
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user