bug1
一定要记得改变this指向,否则调用时this不再指向实例而是调用的上下文。
This.handleChange = this.handleChange.bind(this);

bug2
同样的代码莫名其妙就是没行,复制粘贴到通义千问,再复制回来居然就行了,prompt是"编写代码使得这段代码生效"
一定要记得改变this指向,否则调用时this不再指向实例而是调用的上下文。
This.handleChange = this.handleChange.bind(this);
同样的代码莫名其妙就是没行,复制粘贴到通义千问,再复制回来居然就行了,prompt是"编写代码使得这段代码生效"