I'm working on a project using vuejs2 and the vue-class-component package to make the class components and using vue-styleguidist for documentation.
For a certain scenario I had to create a Mixin and this is done via extending the component class (as explained in the vue-class-component documentation here ), but unfortunately seems that the methods and properties of the mixin are not shown in the autogenerated props/methods table of vue-styleguidist through the vue-cli-plugin-styleguidist package. Is there any way to do it?
I am using the following versions:
vue-cli-plugin-styleguidist: ^3.11.4
vue-class-component: ^6.0.0
vue: ^2.6.6
This is a code example of the same structure I use:
import Vue from 'vue';
import Component, { mixins } from 'vue-class-component';
@Component
class MyMixin extends Vue {
/*
* Mixin prop documentation text
*/
mixinValue:boolean = true;
/*
* Mixin method documentation text
*/
mixinMethod():string {
return this.mixinValue ? 'some string' : '';
}
}
@Component
export class MyComp extends mixins(MyMixin) {
/*
* Component prop documentation text
*/
componentValue:string = 'some value';
/*
* Component method documentation text
*/
componentMethod(): string {
return this.mixinMethod();
}
}
This when documentation is generated it just returns shows in the table componentValue and componentMethod and doesn't show at all the mixin part.