xxx
This commit is contained in:
+3
-3
@@ -1,7 +1,7 @@
|
||||
<!--
|
||||
* @Author: chenxuan
|
||||
* @Date: 2022-01-02 21:23:11
|
||||
* @LastEditTime: 2022-01-02 22:31:28
|
||||
* @LastEditTime: 2022-03-28 23:24:12
|
||||
* @LastEditors: chenxuan
|
||||
-->
|
||||
<!DOCTYPE html>
|
||||
@@ -18,7 +18,7 @@
|
||||
<script src="../package/old/babel.min.js"></script>
|
||||
<script type="text/babel">
|
||||
class Demo extends React.Component{
|
||||
haha=()=>{
|
||||
haha1=()=>{
|
||||
const {haha}=this;
|
||||
alert(haha.value);
|
||||
}
|
||||
@@ -27,7 +27,7 @@
|
||||
<div>
|
||||
{/*这种内联函数,更新会多次调用 时有bug */}
|
||||
<input type="text" ref={c=>this.haha=c}/>
|
||||
<button onClick={this.haha}>点我</button>
|
||||
<button onClick={this.haha1}>点我</button>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
<!--
|
||||
* @Author: chenxuan
|
||||
* @Date: 2022-01-09 18:31:06
|
||||
* @LastEditTime: 2022-01-09 23:05:36
|
||||
* @LastEditTime: 2022-03-28 22:49:23
|
||||
* @LastEditors: chenxuan
|
||||
-->
|
||||
<!DOCTYPE html>
|
||||
|
||||
Reference in New Issue
Block a user