Props from mixin object aren't parsed
See original GitHub issueCurrent behavior
Props defined in a constant that works as a mixin don’t show up in the results of using vue-docgen-api
’s parse
method.
We are keeping all props in a separate mixin object which gets exported as well (mainly because we have e.g. a UrlInput and a UrlField component - in this way the UrlField component can easily take on the same props from UrlInput plus additional ones).
To reproduce
export const props = {
props: {
autocomplete: {
type: String,
default: "url"
},
type: {
type: String,
default: "url"
}
}
}
export default {
mixins: [props]
}
Output generates no props data at all.
Expected behavior
Output should feature data on autocomplete
and type
prop.
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
Vue: passing dynamic props to mixin [closed] - Stack Overflow
A mixin isn't called, the component simply inherits its properties/methods. Props are designed to be passed from parent to child components. A ...
Read more >Props are not properly inherited from mixins / extended ...
I'm having a bunch of components that all share some properties, so I've moved them into a mixin (also tried with extending from...
Read more >Vue Problems — Mixins, Slots, and Computed Properties
We can pass all props and listeners from parent to child by using the v-bind and v-on ... </div>. Vue will display the...
Read more >mixin and @include - Sass
Mixins allow you to define styles that can be re-used throughout your stylesheet. They make it easy to avoid using non-semantic classes like...
Read more >How to use the vue-property-decorator.Mixins function ... - Snyk
To help you get started, we've selected a few vue-property-decorator.Mixins examples, based on popular ways it is used in public projects.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
On first look, works great in our setup. Thanks a lot for the effort and so quickly!
Hey @distantnative,
I appreciate the concern. You will get a fix or an answer probably by tonight.
In any case, this does not seem like a complicated fix. I do not expect it to take more than a week to fix.