From 65d1681a7bdc8f97531d6e1b27557cf261db9f95 Mon Sep 17 00:00:00 2001 From: dataeaseShu Date: Tue, 9 Apr 2024 16:32:10 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E4=BB=AA=E8=A1=A8=E6=9D=BF):=20=E5=9B=9E?= =?UTF-8?q?=E9=80=80=E6=B5=8B=E8=AF=95=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/core-frontend/src/views/dashboard/index.vue | 7 ++----- core/core-frontend/src/views/template-market/index.vue | 2 -- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/core/core-frontend/src/views/dashboard/index.vue b/core/core-frontend/src/views/dashboard/index.vue index a09c103963..8436f9ae28 100644 --- a/core/core-frontend/src/views/dashboard/index.vue +++ b/core/core-frontend/src/views/dashboard/index.vue @@ -152,11 +152,8 @@ onMounted(async () => { // 从模板新建 if (createType === 'template') { const deTemplateDataStr = wsCache.get(`de-template-data`) - let deTemplateData = JSON.parse(deTemplateDataStr) - // wsCache.delete('de-template-data') - if (!deTemplateData) { - deTemplateData = JSON.parse(localStorage.getItem('de-template-data-1')) - } + const deTemplateData = JSON.parse(deTemplateDataStr) + wsCache.delete('de-template-data') dvMainStore.setComponentData(JSON.parse(deTemplateData['componentData'])) dvMainStore.setCanvasStyle(JSON.parse(deTemplateData['canvasStyleData'])) dvMainStore.setCanvasViewInfo(deTemplateData['canvasViewInfo']) diff --git a/core/core-frontend/src/views/template-market/index.vue b/core/core-frontend/src/views/template-market/index.vue index 7005451619..7eeb865ad5 100644 --- a/core/core-frontend/src/views/template-market/index.vue +++ b/core/core-frontend/src/views/template-market/index.vue @@ -424,8 +424,6 @@ const apply = () => { const templateData = response.data // do create wsCache.set(`de-template-data`, JSON.stringify(templateData)) - wsCache.set(`de-template-data-2`, templateData) - localStorage.setItem('de-template-data-1', JSON.stringify(templateData)) const baseUrl = templateData.type === 'dataV' ? '#/dvCanvas?opt=create&createType=template'