angular 更新表单值的两种方法: setvalue,patchvalue 木楠Nan 2023-01-05 384 阅读1分钟 1 patchValue form.patchValue({first: 'Nancy'}); 2 setValue form.setValue({first: 'Nancy', last: 'Drew'}); patchValue 可以只更新副本的数据,而setValue则必须与form 数据结构一致才能进行更新。