From 95f21aaf2fea6e89d6e8e0efcfbbd2991235bb39 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BA=8E=E8=82=96=E7=A3=8A?= <18851179580@163.com> Date: Mon, 4 Aug 2025 17:06:42 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=97=A5=E5=BF=97=E4=BF=A1?= =?UTF-8?q?=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/model-tabs-magic/index.vue | 1 - src/views/layout/components/main/index.vue | 1 - src/views/layout/index.vue | 8 ++++---- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/components/model-tabs-magic/index.vue b/src/components/model-tabs-magic/index.vue index 353763e9..0f23e0e2 100644 --- a/src/components/model-tabs-magic/index.vue +++ b/src/components/model-tabs-magic/index.vue @@ -166,7 +166,6 @@ const swiper_bg_style = computed(() => { // 轮播更新背景图 const swiper_bg_img_style = computed(() => { if (tabs_magic_type.value == 'carousel') { - console.log(tabs_magic_value.value); const { carousel_img, style = {} } = tabs_magic_value.value.content?.carousel_list[actived_index.value] || {}; // 如果是自定义的图片 判断图片是否存在 if (!isEmpty(carousel_img) && style?.background_type == 'carousel') { diff --git a/src/views/layout/components/main/index.vue b/src/views/layout/components/main/index.vue index 17942c07..4d7640bd 100644 --- a/src/views/layout/components/main/index.vue +++ b/src/views/layout/components/main/index.vue @@ -527,7 +527,6 @@ onMounted(async () => { const interval = setInterval(() => { // 获取分类 if (common_store.common.module_list.length > 0) { - console.log(common_store.common.module_list); common_store.common.module_list.forEach((item, index) => { if (index == 0) { item.data.push({key: 'tabs-magic', name: '选项卡魔方'}); diff --git a/src/views/layout/index.vue b/src/views/layout/index.vue index eecbf345..49f272aa 100644 --- a/src/views/layout/index.vue +++ b/src/views/layout/index.vue @@ -273,6 +273,7 @@ const save_formmat_form_data = (data: diy_data_item, close: boolean = false, is_ // 选项卡数据更新 clone_form.tabs_data = clone_form.tabs_data.map((item: any) => { if (['tabs-magic'].includes(item.key)) { + item.com_data.content.tabs_active_index = 0; // 获取所有组件名称 const all_type = ['hot_zone', 'custom', 'img_magic', 'goods_magic', 'goods_list', 'article_list', 'nav_group', 'video', 'carousel']; // 将数据信息合并起来 @@ -286,17 +287,16 @@ const save_formmat_form_data = (data: diy_data_item, close: boolean = false, is_ // 自定义数据处理 custom_data_processing(item1[item1.magic_type].content); } - item = Object.keys(item1) + item1 = Object.keys(item1) .filter(key => !all_type.filter((item2: string) => item2 !== item1.magic_type).includes(key)) .reduce((acc: Record, key: string) => { acc[key] = item1[key]; return acc; }, {}); - console.log(item); }); // 处理完成之后拆分开 - item.home_data = new_data_list.length > 0 ? new_data_list[0] : null; - item.tabs_list = new_data_list.slice(1, new_data_list.length); + item.com_data.content.home_data = new_data_list.length > 0 ? new_data_list[0] : null; + item.com_data.content.tabs_list = new_data_list.slice(1, new_data_list.length); } return { ...item,