feat(stages): 添加性能测试和虚拟DOM实现阶段

添加stage04-perf用于真实DOM操作性能对比,包含三个不同的更新策略:
- innerHTML全量更新
- createElement全量重建
- 精确单节点更新

添加stage04用于模拟异步接口数据获取后的渲染演示

添加stage05实现虚拟DOM基础功能,提供VNode对象描述DOM树结构和递
归渲染函数
This commit is contained in:
zzy
2026-05-02 12:36:53 +08:00
parent fc87cf4622
commit 845789cd60
7 changed files with 483 additions and 0 deletions

14
stage04/index.html Normal file
View File

@@ -0,0 +1,14 @@
<!DOCTYPE html>
<html lang='zh-cn'>
<head>
<meta charset='utf-8'>
<meta name='viewport' content='width=device-width, initial-scale=1'>
<title>Stage 04: 模拟异步接口</title>
</head>
<body>
<input type="number" id="userId" placeholder="用户 ID" />
<button id="loadBtn">加载用户</button>
<div id="minivue"></div>
<script src="./index.js"></script>
</body>
</html>