Cannot assign to 'property' because it is a read-only property mixin

206 Views Asked by At

I have mixin as below

export default mixins().extend({
    data() {
      return {         
        gridSchema: [] as any, } 
  }
});

and i am using in MyComponent.vue there also i have data with same name gridSchema

  data(){
    return {
     defaultGridSchema: defaultGridSchema as GridSchemaEntry[],
     gridSchema: [] as GridSchemaEntry[]
   }
}

In my MyComponent.vue when i write

 this.gridSchema = this.defaultGridSchema;

it gives me error

Cannot assign to 'gridSchema' because it is a read-only property. Am i missing anything. Please guide me on the same.

0

There are 0 best solutions below