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 @@