From 6da38ee166106ddcb7c8d94da370703659d318b6 Mon Sep 17 00:00:00 2001 From: ssongliu <73214554+ssongliu@users.noreply.github.com> Date: Mon, 24 Jun 2024 16:58:43 +0800 Subject: [PATCH] =?UTF-8?q?pref:=20=E4=BC=98=E5=8C=96=E5=AE=B9=E5=99=A8?= =?UTF-8?q?=E7=BC=96=E6=8E=92=E5=88=9B=E5=BB=BA=E3=80=81=E9=95=9C=E5=83=8F?= =?UTF-8?q?=E6=8B=89=E5=8F=96=E7=AD=89=E5=89=8D=E7=AB=AF=E9=80=BB=E8=BE=91?= =?UTF-8?q?=20(#5553)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Refs #5523 --- .../views/container/compose/create/index.vue | 24 +++++++++++++++---- .../src/views/container/image/build/index.vue | 21 +++++++++++----- .../src/views/container/image/pull/index.vue | 24 ++++++++++++------- .../src/views/container/image/push/index.vue | 21 ++++++++++++---- 4 files changed, 68 insertions(+), 22 deletions(-) diff --git a/frontend/src/views/container/compose/create/index.vue b/frontend/src/views/container/compose/create/index.vue index 5c7b96485..ad1d4e83b 100644 --- a/frontend/src/views/container/compose/create/index.vue +++ b/frontend/src/views/container/compose/create/index.vue @@ -15,7 +15,7 @@ - + {{ $t('commons.button.edit') }} {{ $t('container.pathSelect') }} {{ $t('container.composeTemplate') }} @@ -23,6 +23,7 @@ @@ -32,7 +33,7 @@ - + - + @@ -59,6 +60,7 @@ {{ $t('commons.button.log') }} {{ $t('commons.button.cancel') }} - + {{ $t('commons.button.confirm') }} @@ -127,6 +129,7 @@ const baseDir = ref(); const composeFile = ref(); let timer: NodeJS.Timer | null = null; const logRef = ref(); +const isStartReading = ref(false); const isReading = ref(); const logConfig = reactive({ @@ -162,6 +165,7 @@ const acceptParams = (): void => { form.template = null; loadTemplates(); loadPath(); + isStartReading.value = false; }; const emit = defineEmits<{ (e: 'search'): void }>(); @@ -219,6 +223,17 @@ const changePath = async () => { type FormInstance = InstanceType; const formRef = ref(); +const onEdit = (item: string) => { + if (item === 'template') { + changeTemplate(); + } + if (item === 'form') { + changeFrom(); + } + if (!isReading.value && isStartReading.value) { + isStartReading.value = false; + } +}; const onSubmit = async (formEl: FormInstance | undefined) => { if (!formEl) return; formEl.validate(async (valid) => { @@ -237,6 +252,7 @@ const onSubmit = async (formEl: FormInstance | undefined) => { .then((res) => { logConfig.name = res.data; loadLogs(); + isStartReading.value = true; }) .catch(() => { loading.value = false; diff --git a/frontend/src/views/container/image/build/index.vue b/frontend/src/views/container/image/build/index.vue index 0e4e2dac4..6174d92c5 100644 --- a/frontend/src/views/container/image/build/index.vue +++ b/frontend/src/views/container/image/build/index.vue @@ -17,13 +17,14 @@ - + {{ $t('commons.button.edit') }} {{ $t('container.pathSelect') }} - + @@ -47,6 +48,7 @@ @@ -68,7 +71,7 @@