修改选项卡轮播显示

master
于肖磊 2024-10-21 11:08:26 +08:00
parent f12f956b8e
commit 1d6fd63b28
3 changed files with 37 additions and 16 deletions

View File

@ -7,12 +7,12 @@
data: {
//
//
//request_url: 'http://shopxo.com/',
request_url:'https://new.shopxo.vip/',
request_url: 'http://shopxo.com/',
// request_url:'https://new.shopxo.vip/',
// publicpublichttps://d1.shopxo.vip/public/
//static_url: 'http://shopxo.com/',
static_url:'https://new.shopxo.vip/',
static_url: 'http://shopxo.com/',
// static_url:'https://new.shopxo.vip/',
// default
system_type: 'default',

View File

@ -1,7 +1,7 @@
<template>
<view class="flex-col ou" :style="style_container">
<view class="ou" :style="style_img_container">
<componentDiyTabs :propValue="propValue" :propTop="propTop" :propNavIsTop="propNavIsTop" :propTabsIsTop="propTabsIsTop" @onComputerHeight="tabs_height_event" @onTabsTap="tabs_click_event"></componentDiyTabs>
<view class="ou" :style="style_container">
<view class="flex-col ou" :style="style_img_container">
<componentDiyTabs :propValue="propValue" :propTop="propTop" :propNavIsTop="propNavIsTop" :propTabsIsTop="propTabsIsTop" :propIsCommon="false" :propSpacingCommonStyle="spacing_common_style" @tabs-click="tabs_click_event"></componentDiyTabs>
<componentDiycarousel :propValue="propValue" :propIsCommon="false" @onVideoPlay="video_play"></componentDiycarousel>
</view>
</view>
@ -58,7 +58,7 @@
margin_left: 0,
margin_right: 0,
},
top_up: '0',
// top_up: '0',
};
},
created() {
@ -81,9 +81,20 @@
const new_style = this.propValue.style || {};
this.setData({
// style_container: `${common_styles_computer(common_style)};gap:${new_style.data_spacing * 2}rpx`,
style_container: `${common_styles_computer(new_style.common_style)};gap:${new_style.data_spacing * 2}rpx`,
style_img_container: common_img_computer(new_style.common_style),
top_up: new_content.tabs_top_up,
style_container: `${common_styles_computer(new_style.common_style)};`,
style_img_container: common_img_computer(new_style.common_style) + 'gap:' + new_style.data_spacing * 2 + 'rpx',
spacing_common_style: {
padding: 0,
padding_top: new_style.common_style.padding_top,
padding_bottom: 0,
padding_left: new_style.common_style.padding_left,
padding_right: new_style.common_style.padding_right,
margin: 0,
margin_top: new_style.common_style.margin_top,
margin_bottom: 0,
margin_left: new_style.common_style.margin_left,
margin_right: new_style.common_style.margin_right,
}
});
},
// tab

View File

@ -8,13 +8,13 @@
</view>
</view>
</view>
<view v-if="top_up == '1'" class="tabs-seat" :style="'height:' + tabs_seat_height + 'px;'"></view>
<view v-if="top_up == '1'" class="tabs-seat" :style="'height:' + (propIsCommon ? tabs_seat_height : tabs_carousel_seat_height) + 'px;'"></view>
</view>
</template>
<script>
const app = getApp();
import { common_styles_computer, common_img_computer } from '@/common/js/common/common.js';
import { common_styles_computer, common_img_computer, padding_computer, margin_computer } from '@/common/js/common/common.js';
import componentDiyModulesTabsView from '@/components/diy/modules/tabs-view';
//
var bar_height = parseInt(app.globalData.get_system_info('statusBarHeight', 0));
@ -42,6 +42,14 @@
type: Boolean,
default: false,
},
propIsCommon: {
type: Boolean,
default: true,
},
propSpacingCommonStyle: {
type: Object,
default: () => ({}),
},
//
propStyle: {
type: String,
@ -61,11 +69,12 @@
style_img_container: '',
content: '',
tabs_data: {},
//
top_up: '0',
//
tabs_seat_height: 0,
//
tabs_carousel_seat_height: 0,
//
tabs_top_style: '',
};
@ -119,8 +128,8 @@
this.setData({
tabs_data: new_tabs_data,
style_container: common_styles_computer(new_style.common_style) + new_tabs_background,
style_img_container: common_img_computer(new_style.common_style),
style_container: this.propIsCommon ? common_styles_computer(new_style.common_style) + new_tabs_background : new_content.tabs_top_up == '1' ? new_tabs_background : '', //
style_img_container: this.propIsCommon ? common_img_computer(new_style.common_style) : new_content.tabs_top_up == '1' ? margin_computer(this.propSpacingCommonStyle) + padding_computer(this.propSpacingCommonStyle) : '', //
tabs_top_style: new_tabs_top_style,
//
top_up: new_top_up
@ -139,6 +148,7 @@
// data
this.setData({
tabs_seat_height: res.height,
tabs_carousel_seat_height: res.height - this.propSpacingCommonStyle.padding_top - this.propSpacingCommonStyle.margin_top //
});
this.$emit('onComputerHeight', this.tabs_seat_height);
}