From 08a6be949941a3f22399473ebb022b0e957d821d Mon Sep 17 00:00:00 2001 From: kuaifan Date: Fri, 10 Feb 2023 15:41:24 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=A0=8F=E7=9B=AE=E5=86=85=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E4=BB=BB=E5=8A=A1=E5=BA=94=E8=AF=A5=E7=9B=B4=E6=8E=A5?= =?UTF-8?q?=E5=BD=92=E5=B1=9E=E6=AD=A4=E6=A0=8F=E7=9B=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- resources/assets/js/pages/manage/components/TaskAdd.vue | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/resources/assets/js/pages/manage/components/TaskAdd.vue b/resources/assets/js/pages/manage/components/TaskAdd.vue index 470ee3055..186f007eb 100644 --- a/resources/assets/js/pages/manage/components/TaskAdd.vue +++ b/resources/assets/js/pages/manage/components/TaskAdd.vue @@ -224,6 +224,7 @@ export default { timeOptions: {shortcuts:$A.timeOptionShortcuts()}, loadIng: 0, + isMounted: false, beforeClose: [], } @@ -233,6 +234,7 @@ export default { this.initCascaderData(); await this.initProjectData(); this.$nextTick(() => this.$refs.input.focus()) + this.isMounted = true }, beforeDestroy() { @@ -452,6 +454,11 @@ export default { }, setData(data) { + if (!this.isMounted) { + this.__setData && clearTimeout(this.__setData) + this.__setData = setTimeout(_ => this.setData(data) , 10) + return + } if (typeof data.beforeClose !== "undefined") { this.beforeClose.push(data.beforeClose) delete data.beforeClose;