摘要: 语法:onclick = {this.函数名} onClick = {this.yourEvent} 事件类型 onClick onChange onSubmit 绑定this方式 第一种:onClick = {this.yourEvent} 需要在构造函数中绑定this第二种:onClick = 阅读全文
posted @ 2020-12-16 15:34 听声是雨 阅读(1279) 评论(0) 推荐(0) 编辑
摘要: 我们可以从封装时钟的外观开始: function Clock(props) { return ( <div> <h1>Hello, world!</h1> <h2>It is {props.date.toLocaleTimeString()}.</h2> </div> ); } function t 阅读全文
posted @ 2020-12-16 13:28 听声是雨 阅读(183) 评论(0) 推荐(0) 编辑