在自定義組件中加個componentDidMount返回初始值就可以啦
componentDidMount() {
const { onChange } = this.props;
onChange({
...this.state,
});
}
在自定義組件中加個componentDidMount返回初始值就可以啦
componentDidMount() {
const { onChange } = this.props;
onChange({
...this.state,
});
}