Answer the question
In order to leave comments, you need to log in
Why doesn't Vue 3 see the global directive?
Declared in main.js:
import directives from "./extensions-vue/directives";
app.directive(directives);
app.mount("#app");
export default {
widthAsChild: {
mounted(el, binding) {
binding.instance.widthAsChild(el);
window.addEventListener("resize", () => {
binding.instance.widthAsChild(el);
});
},
updated(el, binding) {
binding.instance.widthAsChild(el);
},
},
};
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question