vnode
2020-11-02 14:30:21 0 举报
AI智能生成
vnode
作者其他创作
大纲/内容
__v_isVNode: true,判断是不是vnode
__v_skip: true,跳过响应式数据化,比如跳过执行
- const a = reactive({ __v_skip: true, foo: 1 })
- isReactive(a) === false
type,创建vnode的首个传入的参数,类型为:VNodeTypes | ClassComponent | typeof NULL_DYNAMIC_COMPONENT
比如创建一个Component(属于VNodeTypes)类型的vnode:
那么type就是Component
比如创建一个Component(属于VNodeTypes)类型的vnode:
- import { h } from '@vue/runtime-dom'
- h({
- setup() {
- return () => h('1')
- }
- } as Component)
那么type就是Component
props,dom的参数,比如一些style 之类的
- { key: 1, style: { opacity: 0 } }
key: props && normalizeKey(props)
如上经过normalizeKey,则key为1
如上经过normalizeKey,则key为1
ref: props && normalizeRef(props)
同上
同上
scopeId: currentScopeId
children
component,instance通过createComponentInstance创建
suspense
dirs
transition
el,mountElement 会自动填充 还有其他的方法也会填充,自身vnode根据type被渲染后的属性
anchor,插入的位置
target
targetAnchor
staticCount: 0
shapeFlag,一个类型标记,当使用patch的时候,会根据这个类型字段,而进行特定的渲染过程
patchFlag,默认0
dynamicProps
dynamicChildren
appContext
0 条评论
下一页