react+react-sage+react-redux+react-router
Table中loading如果使用saga不好处理,可以这样做
<Table className="table"
columns={this.columns}
loading={this.getLoading()}
dataSource={this.getDataSource()}
rowKey="id"
pagination={false} />
componentDidMount() {
this.fetchData();
}
getLoading() {
return this.props.dataSource == null;
}
getDataSource() {
if (this.props.dataSource == null) {
return [];
}
len = this.props.dataSource.length;
return this.props.dataSource;
}
fetchData = ()=>{
this.props.fetchAll();
}
不使用Table中pagination,不好用,使用单独的组件Pagination
<Table className="table"
columns={this.columns}
loa