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
- [Vuejs]-How to focus Quill editor using the vue-quill package?
- [Vuejs]-How to mock window.eventBus.$on โ Vue.js | Jest Framework
-3๐
You could suppress all Vue.js logs and warnings, but not a specific warning.
Vue.config.silent = true
๐คPantelis Peslis
Source:stackexchange.com