Files
vue-core-mini/packages/vue/examples/reactivity/reactive.html
dj d3fea3f244 feat(reactivity): 实现响应式系统基础功能
- 新增 baseHandlers.ts 文件,定义响应性 handler
- 在 reactivity 模块中导出 reactive 函数
- 将 vue 主入口改为导出 reactive,移除测试代码
- 添加 reactive.html 示例文件用于测试响应式功能
- 实现 reactive 函数,支持创建复杂数据类型的响应式对象
- 使用 WeakMap 缓存代理对象,避免重复代理
2026-02-03 18:14:33 +08:00

19 lines
378 B
HTML

<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Document</title>
<script src="../../dist/vue.js"></script>
</head>
<body>
</body>
<script>
const { reactive } = Vue
console.log(reactive)
const obj=reactive({
name:'张三'
})
console.log(obj)
</script>
</html>