class Demo extends Component {
handleSubmit = () => { // 如何在這個生命周期內使用 chart 對象
}
componentDidMount() { // 構建變更大圖
var chart = new G2.Chart({ container: 'dashboardChange', forceFit: true,
});
}
}
react 在 componentDidMount中的對象,在 handleSubmit 中使用?
一只斗牛犬
2018-09-02 11:26:15