Vue3使用Watch监听多个参数
watch监听多个响应式变量写法
js
const test1 = ref(1)
const test2 = ref(2)
watch(() => [test1.value, test2.value], ([new1, new2], [old1, old2]) => {
})