Browse Source

style: 全局参数样式修改

pull/48/head
cp3hnu 1 year ago
parent
commit
85dc46765e
3 changed files with 31 additions and 28 deletions
  1. +1
    -1
      react-ui/src/pages/Pipeline/components/PropsLabel/index.tsx
  2. +11
    -9
      react-ui/src/pages/Pipeline/editPipeline/props.jsx
  3. +19
    -18
      react-ui/src/pages/Pipeline/editPipeline/props.less

+ 1
- 1
react-ui/src/pages/Pipeline/components/PropsLabel/index.tsx View File

@@ -27,7 +27,7 @@ function PropsLabel({ title, menuItems, onClick }: PropsLabelProps) {
menu={{ menu={{
items: menuItems, items: menuItems,
onClick: handleItemClick, onClick: handleItemClick,
triggerSubMenuAction: 'click',
triggerSubMenuAction: 'hover',
}} }}
trigger={['click']} trigger={['click']}
placement="topRight" placement="topRight"


+ 11
- 9
react-ui/src/pages/Pipeline/editPipeline/props.jsx View File

@@ -198,7 +198,7 @@ const Props = forwardRef(({ onParentChange }, ref) => {
afterOpenChange={afterOpenChange} afterOpenChange={afterOpenChange}
open={open} open={open}
width={520} width={520}
className={styles.editPipelineProps}
className={styles['pipeline-drawer']}
> >
<Form <Form
name="form" name="form"
@@ -215,7 +215,7 @@ const Props = forwardRef(({ onParentChange }, ref) => {
}} }}
autoComplete="off" autoComplete="off"
> >
<div className={styles.editPipelinePropsContent}>
<div className={styles['pipeline-drawer__title']}>
<SubAreaTitle image="/assets/images/static-message.png" title="基本信息"></SubAreaTitle> <SubAreaTitle image="/assets/images/static-message.png" title="基本信息"></SubAreaTitle>
</div> </div>
<Form.Item <Form.Item
@@ -242,20 +242,21 @@ const Props = forwardRef(({ onParentChange }, ref) => {
> >
<Input disabled /> <Input disabled />
</Form.Item> </Form.Item>
<div className={styles.editPipelinePropsContent}>
<div className={styles['pipeline-drawer__title']}>
<SubAreaTitle image="/assets/images/duty-message.png" title="任务信息"></SubAreaTitle> <SubAreaTitle image="/assets/images/duty-message.png" title="任务信息"></SubAreaTitle>
</div> </div>
<Form.Item label="镜像" required> <Form.Item label="镜像" required>
<div className={styles['ref-row']}>
<div className={styles['pipeline-drawer__ref-row']}>
<Form.Item name="image" noStyle rules={[{ required: true, message: '请输入镜像' }]}> <Form.Item name="image" noStyle rules={[{ required: true, message: '请输入镜像' }]}>
<Input placeholder="请输入或选择镜像" allowClear /> <Input placeholder="请输入或选择镜像" allowClear />
</Form.Item> </Form.Item>
<Form.Item noStyle> <Form.Item noStyle>
<Button <Button
type="link" type="link"
size="small"
icon={getSelectBtnIcon({ item_type: 'image' })} icon={getSelectBtnIcon({ item_type: 'image' })}
onClick={() => selectResource('image', { item_type: 'image' })} onClick={() => selectResource('image', { item_type: 'image' })}
className={styles['select-button']}
className={styles['pipeline-drawer__ref-row__select-button']}
> >
选择镜像 选择镜像
</Button> </Button>
@@ -368,7 +369,7 @@ const Props = forwardRef(({ onParentChange }, ref) => {
<Input placeholder={item.value.label} allowClear /> <Input placeholder={item.value.label} allowClear />
</Form.Item> </Form.Item>
))} ))}
<div className={styles.editPipelinePropsContent}>
<div className={styles['pipeline-drawer__title']}>
<SubAreaTitle image="/assets/images/duty-message.png" title="输入参数"></SubAreaTitle> <SubAreaTitle image="/assets/images/duty-message.png" title="输入参数"></SubAreaTitle>
</div> </div>
{inParametersList.map((item) => ( {inParametersList.map((item) => (
@@ -388,7 +389,7 @@ const Props = forwardRef(({ onParentChange }, ref) => {
} }
required={item.value.require ? true : false} required={item.value.require ? true : false}
> >
<div className={styles['ref-row']}>
<div className={styles['pipeline-drawer__ref-row']}>
<Form.Item <Form.Item
name={['in_parameters', item.key]} name={['in_parameters', item.key]}
noStyle noStyle
@@ -408,10 +409,11 @@ const Props = forwardRef(({ onParentChange }, ref) => {
{item.value.type === 'ref' && ( {item.value.type === 'ref' && (
<Form.Item noStyle> <Form.Item noStyle>
<Button <Button
size="small"
type="link" type="link"
icon={getSelectBtnIcon(item.value)} icon={getSelectBtnIcon(item.value)}
onClick={() => selectResource(['in_parameters', item.key], item.value)} onClick={() => selectResource(['in_parameters', item.key], item.value)}
className={styles['select-button']}
className={styles['pipeline-drawer__ref-row__select-button']}
> >
{item.value.label} {item.value.label}
</Button> </Button>
@@ -420,7 +422,7 @@ const Props = forwardRef(({ onParentChange }, ref) => {
</div> </div>
</Form.Item> </Form.Item>
))} ))}
<div className={styles.editPipelinePropsContent}>
<div className={styles['pipeline-drawer__title']}>
<SubAreaTitle image="/assets/images/duty-message.png" title="输出参数"></SubAreaTitle> <SubAreaTitle image="/assets/images/duty-message.png" title="输出参数"></SubAreaTitle>
</div> </div>
{outParametersList.map((item) => ( {outParametersList.map((item) => (


+ 19
- 18
react-ui/src/pages/Pipeline/editPipeline/props.less View File

@@ -1,4 +1,4 @@
.editPipelineProps {
.pipeline-drawer {
:global { :global {
label { label {
width: 100%; width: 100%;
@@ -8,29 +8,30 @@
} }
} }
} }
}


.editPipelinePropsContent {
display: flex;
align-items: center;
width: 100%;
height: 43px;
margin-bottom: 20px;
padding: 0 24px;
color: @text-color;
font-size: @font-size;
background: #f8fbff;
}
.ref-row {
display: flex;
align-items: center;
&__title {
display: flex;
align-items: center;
width: 100%;
height: 43px;
margin-bottom: 20px;
padding: 0 24px;
color: @text-color;
font-size: @font-size;
background: #f8fbff;
}

&__ref-row {
display: flex;
align-items: center;
}


.select-button {
&__select-button {
display: flex; display: flex;
flex: none; flex: none;
align-items: center; align-items: center;
justify-content: flex-start; justify-content: flex-start;
width: 100px;
// width: 100px;
margin-left: 10px; margin-left: 10px;
padding-right: 0; padding-right: 0;
padding-left: 0; padding-left: 0;


Loading…
Cancel
Save