This commit is contained in:
asp_ly 2025-01-17 21:31:32 +08:00
parent d0c5e56266
commit 7c2d7ef1bc

View File

@ -1,5 +1,5 @@
import React from 'react'; import React from 'react';
import {Modal} from 'antd'; import {Modal, Button} from 'antd';
import type {DeploymentConfig} from '../types'; import type {DeploymentConfig} from '../types';
import './styles.less'; import './styles.less';
import {FormButtonGroup, FormItem, Select, Submit, FormGrid, Input, ArrayTable} from '@formily/antd-v5' import {FormButtonGroup, FormItem, Select, Submit, FormGrid, Input, ArrayTable} from '@formily/antd-v5'
@ -217,7 +217,9 @@ const DeploymentConfigModal: React.FC<DeploymentConfigModalProps> = ({
pagination: { pageSize: 10 }, pagination: { pageSize: 10 },
scroll: { x: '100%' }, scroll: { x: '100%' },
style: { style: {
minHeight: '120px' minHeight: '160px',
maxHeight: '240px',
overflow: 'auto'
} }
}, },
items: { items: {
@ -331,7 +333,7 @@ const DeploymentConfigModal: React.FC<DeploymentConfigModalProps> = ({
}, },
'x-component': 'Editor', 'x-component': 'Editor',
'x-component-props': { 'x-component-props': {
height: '300px', height: '240px',
language: 'shell', language: 'shell',
theme: 'vs-dark', theme: 'vs-dark',
options: { options: {
@ -366,16 +368,20 @@ const DeploymentConfigModal: React.FC<DeploymentConfigModalProps> = ({
title="部署配置" title="部署配置"
open={open} open={open}
onCancel={onCancel} onCancel={onCancel}
onOk={handleSubmit}
width={800} width={800}
styles={{ centered
body: { footer={[
padding: '32px' <Button key="cancel" onClick={onCancel}>
},
header: { </Button>,
marginBottom: '8px', <Button key="submit" type="primary" onClick={() => form.submit()}>
paddingInline: '32px'
} </Button>
]}
bodyStyle={{
padding: '24px',
maxHeight: '80vh',
overflow: 'auto'
}} }}
> >
<FormProvider form={form}> <FormProvider form={form}>