feat(runtime): 添加H函数组件示例和数组子节点标记支持
- 新增h-component.html示例文件展示直接创建虚拟DOM节点 - 在vnode.ts中为数组子节点添加ShapeFlags.ARRAY_CHILDREN标记 - 实现了绕过h函数直接构建组件虚拟节点的演示功能
This commit is contained in:
@@ -32,6 +32,7 @@ export function normalizeChildren(vnode: VNode, children: unknown) {
|
||||
if (children == null) {
|
||||
children = null
|
||||
} else if (isArray(children)) {
|
||||
type = ShapeFlags.ARRAY_CHILDREN
|
||||
} else if (typeof children === 'object') {
|
||||
} else if (isFunction(children)) {
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user