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