<div id="app">
<el-form v-model="form" label-width="100px" class="process-edit-form">
<el-form-item v-for="item in formParams" :label="item.name + ":"">
<!-- item.html-->
</el-form-item>
</el-form>
</div>
var app = new Vue({
el: "-sharpapp",
data: {
button: "<el-button type="primary"></el-button>",
form: {
name: "",
age: ""
},
formParams: [
{name: "", type: "name", html: "<el-input v-model.trim="form.name"></el-input>"},
{name: "", type: "age", html: "<el-input v-model.trim="form.age"></el-input>"},
]
},
mounted() {
this.$nextTick(function () {
this.$forceUpdate();
})
}
})
because I want to dynamically render the component according to the data returned by the background, send me such a string, in what way can it be implemented?
renders this label with v-html, not the component.