watch(
[() => state1.count, state2.value], ([newVal1, newVal2], [oldVal1, oldVal2]) => {
console.log('watch监听中的newVal:', newVal1, newVal2);
console.log('watch监听oldVal:', oldVal1, oldVal2);
}
)
vue3中watch同时监听多个值
于 2023-03-16 16:31:35 首次发布