feat(effects): 添加 scheduler 选项支持和 extend 工具函数

- 添加 extend 函数作为 Object.assign 的别名
- 修复 ReactiveEffectOptions 中 scheduler 属性拼写错误
- 实现 effect 选项配置的属性扩展功能
- 更新 lazy 示例展示 effect 运行逻辑
- 新增 scheduler 示例演示调度器功能
This commit is contained in:
dj
2026-02-10 17:54:23 +08:00
parent 62e40e7292
commit 1f50ab1c84
4 changed files with 45 additions and 11 deletions

View File

@@ -13,16 +13,14 @@
const obj=reactive({
count:1
})
let {name}=obj
console.log('name',name);
effect(()=>{
document.querySelector('#app').innerText=name
console.log('obj.count',obj.count)
},{
lazy:false
})
setTimeout(()=>{
obj.name='李四'
console.log('obj',obj);
},2000)
obj.count=2
console.log('代码运行结束');
</script>
</html>