-
Couldn't load subscription status.
- Fork 433
Closed
Description
copied from kaorun343/vue-property-decorator#320.
I do not know which repo should handle this issue, but
the get/set should not be cached to align with the class's behavior
@Component
export default class MyComponent extends Vue{
@Prop({type:Object, default:()=({})})
value!:any;
obj:any = {};
get obj2(){
console.log("get ")// this will only log once,
return {...obj, a: new Date()}
}
@Watch('value',{ deep:true})
watchValue(v:any){
this.obj = {... this.value}
}
mounted(){
this.watchValue(this.value);
}
}Metadata
Metadata
Assignees
Labels
No labels