修改头部显示逻辑

master
于肖磊 2025-01-21 09:42:55 +08:00
parent afe278c831
commit 687565177c
1 changed files with 20 additions and 20 deletions

View File

@ -19,29 +19,29 @@
<view v-for="(item, index) in diy_data" :key="index" :style="'margin-top:' + (['float-window'].includes(item.key) ? '0rpx;z-index:1' : -(item.com_data.style.common_style.floating_up * 2 || 0) + 'rpx;z-index:' + (!isEmpty(item.com_data.style.common_style.module_z_index) ? item.com_data.style.common_style.module_z_index : 0))">
<!-- 基础组件 -->
<template v-if="item.is_enable == '1'">
<componentDiySearch v-if="item.key == 'search'" :propIndex="(is_immersive_style_and_general_safe_distance_value && tabs_data.length < 0) ? item.index : -1" :propKey="item.id + index" :propValue="item.com_data"></componentDiySearch>
<componentDiyCarousel v-else-if="item.key == 'carousel'" :propOuterContainerPadding="outer_container_padding" :propIndex="(is_immersive_style_and_general_safe_distance_value && tabs_data.length < 0) ? item.index : -1" :propKey="item.id + index" :propValue="item.com_data" @onVideoPlay="video_play"></componentDiyCarousel>
<componentDiyNavGroup v-else-if="item.key == 'nav-group'" :propIndex="(is_immersive_style_and_general_safe_distance_value && tabs_data.length < 0) ? item.index : -1" :propKey="item.id + index" :propValue="item.com_data"></componentDiyNavGroup>
<componentDiyUserInfo v-else-if="item.key == 'user-info'" :propIndex="(is_immersive_style_and_general_safe_distance_value && tabs_data.length < 0) ? item.index : -1" :propKey="item.id + index" :propValue="item.com_data"></componentDiyUserInfo>
<componentDiyNotice v-else-if="item.key == 'notice'" :propIndex="(is_immersive_style_and_general_safe_distance_value && tabs_data.length < 0) ? item.index : -1" :propKey="item.id + index" :propValue="item.com_data"></componentDiyNotice>
<componentDiyVideo v-else-if="item.key == 'video'" :propIndex="(is_immersive_style_and_general_safe_distance_value && tabs_data.length < 0) ? item.index : -1" :propKey="item.id + index" :propValue="item.com_data"></componentDiyVideo>
<componentDiyArticleList v-else-if="item.key == 'article-list'" :propIndex="(is_immersive_style_and_general_safe_distance_value && tabs_data.length < 0) ? item.index : -1" :propKey="item.id + index" :propValue="item.com_data"></componentDiyArticleList>
<componentDiyArticleTabs v-else-if="item.key == 'article-tabs'" :propIndex="(is_immersive_style_and_general_safe_distance_value && tabs_data.length < 0) ? item.index : -1" :propKey="item.id + index" :propValue="item.com_data" :propTop="(!is_immersion_model ? temp_sticky_top : 0) + tabs_height" :propScrollTop="scroll_top" :propCustomNavHeight="!is_immersion_model && is_header_top ? (is_search_alone_row ? 66 + data_alone_row_space : 33) : 0"></componentDiyArticleTabs>
<componentDiyGoodsTabs v-else-if="item.key == 'goods-tabs'" :ref="'diy_goods_buy' + index" :propIndex="(is_immersive_style_and_general_safe_distance_value && tabs_data.length < 0) ? item.index : -1" :propDiyIndex="index" :propKey="item.id + index" :propValue="item.com_data" :propTop="(!is_immersion_model ? temp_sticky_top : 0) + tabs_height" :propScrollTop="scroll_top" :propCustomNavHeight="!is_immersion_model && is_header_top ? (is_search_alone_row ? 66 + data_alone_row_space : 33) : 0" @goods_buy_event="goods_buy_event"></componentDiyGoodsTabs>
<componentDiyGoodsList v-else-if="item.key == 'goods-list'" :ref="'diy_goods_buy' + index" :propIndex="(is_immersive_style_and_general_safe_distance_value && tabs_data.length < 0) ? item.index : -1" :propDiyIndex="index" :propKey="item.id + index" :propValue="item.com_data" @goods_buy_event="goods_buy_event"></componentDiyGoodsList>
<componentDiyDataMagic v-else-if="item.key == 'data-magic'" :propOuterContainerPadding="outer_container_padding" :propIndex="(is_immersive_style_and_general_safe_distance_value && tabs_data.length < 0) ? item.index : -1" :propKey="item.id + index" :propValue="item.com_data"></componentDiyDataMagic>
<componentDiyCustom v-else-if="item.key == 'custom'" :propOuterContainerPadding="outer_container_padding" :propIndex="(is_immersive_style_and_general_safe_distance_value && tabs_data.length < 0) ? item.index : -1" :propKey="item.id + index" :propValue="item.com_data"></componentDiyCustom>
<componentDiyImgMagic v-else-if="item.key == 'img-magic'" :propOuterContainerPadding="outer_container_padding" :propIndex="(is_immersive_style_and_general_safe_distance_value && tabs_data.length < 0) ? item.index : -1" :propKey="item.id + index" :propValue="item.com_data"></componentDiyImgMagic>
<componentDiyHotZone v-else-if="item.key == 'hot-zone'" :propIndex="(is_immersive_style_and_general_safe_distance_value && tabs_data.length < 0) ? item.index : -1" :propKey="item.id + index" :propValue="item.com_data"></componentDiyHotZone>
<componentDiySeckill v-else-if="item.key == 'seckill'" :propOuterContainerPadding="outer_container_padding" :propIndex="(is_immersive_style_and_general_safe_distance_value && tabs_data.length < 0) ? item.index : -1" :propKey="item.id + index" :propValue="item.com_data"></componentDiySeckill>
<componentDiySearch v-if="item.key == 'search'" :propIndex="(is_immersive_style_and_general_safe_distance_value && tabs_data.length == 0) ? item.index : -1" :propKey="item.id + index" :propValue="item.com_data"></componentDiySearch>
<componentDiyCarousel v-else-if="item.key == 'carousel'" :propOuterContainerPadding="outer_container_padding" :propIndex="(is_immersive_style_and_general_safe_distance_value && tabs_data.length == 0) ? item.index : -1" :propKey="item.id + index" :propValue="item.com_data" @onVideoPlay="video_play"></componentDiyCarousel>
<componentDiyNavGroup v-else-if="item.key == 'nav-group'" :propIndex="(is_immersive_style_and_general_safe_distance_value && tabs_data.length == 0) ? item.index : -1" :propKey="item.id + index" :propValue="item.com_data"></componentDiyNavGroup>
<componentDiyUserInfo v-else-if="item.key == 'user-info'" :propIndex="(is_immersive_style_and_general_safe_distance_value && tabs_data.length == 0) ? item.index : -1" :propKey="item.id + index" :propValue="item.com_data"></componentDiyUserInfo>
<componentDiyNotice v-else-if="item.key == 'notice'" :propIndex="(is_immersive_style_and_general_safe_distance_value && tabs_data.length == 0) ? item.index : -1" :propKey="item.id + index" :propValue="item.com_data"></componentDiyNotice>
<componentDiyVideo v-else-if="item.key == 'video'" :propIndex="(is_immersive_style_and_general_safe_distance_value && tabs_data.length == 0) ? item.index : -1" :propKey="item.id + index" :propValue="item.com_data"></componentDiyVideo>
<componentDiyArticleList v-else-if="item.key == 'article-list'" :propIndex="(is_immersive_style_and_general_safe_distance_value && tabs_data.length == 0) ? item.index : -1" :propKey="item.id + index" :propValue="item.com_data"></componentDiyArticleList>
<componentDiyArticleTabs v-else-if="item.key == 'article-tabs'" :propIndex="(is_immersive_style_and_general_safe_distance_value && tabs_data.length == 0) ? item.index : -1" :propKey="item.id + index" :propValue="item.com_data" :propTop="(!is_immersion_model ? temp_sticky_top : 0) + tabs_height" :propScrollTop="scroll_top" :propCustomNavHeight="!is_immersion_model && is_header_top ? (is_search_alone_row ? 66 + data_alone_row_space : 33) : 0"></componentDiyArticleTabs>
<componentDiyGoodsTabs v-else-if="item.key == 'goods-tabs'" :ref="'diy_goods_buy' + index" :propIndex="(is_immersive_style_and_general_safe_distance_value && tabs_data.length == 0) ? item.index : -1" :propDiyIndex="index" :propKey="item.id + index" :propValue="item.com_data" :propTop="(!is_immersion_model ? temp_sticky_top : 0) + tabs_height" :propScrollTop="scroll_top" :propCustomNavHeight="!is_immersion_model && is_header_top ? (is_search_alone_row ? 66 + data_alone_row_space : 33) : 0" @goods_buy_event="goods_buy_event"></componentDiyGoodsTabs>
<componentDiyGoodsList v-else-if="item.key == 'goods-list'" :ref="'diy_goods_buy' + index" :propIndex="(is_immersive_style_and_general_safe_distance_value && tabs_data.length == 0) ? item.index : -1" :propDiyIndex="index" :propKey="item.id + index" :propValue="item.com_data" @goods_buy_event="goods_buy_event"></componentDiyGoodsList>
<componentDiyDataMagic v-else-if="item.key == 'data-magic'" :propOuterContainerPadding="outer_container_padding" :propIndex="(is_immersive_style_and_general_safe_distance_value && tabs_data.length == 0) ? item.index : -1" :propKey="item.id + index" :propValue="item.com_data"></componentDiyDataMagic>
<componentDiyCustom v-else-if="item.key == 'custom'" :propOuterContainerPadding="outer_container_padding" :propIndex="(is_immersive_style_and_general_safe_distance_value && tabs_data.length == 0) ? item.index : -1" :propKey="item.id + index" :propValue="item.com_data"></componentDiyCustom>
<componentDiyImgMagic v-else-if="item.key == 'img-magic'" :propOuterContainerPadding="outer_container_padding" :propIndex="(is_immersive_style_and_general_safe_distance_value && tabs_data.length == 0) ? item.index : -1" :propKey="item.id + index" :propValue="item.com_data"></componentDiyImgMagic>
<componentDiyHotZone v-else-if="item.key == 'hot-zone'" :propIndex="(is_immersive_style_and_general_safe_distance_value && tabs_data.length == 0) ? item.index : -1" :propKey="item.id + index" :propValue="item.com_data"></componentDiyHotZone>
<componentDiySeckill v-else-if="item.key == 'seckill'" :propOuterContainerPadding="outer_container_padding" :propIndex="(is_immersive_style_and_general_safe_distance_value && tabs_data.length == 0) ? item.index : -1" :propKey="item.id + index" :propValue="item.com_data"></componentDiySeckill>
<!-- 插件 -->
<componentDiyCoupon v-else-if="item.key == 'coupon'" :propIndex="(is_immersive_style_and_general_safe_distance_value && tabs_data.length < 0) ? item.index : -1" :propKey="item.id + index" :propValue="item.com_data"></componentDiyCoupon>
<componentDiyCoupon v-else-if="item.key == 'coupon'" :propIndex="(is_immersive_style_and_general_safe_distance_value && tabs_data.length == 0) ? item.index : -1" :propKey="item.id + index" :propValue="item.com_data"></componentDiyCoupon>
<!-- 工具组件 -->
<componentDiyFloatWindow v-else-if="item.key == 'float-window'" :propKey="item.id + index" :propValue="item.com_data"></componentDiyFloatWindow>
<componentDiyTitle v-else-if="item.key == 'title'" :propKey="item.id + index" :propIndex="(is_immersive_style_and_general_safe_distance_value && tabs_data.length < 0) ? item.index : -1" :propValue="item.com_data"></componentDiyTitle>
<componentDiyAuxiliaryLine v-else-if="item.key == 'row-line'" :propIndex="(is_immersive_style_and_general_safe_distance_value && tabs_data.length < 0) ? item.index : -1" :propKey="item.id + index" :propValue="item.com_data"></componentDiyAuxiliaryLine>
<componentDiyRichText v-else-if="item.key == 'rich-text'" :propIndex="(is_immersive_style_and_general_safe_distance_value && tabs_data.length < 0) ? item.index : -1" :propKey="item.id + index" :propValue="item.com_data"></componentDiyRichText>
<componentDiyAuxiliaryBlank v-else-if="item.key == 'auxiliary-blank'" :propIndex="(is_immersive_style_and_general_safe_distance_value && tabs_data.length < 0) ? item.index : -1" :propKey="item.id + index" :propValue="item.com_data"></componentDiyAuxiliaryBlank>
<componentDiyTitle v-else-if="item.key == 'title'" :propKey="item.id + index" :propIndex="(is_immersive_style_and_general_safe_distance_value && tabs_data.length == 0) ? item.index : -1" :propValue="item.com_data"></componentDiyTitle>
<componentDiyAuxiliaryLine v-else-if="item.key == 'row-line'" :propIndex="(is_immersive_style_and_general_safe_distance_value && tabs_data.length == 0) ? item.index : -1" :propKey="item.id + index" :propValue="item.com_data"></componentDiyAuxiliaryLine>
<componentDiyRichText v-else-if="item.key == 'rich-text'" :propIndex="(is_immersive_style_and_general_safe_distance_value && tabs_data.length == 0) ? item.index : -1" :propKey="item.id + index" :propValue="item.com_data"></componentDiyRichText>
<componentDiyAuxiliaryBlank v-else-if="item.key == 'auxiliary-blank'" :propIndex="(is_immersive_style_and_general_safe_distance_value && tabs_data.length == 0) ? item.index : -1" :propKey="item.id + index" :propValue="item.com_data"></componentDiyAuxiliaryBlank>
</template>
</view>
</template>