From a646b06e1f75b8fd5f45a582b5e81beb6a8aa35e 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 16:51:45 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E9=A1=B5=E9=9D=A2=E6=98=BE?=
=?UTF-8?q?=E7=A4=BA=E9=80=BB=E8=BE=91?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/components/model-carousel/index.vue | 6 ++--
.../model-float-window-content.vue | 2 ++
src/views/layout/index.vue | 36 ++++++++++++++++++-
3 files changed, 40 insertions(+), 4 deletions(-)
diff --git a/src/components/model-carousel/index.vue b/src/components/model-carousel/index.vue
index 63cb3ae7..79af82df 100644
--- a/src/components/model-carousel/index.vue
+++ b/src/components/model-carousel/index.vue
@@ -271,7 +271,7 @@ watch(() => new_style.value.common_style, () => {
}, {deep: true});
const swiper_bg_style = computed(() => {
- if (props.isNest) {
+ if (!props.isCommonStyle) {
return '';
}
const style = form.value?.carousel_list?.[actived_index.value]?.style;
@@ -292,7 +292,7 @@ const swiper_bg_style = computed(() => {
});
const swiper_bg_img_style = computed(() => {
- if (props.isNest) {
+ if (!props.isCommonStyle) {
return '';
}
const { carousel_img, style = {} } = form.value?.carousel_list[actived_index.value] || {};
@@ -321,7 +321,7 @@ const slideChange = (swiper: { realIndex: number }) => {
} else {
actived_index.value = swiper.realIndex;
}
- if (props.isNest) {
+ if (!props.isCommonStyle) {
emit('slideChange', actived_index.value);
}
}
diff --git a/src/components/model-float-window/model-float-window-content.vue b/src/components/model-float-window/model-float-window-content.vue
index 3216e38b..935aadd4 100644
--- a/src/components/model-float-window/model-float-window-content.vue
+++ b/src/components/model-float-window/model-float-window-content.vue
@@ -11,6 +11,8 @@
客服入口
快捷导航
多语言
+ 分享
+ 回到顶部
diff --git a/src/views/layout/index.vue b/src/views/layout/index.vue
index b4d91bb3..eecbf345 100644
--- a/src/views/layout/index.vue
+++ b/src/views/layout/index.vue
@@ -270,6 +270,40 @@ const save_formmat_form_data = (data: diy_data_item, close: boolean = false, is_
const new_array_5 = ['custom', 'goods-magic'];
// 导航组
const new_array_6 = ['nav-group'];
+ // 选项卡数据更新
+ clone_form.tabs_data = clone_form.tabs_data.map((item: any) => {
+ if (['tabs-magic'].includes(item.key)) {
+ // 获取所有组件名称
+ const all_type = ['hot_zone', 'custom', 'img_magic', 'goods_magic', 'goods_list', 'article_list', 'nav_group', 'video', 'carousel'];
+ // 将数据信息合并起来
+ const new_data_list = [item.com_data.content.home_data, ...item.com_data.content.tabs_list];
+ // 对整个数据进行处理
+ new_data_list.forEach((item1: any) => {
+ if (['goods-list', 'article-list'].includes(item1.magic_type)) {
+ // 处理商品或者文章的数据
+ goods_or_article_data_processing(item1[item1.magic_type], item1.magic_type == new_array_1[0], item1.magic_type);
+ } else if (new_array_5.includes(item1.magic_type)) {
+ // 自定义数据处理
+ custom_data_processing(item1[item1.magic_type].content);
+ }
+ item = 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);
+ }
+ return {
+ ...item,
+ show_tabs: '0',
+ }
+ });
+ // 拖拽区域更新
clone_form.diy_data = clone_form.diy_data.map((item: any) => {
if (new_array_1.includes(item.key)) {
// 商品或文章的数据处理
@@ -627,4 +661,4 @@ const get_id = () => {
-ms-user-select: none; /* Internet Explorer/Edge */
user-select: none; /* Non-prefixed version, currently supported by Chrome and Opera */
}
-
+
\ No newline at end of file