ZhengXingchi / ZhengXingchi.github.io

Apache License 2.0
0 stars 0 forks source link

antdpro #76

Open ZhengXingchi opened 4 years ago

ZhengXingchi commented 4 years ago

dva-loading

1:请求前,loading 为:

laoding: {
    effects: {}
    global: false
    models: {}
}

请求前,global 为 false,effects 和 models 为空对象

2:请求中,loading 为:

loading: {
    effects: {users/user/fetch: true}
    global: true
    models: {users: true}
}

global 为 true;
effects 的 key 为 dispatch 的 type 值,value 为 true;
models 的 key 为 namespace 值,value 为 true;

3:请求完成,loading 为:

loading: {
    effects: {users/user/fetch: false}
    global: false
    models: {users: false}
}

global 为 false;
effects 的 key 为 dispatch 的 type 值,value 为 false;
models 的 key 为 namespace 值,value 为 false;