摘要: watch: 适用于组件内部或组合函数中对某些响应式数据进行监听。 场景:监听某个 ref 或 reactive 属性 const count = ref(0); watch(count, (newVal, oldVal) => { console.log('count changed:', new 阅读全文
posted @ 2025-06-05 17:46 yuxiaoliu 阅读(360) 评论(0) 推荐(0)