computed: {
fields () {
for (var key in this.data) {
if ( ! this.data[key]['attr'] ) this.data[key]['attr'] = {};
if ( ! this.data[key]['attr']['id'] ){
this.data[key]['attr']['id'] = 'Forms_'+this.data[key]['name'];
}
}
return this.data;
}
}
props: {
value: [String, Number, Object, Array]
}
data() {
return {
mutableValue: this.value
};
}
Find more questions by tags Vue.js
Show if not difficult to watch an example... - Armand_Nader93 commented on June 10th 19 at 14:56