diff --git a/frontend/src/pages/Deploy/Deployment/List/components/styles.less b/frontend/src/pages/Deploy/Deployment/List/components/styles.less index 2db3025e..315b7db4 100644 --- a/frontend/src/pages/Deploy/Deployment/List/components/styles.less +++ b/frontend/src/pages/Deploy/Deployment/List/components/styles.less @@ -95,4 +95,24 @@ line-height: 1; content: '*'; } + + .monaco-editor { + border-radius: 2px; + border: 1px solid #d9d9d9; + } +} + +.fullscreen-modal { + :global { + .ant-modal { + max-width: 100vw; + margin: 0; + padding: 0; + top: 0 !important; + } + .ant-modal-content { + height: 100vh; + border-radius: 0; + } + } } \ No newline at end of file diff --git a/frontend/src/pages/Deploy/Deployment/List/index.tsx b/frontend/src/pages/Deploy/Deployment/List/index.tsx index d8ab8203..52738274 100644 --- a/frontend/src/pages/Deploy/Deployment/List/index.tsx +++ b/frontend/src/pages/Deploy/Deployment/List/index.tsx @@ -21,7 +21,7 @@ const CodePreviewModal: React.FC<{ }> = ({open, onCancel, code, language = 'shell'}) => { const [isFullscreen, setIsFullscreen] = useState(false); - // 当模态框打开或关闭时重置全屏状态 + // 当模态��打开或关闭时重置全屏状态 useEffect(() => { setIsFullscreen(false); }, [open]); @@ -44,15 +44,14 @@ const CodePreviewModal: React.FC<{ setIsFullscreen(false); }} footer={null} - width={isFullscreen ? "100%" : 800} + width={isFullscreen ? "100vw" : 800} + style={isFullscreen ? { + top: 0, + paddingBottom: 0 + } : undefined} + wrapClassName={isFullscreen ? 'fullscreen-modal' : undefined} styles={{ - body: { padding: 0 }, - content: isFullscreen ? { - top: 0, - maxWidth: '100%', - margin: 0, - paddingBottom: 0 - } : undefined + body: { padding: 0 } }} destroyOnClose >