[Vuejs]-Optional nested properties and v-model

0๐Ÿ‘

If you could have your API pass it an array of property names, then could use $set while looping over the array:

for (var i = 0; i < response.propertyNameListFromAPI.length; i++)
{
     this.item.$set(response.propertyNameListFromAPI[i], null );
}

OR if you have an existing item object you could iterate over its property names:

for (var propertyName in exampleItemObject )
{
     this.item.$set(propertyName, exampleItemObject[propertyName] );
}
๐Ÿ‘คDouglas.Sesar

-3๐Ÿ‘

You could suppress all Vue.js logs and warnings, but not a specific warning.

Vue.config.silent = true
๐Ÿ‘คPantelis Peslis

Leave a comment