Someone knows how inherit a mixin
with its template? or how to inject dinamically elements or components from a mixin
?
EDIT:
You can't "inherit" mixin templates like in your example, if it were possible there would have to be a standardized way of merging the templates.
Since it seems all you really want to do is inherit the template, why not use component composition with slots?
Vue.component('not-found', {
template: '#not-found',
methods: {
doSomethingSpecial() {
alert('Hi there');
},
},
});
new Vue({
el: '#app',
data() {
return {
notFoundVisible: false,
};
},
});
.not-found {
background-color: white;
text-align: center;
font-size: 30px;
position: fixed;
left: 0;
top: 0;
right: 0;
bottom: 0;
}
404 Not Found
The resource was not found
Is there any particular reason why you need to mixin these components instead of composing them together?