Problems in the use of dva-loading

  1. models/order.js is the model file of the component
  2. configure loading in index.js
import createLoading from "dva-loading"
app.use(createLoading({
    globale: false,
    models: {
        order: false
    }
}))

the problem is that there may be multiple interfaces in models/order.js, and multiple state, may have multiple components such as Table,Card in views/order. Each component uses the loading attribute, using mode

.
render(){
    const {loading} = this.props
    // ....
    return (
        <Table loading= {loading.global}/>
        <Card loading = {loading.global} />
    )
}

clipboard.png

if the API is called again in Card, the Card in region C is similar to Tab,Tab and will re-initiate the request when clicked. The problem is that when the Tab switch initiates the request, the loading in area An and B will be reset, from true to false. Please give us some advice on how to solve it. Thank you!

Mar.22,2021

loading can be refined into the effect, in each model, such as order model, where there are three effect, corresponding to the AMagi BMagol C region. The loading correspondence can be loading.effects ['order/fetchOrder'], loading.effects [' order/fetchOrderTran'], loading.effects ['order/fetchOrderOps']. So they don't affect each other.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e3466b-442ab.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e3466b-442ab.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?