feat(runtime): 添加H函数组件示例和数组子节点标记支持

- 新增h-component.html示例文件展示直接创建虚拟DOM节点
- 在vnode.ts中为数组子节点添加ShapeFlags.ARRAY_CHILDREN标记
- 实现了绕过h函数直接构建组件虚拟节点的演示功能
This commit is contained in:
dj
2026-02-27 17:35:51 +08:00
parent 4225ae0b8f
commit 61edc322f2
2 changed files with 39 additions and 0 deletions

View File

@@ -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 {