kaorun343 / vue-property-decorator

Vue.js and Property Decorator
MIT License
5.52k stars 380 forks source link

Feature/PropClone #418

Closed bvanderplanck closed 2 years ago

bvanderplanck commented 2 years ago

I faced the case of a very repetitive scenario where I am receiving object data as a property that can be mutable inside the component. I was playing with @Prop, a clone helper and @Watch to make it all work according to VueJS standard (props need to stay immutable).

Here is a solution I quickly wrote to make it easier and cleaner.