From de9e304dd4835ffaf653c926d2ad30a39372cbae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A5=94=E8=B7=91=E7=9A=84=E9=9D=A2=E6=9D=A1?= <1262327911@qq.com> Date: Tue, 20 Dec 2022 17:05:13 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E4=BC=98=E5=8C=96=E5=8A=A0=E8=BD=BD?= =?UTF-8?q?=E8=BF=9B=E5=BA=A6=E6=9D=A1=E4=BD=93=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/chart/ContentLoad/index.vue | 7 +++++++ src/views/chart/hooks/useSync.hook.ts | 1 - 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/views/chart/ContentLoad/index.vue b/src/views/chart/ContentLoad/index.vue index 6b7905a5..2b7f46cf 100644 --- a/src/views/chart/ContentLoad/index.vue +++ b/src/views/chart/ContentLoad/index.vue @@ -26,6 +26,13 @@ const themeColor = computed(() => { watch( () => chartLayoutStore.getPercentage, newValue => { + if (newValue === 0) { + setTimeout(() => { + percentage.value = newValue + showModal.value = false + }, 500); + return + } percentage.value = newValue showModal.value = newValue > 0 } diff --git a/src/views/chart/hooks/useSync.hook.ts b/src/views/chart/hooks/useSync.hook.ts index ac006245..a0783962 100644 --- a/src/views/chart/hooks/useSync.hook.ts +++ b/src/views/chart/hooks/useSync.hook.ts @@ -155,7 +155,6 @@ export const useSync = () => { if (key === ChartEditStoreEnum.COMPONENT_LIST) { let loadIndex = 0 const listLength = projectData[key].length; - console.log(listLength) for (const comItem of projectData[key]) { // 设置加载数量 let percentage = parseInt((parseFloat(`${++loadIndex / listLength}`) * 100).toString())