需要深拷贝重新赋值 const [data, setData]: any = useState(); data.a = 'a' setData(JSON.parse(JSON.stringify(data)))