0๐
I found some creepy(?) solution, but it works:
// mixins.js
export default class Mixins {
static fooMixin() {
return {
created: function () {
console.log('mixin hook called');
}
}
}
}
// app.js
Vue.component("foo", resolve => {
require(['./components/foo.vue'], resolve);
});
// foo.vue
<script>
import Mixins from "mixins";
export default {
...
mixins: [Mixins.fooMixin()]
}
</script>
But I hope that there is a more elegant solution.
๐คNikitaK
- [Vuejs]-Pusher ChatKit โ rooms and roomSubscriptions โ how to detect new messages
- [Vuejs]-Vue table in one loop html
Source:stackexchange.com