1
This commit is contained in:
parent
9118e9dfd9
commit
d0c5e56266
@ -7,6 +7,7 @@ import {createForm, Field, FieldDataSource, onFormInit} from '@formily/core'
|
|||||||
import {createSchemaField, FormProvider, ISchema} from '@formily/react'
|
import {createSchemaField, FormProvider, ISchema} from '@formily/react'
|
||||||
import {action} from '@formily/reactive'
|
import {action} from '@formily/reactive'
|
||||||
import request from '@/utils/request';
|
import request from '@/utils/request';
|
||||||
|
import Editor from '@/components/Editor';
|
||||||
|
|
||||||
interface DeploymentConfigModalProps {
|
interface DeploymentConfigModalProps {
|
||||||
open: boolean;
|
open: boolean;
|
||||||
@ -61,7 +62,8 @@ const DeploymentConfigModal: React.FC<DeploymentConfigModalProps> = ({
|
|||||||
FormItem,
|
FormItem,
|
||||||
FormGrid,
|
FormGrid,
|
||||||
Input,
|
Input,
|
||||||
ArrayTable
|
ArrayTable,
|
||||||
|
Editor
|
||||||
},
|
},
|
||||||
scope: {
|
scope: {
|
||||||
useAsyncDataSource
|
useAsyncDataSource
|
||||||
@ -185,7 +187,7 @@ const DeploymentConfigModal: React.FC<DeploymentConfigModalProps> = ({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"description": "{{$self.dataSource && $self.value ? ($self.dataSource.find(item => item.value === $self.value)?.extra?.description) : undefined}}"
|
"description": "{{$self.dataSource && $self.value ? ($self.dataSource.find(item => item.value === $self.value)?.extra?.description) : undefined}}"
|
||||||
}
|
},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
environmentVariables: {
|
environmentVariables: {
|
||||||
@ -312,6 +314,35 @@ const DeploymentConfigModal: React.FC<DeploymentConfigModalProps> = ({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
script: {
|
||||||
|
type: 'string',
|
||||||
|
title: '脚本内容',
|
||||||
|
'x-decorator': 'FormItem',
|
||||||
|
'x-decorator-props': {
|
||||||
|
labelCol: 24,
|
||||||
|
wrapperCol: 24,
|
||||||
|
layout: 'vertical',
|
||||||
|
colon: false,
|
||||||
|
labelAlign: 'left',
|
||||||
|
style: {
|
||||||
|
marginBottom: '16px'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
'x-component': 'Editor',
|
||||||
|
'x-component-props': {
|
||||||
|
height: '300px',
|
||||||
|
language: 'shell',
|
||||||
|
theme: 'vs-dark',
|
||||||
|
options: {
|
||||||
|
minimap: { enabled: false },
|
||||||
|
scrollBeyondLastLine: false,
|
||||||
|
fontSize: 14,
|
||||||
|
lineNumbers: 'on',
|
||||||
|
automaticLayout: true,
|
||||||
|
tabSize: 2
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user