const tipComponent = Vue.extend({
template: `<el-tooltip
placement="right"
effect="light"
:popper-options="{ boundariesElement: 'body', gpuAcceleration: false, removeOnDestroy: true }"
:open-delay="0"
>
<div slot="content">
vue代码片段
</div>
<div style='width: 100%;height: 100%;'>${el.innerHTML}</div></el-tooltip>`
})
// eslint-disable-next-line new-cap
const component = new tipComponent().$mount()
el.appendChild(component.$el)
使用vue渲染组件然后通过js动态插入至dom中