antd plus data loading progress bar

The effect is shown in the figure

How to achieve this effect

A loading parameter is included in the method of model returning data

...
const mapStateToProps=({users,loading})=>{
    console.log("loading",loading);
    return {
        users,
        userListLoading:loading.models.users
    }
}
export  default  connect(mapStateToProps)(index);
...

 Pass this loading parameter to the loading property of the table component

...

const index=({users,dispatch,userListLoading})=>{

...

  return (
        <div className="list-table">
           ...
            <Table columns={columns} dataSource={users.data} rowKey='id' loading={userListLoading}/>
           ...
        </div>
    );
};

 

Guess you like

Origin blog.csdn.net/chendongpu/article/details/111655803