mirror of
https://gitee.com/baidu/amis.git
synced 2024-11-30 11:07:52 +08:00
优化 api 检测
This commit is contained in:
parent
651b29f605
commit
ed5948d76d
@ -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