[Vuejs]-Cannot use property decorator @Prop in vue

5๐Ÿ‘

โœ…

I think the problem is with your import statement.

import Vue from 'vue';
import Component from 'vue-class-component';
import { Prop } from 'vue-property-decorator'; // no default import, used { Prop } to import the decorator

@Component({
  template: require('./template.html'),
})
export class SuklTableApprComponent extends Vue {

  @Prop()
  type: any;
  @Prop()
  data: any;
  mounted() { }

}

Leave a comment