fix: 删除无用代码, 解决 ts 编译报错

This commit is contained in:
力皓 2020-12-10 10:58:48 +08:00
parent 3e99232af9
commit 1f241eafc7
2 changed files with 18 additions and 19 deletions

View File

@ -114,23 +114,23 @@ export default class BlockRenderer extends BaseRenderer {
</AppContext.Provider> </AppContext.Provider>
); );
if (autoLoading || loading !== undefined) { // if (autoLoading || loading !== undefined) {
return ( // return (
<Loading // <Loading
size="medium" // size="medium"
visible={!!(this.__showPlaceholder || loading)} // visible={!!(this.__showPlaceholder || loading)}
style={{ // style={{
height: this.__showPlaceholder ? defaultHeight : 'auto', // height: this.__showPlaceholder ? defaultHeight : 'auto',
display: 'block', // display: 'block',
...style, // ...style,
}} // }}
className={classnames('luna-block', getFileCssName(__schema.fileName), className, this.props.className)} // className={classnames('luna-block', getFileCssName(__schema.fileName), className, this.props.className)}
id={id} // id={id}
> // >
{!this.__showPlaceholder && renderContent()} // {!this.__showPlaceholder && renderContent()}
</Loading> // </Loading>
); // );
} // }
return ( return (
<div <div

View File

@ -106,9 +106,8 @@ export interface ProjectSchema {
constants?: JSONObject; constants?: JSONObject;
css?: string; css?: string;
dataSource?: DataSource; dataSource?: DataSource;
config?: AppConfig; config?: AppConfig | Record<string, any>;
id?: string; id?: string;
config?: Record<string, any>;
meta?: Record<string, any>; meta?: Record<string, any>;
} }