vue3 watch 多个值

发布时间 2023-10-24 11:39:19作者: 林财钦
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 });

会返回 数组