vue3 watch 多个值

1 watch([() => baTable.form.items!.userType, () => baTable.form.items!.totalUsage, () => baTable.form.items!.payCurr], (newValue, oldValue) => {
2     // 此时newValue为数组
3     console.log(newValue);
4     let userTypeWatch = newValue[0]; // 用户类型
5 
6 });

会返回 数组

posted @ 2023-10-24 11:22  林财钦  阅读(337)  评论(0)    收藏  举报