From 0cac9e63c68558909f7f99154c17f16f9bfc47fd Mon Sep 17 00:00:00 2001 From: hcong <1050828145@qq.com> Date: 星期三, 20 十一月 2024 17:54:36 +0800 Subject: [PATCH] fixme 子组件初始化时机问题 --- src/views/fysp/check/components/CompProblemCard.vue | 11 +++++++++-- 1 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/views/fysp/check/components/CompProblemCard.vue b/src/views/fysp/check/components/CompProblemCard.vue index e599f5c..d97b17b 100644 --- a/src/views/fysp/check/components/CompProblemCard.vue +++ b/src/views/fysp/check/components/CompProblemCard.vue @@ -139,6 +139,7 @@ :subtask="subtask" :topTask="topTask" ref="compProblemAddOrUpdRef" + @cancel="onProCanceled" @submit="onProSubmited" /> <!-- 鏁存敼 --> @@ -151,6 +152,7 @@ :subtask="subtask" :month="month" :oldChangeFileList="problem.mediafileList" + @cancel="onChangeCanceled" @submit="onChangeSubmited" /> <!-- 闂澶嶇幇 --> @@ -173,7 +175,7 @@ import CompProRecent from './CompProRecent.vue'; import { useCloned } from '@vueuse/core'; export default { - emits: ['submmit'], + emits: ['submmit', 'cancel'], components: { CompProblemAddOrUpd, ComChangeEdit, @@ -210,7 +212,6 @@ default: 1 } }, - emits: ['submit', 'updated'], data() { return { changeDialogVisible: false, @@ -282,10 +283,16 @@ } }, methods: { + onProCanceled() { + this.proAddOrUpdDialogVisible = false; + }, onProSubmited(isOk) { this.$emit('submit', isOk); this.proAddOrUpdDialogVisible = false; }, + onChangeCanceled() { + this.changeDialogVisible = false; + }, onChangeSubmited(isOk) { this.$emit('submit', isOk); this.changeDialogVisible = false; -- Gitblit v1.9.3