修改选项卡显示逻辑
parent
12bb145f74
commit
b8e6faa932
|
|
@ -432,9 +432,9 @@
|
|||
// 顶部导航的高度
|
||||
let header_top_height = (header.com_data.content.data_alone_row_value.length > 0 ? parseInt(header.com_data.style.data_alone_row_space || 5) : 0) + 33 + (header.com_data.content.data_alone_row_value.length > 0 ? 33 : 0);
|
||||
// 选项卡和选项卡轮播置顶时不需要加入安全距离
|
||||
if (!(new_data.com_data.content.tabs_top_up == '1' && ['tabs', 'tabs-carousel'].includes(new_data.key))) {
|
||||
// if (!(new_data.com_data.content.tabs_top_up == '1' && ['tabs', 'tabs-carousel'].includes(new_data.key))) {
|
||||
new_data.com_data.style.common_style.padding_top = parseInt(new_data.com_data.style.common_style.padding_top) + header_top_height;
|
||||
}
|
||||
// }
|
||||
return new_data;
|
||||
}
|
||||
return item;
|
||||
|
|
|
|||
|
|
@ -363,7 +363,7 @@
|
|||
.header-container {
|
||||
width: 100%;
|
||||
.header-around {
|
||||
z-index: 11;
|
||||
z-index: 12;
|
||||
}
|
||||
.model-top {
|
||||
.roll {
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@
|
|||
</view>
|
||||
</view>
|
||||
<!-- 选项卡更多弹窗 -->
|
||||
<componentPopup :propShow="popup_status" :propIsBar="propIsBar" propPosition="top" :propMask="true" :propTop="propTop" @onclose="quick_close_event">
|
||||
<componentPopup :propShow="popup_status" :propIsBar="propIsBar" propPosition="top" :propMask="true" :propTop="'calc(' + propTop + 'px)'" @onclose="quick_close_event">
|
||||
<view class="padding-vertical-lg">
|
||||
<view class="padding-left-main padding-bottom-main">全部选项卡</view>
|
||||
<view class="divider-b">
|
||||
|
|
|
|||
|
|
@ -2,9 +2,11 @@
|
|||
<!-- 选项卡 -->
|
||||
<view class="tabs-container pr">
|
||||
<view :class="top_up == '1' ? 'tabs-top' : ''" :style="tabs_top_style + (top_up == '1' ? propContentPadding : '')">
|
||||
<view class="tabs-contents bs-bb" :style="style_container">
|
||||
<view :class="top_up == '1' ? 'bs-bb' : 'wh-auto bs-bb'" :style="style_img_container">
|
||||
<componentDiyModulesTabsView :propValue="tabs_data" :propIsTabsIcon="true" :propTop="propTop" :propsTabsContainer="propsTabsContainer" :propsTabsImgContainer="propsTabsImgContainer" :propStyle="propStyle" @onTabsTap="tabs_click_event"></componentDiyModulesTabsView>
|
||||
<view :style="style_margin_top">
|
||||
<view class="tabs-contents bs-bb" :style="style_container">
|
||||
<view :class="top_up == '1' ? 'bs-bb' : 'wh-auto bs-bb'" :style="style_img_container">
|
||||
<componentDiyModulesTabsView :propValue="tabs_data" :propIsTabsIcon="true" :propTop="propTop" :propsTabsContainer="propsTabsContainer" :propsTabsImgContainer="propsTabsImgContainer" :propStyle="propStyle" @onTabsTap="tabs_click_event"></componentDiyModulesTabsView>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
|
@ -98,6 +100,7 @@
|
|||
tabs_carousel_seat_height: 0,
|
||||
// 置顶时,选项卡样式
|
||||
tabs_top_style: '',
|
||||
style_margin_top: '',
|
||||
};
|
||||
},
|
||||
created() {
|
||||
|
|
@ -157,8 +160,10 @@
|
|||
tabs_data: new_tabs_data,
|
||||
style_container: this.propIsCommon ? new_tabs_background + common_styles_computer(new_style.common_style) : new_content.tabs_top_up == '1' ? new_tabs_background + gradient_computer(new_style.common_style) + margin_computer(this.propSpacingCommonStyle) : '', // 如果是选项卡轮播,不需要走默认样式
|
||||
// 如果开了滑动置顶,并且开了沉浸式,不需要走传递过来的index,否则的话就用传递过来的index
|
||||
style_img_container: this.propIsCommon ? common_img_computer(new_style.common_style, new_content.tabs_top_up == '1' ? -1 : this.propIndex) : new_content.tabs_top_up == '1' ? background_computer(new_style.common_style) + padding_computer(this.propSpacingCommonStyle, 1, true) + 'box-sizing: border-box;' : '', // 如果是选项卡轮播,不需要走默认样式
|
||||
style_img_container: this.propIsCommon ? common_img_computer(new_style.common_style, this.propIndex) : new_content.tabs_top_up == '1' ? background_computer(new_style.common_style) + padding_computer(this.propSpacingCommonStyle, 1, true) + 'box-sizing: border-box;' : '', // 如果是选项卡轮播,不需要走默认样式
|
||||
tabs_top_style: new_tabs_top_style,
|
||||
// 沉浸模式下并且开通了安全距离 会显示-的margin
|
||||
style_margin_top: this.propIsImmersionModel ? `margin-top: -${ this.propTop * 2 }rpx;` : '',
|
||||
// 判断是否置顶
|
||||
top_up: new_top_up,
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in New Issue