1.vue.config.js 添加
runtimeCompiler: true,
2.页面加载组件
'mail-content': {
props: {
html: String
},
render(h) {
const com = Vue.extend({
template: `<div>${this.html}</div>`
})
return h(com, {})
}
}
3.页面调用组件
<mail-content :html="msg"></mail-content>
4.msg 值
`<a-tooltip>
<template slot="title">
prompt text
</template>
2222
</a-tooltip>`