import React, { Component } from 'react'
import { Checkbox } from 'antd';
import './levelcheck.scss'
export default class levelcheck extends Component {
formRef = React.createRef();
constructor(props) {
super(props)
this.state = {
checked: false
}
}
onChange = (item,e) => {
console.log(e,item)
this.setState({
checked: e.target.checked,
})
}
render() {
return (
<Checkbox checked={this.state.checked} onChange={(e)=>this.onChange('item',e)}>1111</Checkbox>
)
}
}
react 方法传递参数
最新推荐文章于 2024-07-21 18:07:43 发布