富文本里有组件页面渲染出来
2022-03-31 本文已影响0人
0说
import Vue from 'vue'
const Child = {
props: {
html: {
type: String,
default: '<el-button @click="btnHandle">66666</el-button>'
}
},
render(h) {
const com = Vue.extend({
template: this.html
})
return h(com)
}
}
局部组件:
components: {
Child
},