karol-f / vue-custom-element

Vue Custom Element - Web Components' Custom Elements for Vue.js
https://karol-f.github.io/vue-custom-element/
MIT License
1.97k stars 187 forks source link

props defined in extended component's mixins are not registered #196

Open thedamon opened 4 years ago

thedamon commented 4 years ago

In a setup where a component defines a prop through a mixin, the web-component that extends that component does not have access to the mixin's props

Pseudocode:

const mixin = { props: { 'test' } };

const base = {
 name: 'v-base',
 mixins: [mixin]
};

const extender = {
 name: 'v-extender',
 extends: base
}

const mixiner = {
 name: 'v-extender',
 extends: base,
 mixins: [mixin]
}

extender.test // <-- not defined
mixiner.test // <-- works

It's straightforward to work around this and may just be something that was never consciously implemented?