mirror of
https://gitee.com/baidu/amis.git
synced 2024-12-02 03:48:13 +08:00
fix: 修复 log 的 source 是 api object 时不自动加载的问题 (#9509)
This commit is contained in:
parent
80610ec714
commit
7c79a84aa5
@ -161,11 +161,14 @@ export class Log extends React.Component<LogProps, LogState> {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
if (this.props.source) {
|
if (this.props.source) {
|
||||||
const ret = resolveVariableAndFilter(
|
const ret =
|
||||||
this.props.source,
|
typeof this.props.source === 'string'
|
||||||
this.props.data,
|
? resolveVariableAndFilter(
|
||||||
'| raw'
|
this.props.source,
|
||||||
);
|
this.props.data,
|
||||||
|
'| raw'
|
||||||
|
)
|
||||||
|
: this.props.source;
|
||||||
if (ret && isEffectiveApi(ret)) {
|
if (ret && isEffectiveApi(ret)) {
|
||||||
this.loadLogs();
|
this.loadLogs();
|
||||||
} else if (
|
} else if (
|
||||||
@ -187,11 +190,10 @@ export class Log extends React.Component<LogProps, LogState> {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const ret = resolveVariableAndFilter(
|
const ret =
|
||||||
this.props.source,
|
typeof this.props.source === 'string'
|
||||||
this.props.data,
|
? resolveVariableAndFilter(this.props.source, this.props.data, '| raw')
|
||||||
'| raw'
|
: this.props.source;
|
||||||
);
|
|
||||||
|
|
||||||
if (ret && isEffectiveApi(ret)) {
|
if (ret && isEffectiveApi(ret)) {
|
||||||
// todo 如果原来的请求还在,应该先取消
|
// todo 如果原来的请求还在,应该先取消
|
||||||
|
Loading…
Reference in New Issue
Block a user