📜  打字稿复选框事件 - 打字稿代码示例

📅  最后修改于: 2022-03-11 14:48:18.401000             🧑  作者: Mango

代码示例1
handleInputChange(event) {
        const target = event.target;
        const value = target.name === 'isGoing' ? target.checked : target.value;
        const name = target.name;
        this.setState({
          [name]: value
        });
      }