今天写一个全选的功能 一直报这个问题

Warning: A component is changing a controlled input of type checkbox to be uncontrolled. Input elements should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled input element for the lifetime of the component
翻译过来就是:input组件变成非受控组件了
源码:

 

 排查后发现是 target形参没有加{}

正确代码: