例如查询表格
@connect(({ rule, loading }) => ({
rule,
loading: loading.models.rule,
}))
@Form.create()
export default class TableList extends PureComponent {
....
这里loading只指向了一个model,可我同一route中可能会请求多个model,不知该怎么写?
Translation of this issue:
For example, the query form
@connect(({ rule, loading }) => ({
Rule,
Loading: loading.models.rule,
}))
@Form.create()
Export default class TableList extends PureComponent {
....
Here loading only points to a model, but I may request multiple models in the same route, I do not know how to write?
@nnzbz
loading.effects['form/submitAdvancedForm']
@ybning
试了不行,只有后面那个有效
@connect(({ rule, loading }) => ({
Rule,
Loading: loading.effects['xxxx/xxxx','rule/xxx'],
}))
@Form.create()
Export default class TableList extends PureComponent {
....
@nnzbz 需求场景细说下
一般实际一些的场景都是,比如说商品列表里要查出有哪些产品分类,员工列表要查出部门列表等等
loading: loading.effects['xxx/loading'] || loading.effects['xxx1/loading']
@nnzbz
@connect(({ project, activities, chart, loading }) => ({
project,
activities,
chart,
projectLoading: loading.effects['project/fetchNotice'],
activitiesLoading: loading.effects['activities/fetchList'],
}))
pro代码都有的,好好看看代码
Most helpful comment