From ee5e4c19fe309d996d2cc06bcd9c642179eef5e6 Mon Sep 17 00:00:00 2001 From: sws <1141121512@qq.com> Date: Fri, 6 Sep 2024 18:04:00 +0800 Subject: [PATCH] =?UTF-8?q?1.=E8=A7=A3=E5=86=B3=E6=B8=85=E7=A9=BA=E5=90=8E?= =?UTF-8?q?=E5=8F=8C=E5=90=91=E7=BB=91=E5=AE=9A=E5=A4=B1=E6=95=88=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/footer-nav/index.vue | 1 + src/views/layout/components/main/index.vue | 4 +++- src/views/layout/index.vue | 7 ++++++- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/components/footer-nav/index.vue b/src/components/footer-nav/index.vue index 1530f4a9..3969b347 100644 --- a/src/components/footer-nav/index.vue +++ b/src/components/footer-nav/index.vue @@ -48,6 +48,7 @@ const nav_style = ref(0); watch( () => props.footerData, (newVal, oldValue) => { + console.log('footer-nav-index:', newVal); const new_content = newVal?.content || {}; const new_style = newVal?.style || {}; nav_content.value = new_content?.nav_content || []; diff --git a/src/views/layout/components/main/index.vue b/src/views/layout/components/main/index.vue index 24c41b61..5e31fbe3 100644 --- a/src/views/layout/components/main/index.vue +++ b/src/views/layout/components/main/index.vue @@ -218,8 +218,10 @@ watch( watch( () => props.footer, (newValue) => { + console.log('main:', newValue); footer_nav.value = newValue; - } + }, + { deep: true } ); const top_padding = ref(90); const top_margin = ref(0); diff --git a/src/views/layout/index.vue b/src/views/layout/index.vue index 21153754..8f2d7729 100644 --- a/src/views/layout/index.vue +++ b/src/views/layout/index.vue @@ -118,7 +118,12 @@ const export_data_event = () => { // 清空数据 const clear_data_event = () => { let new_tem_form = cloneDeep(temp_form.value); - form.value = new_tem_form; + form.value.header.show_tabs = '1'; + form.value.footer.show_tabs = '0'; + form.value.header.com_data = new_tem_form.header.com_data; + form.value.footer.com_data = new_tem_form.footer.com_data; + form.value.diy_data = []; + diy_data_item.value = new_tem_form.header; }; //#region 页面初始化数据 ---------------------start // 页面加载