facing-dev/vue-facing-decorator

How to call super in contructor

Closed this issue · 3 comments

@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;

May be that will work

constructor(
    a: OptionBuilder,
    b: any,
    // @Inject(UserStore)
    // private userStore: UserStore
  ) {
    super(a, b)
  }

OptionBuilder is declared locally

[unhandledRejection] Unexpected character '@' if I add

@Setup(() => definePageMeta({ layout: 'admin' }))
  _layout!: never

commented or uncommented

Use with nuxt.

Ahaha setup() return property "layout" should not start with "$" or "" which are reserved prefixes for Vue internals.