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) {
|
||||
const ret = resolveVariableAndFilter(
|
||||
const ret =
|
||||
typeof this.props.source === 'string'
|
||||
? resolveVariableAndFilter(
|
||||
this.props.source,
|
||||
this.props.data,
|
||||
'| raw'
|
||||
);
|
||||
)
|
||||
: this.props.source;
|
||||
if (ret && isEffectiveApi(ret)) {
|
||||
this.loadLogs();
|
||||
} else if (
|
||||
@ -187,11 +190,10 @@ export class Log extends React.Component<LogProps, LogState> {
|
||||
return;
|
||||
}
|
||||
|
||||
const ret = resolveVariableAndFilter(
|
||||
this.props.source,
|
||||
this.props.data,
|
||||
'| raw'
|
||||
);
|
||||
const ret =
|
||||
typeof this.props.source === 'string'
|
||||
? resolveVariableAndFilter(this.props.source, this.props.data, '| raw')
|
||||
: this.props.source;
|
||||
|
||||
if (ret && isEffectiveApi(ret)) {
|
||||
// todo 如果原来的请求还在,应该先取消
|
||||
|
Loading…
Reference in New Issue
Block a user