mirror of
https://gitee.com/baidu/amis.git
synced 2024-12-05 05:18:34 +08:00
优化 api 检测
This commit is contained in:
parent
efe149ad19
commit
a5f2a5298b
@ -124,11 +124,7 @@ export class Chart extends React.Component<ChartProps> {
|
||||
|
||||
if (query) {
|
||||
return this.receive(query);
|
||||
} else if (!env || !env.fetcher || !api) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!isEffectiveApi(api, store.data)) {
|
||||
} else if (!env || !env.fetcher || !isEffectiveApi(api, store.data)) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -102,7 +102,7 @@ export default class ChainedSelectControl extends React.Component<ChainedSelectP
|
||||
stack
|
||||
}, () => {
|
||||
env
|
||||
.fetcher(source, {
|
||||
.fetcher(source as Api, {
|
||||
...data,
|
||||
value: arr,
|
||||
level: idx + 1,
|
||||
|
@ -120,7 +120,7 @@ export default class Navigation extends React.Component<NavigationProps, Navigat
|
||||
return;
|
||||
}
|
||||
|
||||
env.fetcher(source, finalData)
|
||||
env.fetcher(source as Api, finalData)
|
||||
.then(payload => {
|
||||
if (!this.mounted) {
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user