react在新版本中,修改了对state的处理方式 解决办法:1.由于state设置在了作用域内部,引用时可以使用如代码20行的方式改变this指向修改state的值。 2.也可以使用setState设置