react 组件的构造函数 constructor 函数时组件最先执行的函数class childen extends react.Component{ constructor(props){ super(props); this.state={ attr1:"", } }}一般在constructor函数中都会存在 ... JavaScript 2023-12-05 132 点赞 2 评论 200 浏览