mirror of https://github.com/1Panel-dev/1Panel
fix: 容器创建中命令输入方式修改 (#561)
parent
2bd289defa
commit
cc51eaef3f
|
@ -452,7 +452,7 @@ const message = {
|
|||
containerPort: 'Container port',
|
||||
serverPort: 'Host port',
|
||||
cmd: 'Command',
|
||||
cmdHelper: 'one in a row, for example: \n/bin/bash \necho "hello"',
|
||||
cmdHelper: 'Example: echo "hello"',
|
||||
autoRemove: 'Auto remove',
|
||||
cpuQuota: 'NacosCPU',
|
||||
memoryLimit: 'Memory',
|
||||
|
|
|
@ -461,7 +461,7 @@ const message = {
|
|||
containerPort: '容器端口',
|
||||
serverPort: '服务器端口',
|
||||
cmd: '启动命令',
|
||||
cmdHelper: '一行一个,例:\n/bin/bash \necho "hello"',
|
||||
cmdHelper: '例:echo "hello"',
|
||||
autoRemove: '容器退出后自动删除容器',
|
||||
cpuQuota: 'CPU 限制',
|
||||
memoryLimit: '内存限制',
|
||||
|
|
|
@ -71,12 +71,7 @@
|
|||
</el-card>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('container.cmd')" prop="cmdStr">
|
||||
<el-input
|
||||
type="textarea"
|
||||
:placeholder="$t('container.cmdHelper')"
|
||||
:autosize="{ minRows: 2, maxRows: 4 }"
|
||||
v-model="form.cmdStr"
|
||||
/>
|
||||
<el-input :placeholder="$t('container.cmdHelper')" v-model="form.cmdStr" />
|
||||
</el-form-item>
|
||||
<el-form-item prop="autoRemove">
|
||||
<el-checkbox v-model="form.autoRemove">{{ $t('container.autoRemove') }}</el-checkbox>
|
||||
|
@ -330,7 +325,7 @@ const onSubmit = async (formEl: FormInstance | undefined) => {
|
|||
form.labels = form.labelsStr.split('\n');
|
||||
}
|
||||
if (form.cmdStr.length !== 0) {
|
||||
form.cmd = form.cmdStr.split('\n');
|
||||
form.cmd = form.cmdStr.split(' ');
|
||||
}
|
||||
switch (form.memoryUnit) {
|
||||
case 'KB':
|
||||
|
|
Loading…
Reference in New Issue