class组件constructor方法 https://blog.csdn.net/m0_37557930/article/details/116228217 https://blog.csdn.net/qq_39207948/article/details/113143131 为何我们使用子类继承父类,就必须在 constructor( ) 方法中调用 super( ) 方法,否则新建实例时会报错?但是react里并不会。