0👍
You should add computed
prop and gather item.metas
and customFields
there:
computed: {
customFieldsAndMetas () {
return this.customFields.map(x => ({
field: x,
meta: this.item.metas.find(i => i.key === field.systemName)
}))
}
}
and use it in a template like this:
<div v-for="fieldAndMeta in customFieldsAndMetas">
<input v-model="fieldAndMeta.meta.value" :label="fieldAndMeta.field.systemName" :placeholder="fieldAndMeta.field.systemName" type="text">
</div>
- [Vuejs]-Cant get data from multiple tables using axios and EntityFramwork
- [Vuejs]-Vuex getter data disappears on refresh
Source:stackexchange.com