From c4e54b2f0fe8dacda9fdd4276860bbf09ba1b7ce Mon Sep 17 00:00:00 2001 From: ssongliu Date: Sat, 11 Mar 2023 17:53:47 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=AE=B9=E5=99=A8=E5=88=9B=E5=BB=BA?= =?UTF-8?q?=E6=B8=85=E7=A9=BA=E8=A1=A8=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../container/container/create/index.vue | 24 +++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/frontend/src/views/container/container/create/index.vue b/frontend/src/views/container/container/create/index.vue index c7e0e364d..d938c5a0a 100644 --- a/frontend/src/views/container/container/create/index.vue +++ b/frontend/src/views/container/container/create/index.vue @@ -237,13 +237,33 @@ const images = ref(); const volumes = ref(); const acceptParams = (): void => { + handlReset(); drawerVisiable.value = true; - form.restartPolicy = 'no'; - form.memoryUnit = 'MB'; loadImageOptions(); loadVolumeOptions(); }; +const handlReset = () => { + form.name = ''; + form.image = ''; + form.cmdStr = ''; + form.cmd = []; + form.publishAllPorts = false; + form.exposedPorts = []; + form.nanoCPUs = 1; + form.memory = 100; + form.memoryItem = 100; + form.memoryUnit = 'MB'; + form.cpuUnit = 'Core'; + form.volumes = []; + form.autoRemove = false; + form.labels = []; + form.labelsStr = ''; + form.env = []; + form.envStr = ''; + form.restartPolicy = 'no'; +}; + const handleClose = () => { drawerVisiable.value = false; };