style: 调整Loading参数,修改开放平台单页容器高度

release/desktop
moonrailgun 3 years ago
parent 08fded7952
commit 609b2fc6ab

@ -46,7 +46,7 @@ const OpenApiMainPanel: React.FC = React.memo(() => {
};
return (
<Loading spinning={loading}>
<Loading spinning={loading} style={{ height: '100%' }}>
<div className="plugin-openapi-main-panel">
{appInfo ? (
<OpenAppInfoProvider appInfo={appInfo} refresh={refresh}>

@ -1,14 +1,17 @@
import clsx from 'clsx';
import React from 'react';
import { LoadingSpinner } from './LoadingSpinner';
interface LoadingProps {
spinning: boolean;
className?: string;
style?: React.CSSProperties;
}
export const Loading: React.FC<LoadingProps> = React.memo((props) => {
const { spinning = false } = props;
const { spinning = false, className, style } = props;
return (
<div className="relative">
<div className={clsx('relative', className)} style={style}>
{spinning && (
<div className="absolute inset-0 z-10 bg-white bg-opacity-20 flex justify-center items-center">
<LoadingSpinner />

Loading…
Cancel
Save