feat(reactivity): 实现响应式系统基础功能

- 新增 baseHandlers.ts 文件,定义响应性 handler
- 在 reactivity 模块中导出 reactive 函数
- 将 vue 主入口改为导出 reactive,移除测试代码
- 添加 reactive.html 示例文件用于测试响应式功能
- 实现 reactive 函数,支持创建复杂数据类型的响应式对象
- 使用 WeakMap 缓存代理对象,避免重复代理
This commit is contained in:
dj
2026-02-03 18:14:33 +08:00
parent d4684f288e
commit d3fea3f244
5 changed files with 66 additions and 4 deletions

View File

@@ -1,3 +1 @@
import { isArray } from '@vue/shared'
console.log(isArray([]))
export { reactive } from '@vue/reactivity'