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 {action} from '@formily/reactive'
|
||||
import request from '@/utils/request';
|
||||
import Editor from '@/components/Editor';
|
||||
|
||||
interface DeploymentConfigModalProps {
|
||||
open: boolean;
|
||||
@ -61,7 +62,8 @@ const DeploymentConfigModal: React.FC<DeploymentConfigModalProps> = ({
|
||||
FormItem,
|
||||
FormGrid,
|
||||
Input,
|
||||
ArrayTable
|
||||
ArrayTable,
|
||||
Editor
|
||||
},
|
||||
scope: {
|
||||
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}}"
|
||||
}
|
||||
},
|
||||
}
|
||||
},
|
||||
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