0👍
You can use computed
to extract html
computed: {
freqHtml() {
if (!this.freq || !this.frequencies) {
return ''
}
const item = this.freq.find(f => f.code === this.frequencies)
if (item && item.formFields && item.formFields.length) {
return item.formFields[0].html
}
return ''
}
}
then inject to template using v-html
<div class="form-group">
<label class="col-form-label">Frequency</label>
<select v-model="frequencies" id="frequency" class="form-control">
<option :value="null">Select Funding Frequency</option>
<option v-for="pm in freq" :value="pm.code" v-on:change="onFreqChange">{{pm.name}}</option>
</select>
<div v-html="freqHtml"></div>
</div>
- [Vuejs]-Is there a way to have posts at the root with Vuepress Blog plugin?
- [Vuejs]-Using PHP template engine on Laravel blade
Source:stackexchange.com