vue3 vNode 怎么手动转换真实 dom #7462
Unanswered
remloyal
asked this question in
Help/Questions
Replies: 1 comment
-
You can try the following code: import { render, h } from 'vue'
const vnode = h('div')
render(vnode, container) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
在vue2 中,通过jsx 创建的节点,可以通过Vue.extend继承,而后使用 $mount() 进行节点实例化
具体表现为 $el ,可以获取到真实节点

而在vue3 中的vnode 必须经过编译

请问如何手动进行 vnode 节点的实例化,从而获取到真实dom
Beta Was this translation helpful? Give feedback.
All reactions