From d4ab96d21375d735c4bda5e9fe7a468b46272aac Mon Sep 17 00:00:00 2001 From: ssongliu <73214554+ssongliu@users.noreply.github.com> Date: Tue, 19 Sep 2023 17:18:27 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=A7=A3=E5=86=B3=E9=83=A8=E5=88=86?= =?UTF-8?q?=E5=AE=B9=E5=99=A8=E5=88=9B=E5=BB=BA=E5=A4=B1=E8=B4=A5=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98=20(#2348)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../container/container/operate/index.vue | 20 ++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/frontend/src/views/container/container/operate/index.vue b/frontend/src/views/container/container/operate/index.vue index 7eb0a02c0..ec7b00aef 100644 --- a/frontend/src/views/container/container/operate/index.vue +++ b/frontend/src/views/container/container/operate/index.vue @@ -401,18 +401,20 @@ const onSubmit = async (formEl: FormInstance | undefined) => { dialogData.value.rowData!.labels = dialogData.value.rowData!.labelsStr.split('\n'); } dialogData.value.rowData!.cmd = []; - if (dialogData.value.rowData?.cmdStr.indexOf(`'`) !== -1) { - let itemCmd = dialogData.value.rowData!.cmdStr.split(`'`); - for (const cmd of itemCmd) { - if (cmd && cmd !== ' ') { + if (dialogData.value.rowData?.cmdStr) { + if (dialogData.value.rowData?.cmdStr.indexOf(`'`) !== -1) { + let itemCmd = dialogData.value.rowData!.cmdStr.split(`'`); + for (const cmd of itemCmd) { + if (cmd && cmd !== ' ') { + dialogData.value.rowData!.cmd.push(cmd); + } + } + } else { + let itemCmd = dialogData.value.rowData!.cmdStr.split(` `); + for (const cmd of itemCmd) { dialogData.value.rowData!.cmd.push(cmd); } } - } else { - let itemCmd = dialogData.value.rowData!.cmdStr.split(` `); - for (const cmd of itemCmd) { - dialogData.value.rowData!.cmd.push(cmd); - } } if (dialogData.value.rowData!.entrypointStr) { dialogData.value.rowData!.entrypoint = dialogData.value.rowData!.entrypointStr.split(' ');