How to call super in contructor
Closed this issue · 3 comments
Makkalay commented
@Component
export default class MyComponent extends Vue {
// constructor( ) {
// super() // expets 2 arguments
// }
}
What to put in, where?
new (optionBuilder: OptionBuilder, vueInstance: any): ComponentPublicInstance & BaseTypeIdentify & T;
Makkalay commented
May be that will work
constructor(
a: OptionBuilder,
b: any,
// @Inject(UserStore)
// private userStore: UserStore
) {
super(a, b)
}
OptionBuilder is declared locally
Makkalay commented
[unhandledRejection] Unexpected character '@' if I add
@Setup(() => definePageMeta({ layout: 'admin' }))
_layout!: never
commented or uncommented
Use with nuxt.
Makkalay commented
Ahaha setup() return property "layout" should not start with "$" or "" which are reserved prefixes for Vue internals.