mirror of
https://gitee.com/baidu/amis.git
synced 2024-11-29 18:48:45 +08:00
fix: 调整冗余代码
This commit is contained in:
parent
6bb19a2e9e
commit
e41f8d9ade
@ -354,7 +354,7 @@ export function withRemoteConfig<P = any>(
|
||||
} else {
|
||||
store.setConfig(source, config, 'syncConfig');
|
||||
}
|
||||
} else if (isObject(source) && !isEffectiveApi(source, data)) {
|
||||
} else if (isObject(source) && !source.method) {
|
||||
store.setConfig(source, config, 'syncConfig');
|
||||
}
|
||||
}
|
||||
|
@ -201,12 +201,6 @@ const TimelineWithRemoteConfig = withRemoteConfig({
|
||||
class extends React.Component<
|
||||
RemoteOptionsProps & React.ComponentProps<typeof TimelineCmpt>
|
||||
> {
|
||||
componentDidMount() {
|
||||
const {source, updateConfig, config} = this.props;
|
||||
if (typeof source === 'object' && !source.url && config) {
|
||||
updateConfig(undefined);
|
||||
}
|
||||
}
|
||||
componentDidUpdate(prevProps: any) {
|
||||
const {source, updateConfig, config} = this.props;
|
||||
// 当source为空时,需要重置config
|
||||
|
Loading…
Reference in New Issue
Block a user