修改更多按钮逻辑

master
于肖磊 2025-08-07 18:50:31 +08:00
parent 146900305f
commit ea6465d660
1 changed files with 10 additions and 1 deletions

View File

@ -62,7 +62,7 @@
<view class="nav-list-more">
<view class="flex-row flex-wrap align-c">
<view v-for="(item, index) in tabs_list" :key="index" class="item tc cr-base cp text-size-xs" :data-index="index" @tap="handle_event">
<view class="dis-inline-block padding-vertical-xs padding-horizontal round" :class="active_index == index ? 'bg-main border-color-main cr-white' : ''">
<view class="dis-inline-block padding-vertical-xs padding-horizontal round" :style="active_index == index ? more_text_selectd_style : more_text_color">
{{ item.title }}
</view>
</view>
@ -217,6 +217,8 @@
tabs_list_is_sliding_fixed: true,
scroll_left: 0,
tabs_adorn_icon_size: '0rpx',
more_text_selectd_style: '',
more_text_color: '',
//
old_radius: { radius: 0, radius_top_left: 0, radius_top_right: 0, radius_bottom_left: 0, radius_bottom_right: 0 },
old_padding: { padding: 0, padding_top: 0, padding_bottom: 0, padding_left: 0, padding_right: 0 },
@ -317,6 +319,11 @@
roll = 'tabs_pc';
}
// #endif
const more_style = {
color_list: new_style?.more_button_color_list || [{ color: '#eee', color_percentage: undefined }],
direction: new_style?.more_button_direction || '90deg',
}
const more_button_selectd = gradient_computer(more_style) + `color: ${new_style?.more_button_text_selected_color || '#666'};`;
//
this.setData({
tabs_roll: roll,
@ -346,6 +353,8 @@
tabs_height: ['2', '4'].includes(new_content.tabs_theme) ? height * 2 + 'rpx' : '100%;',
tabs_adorn_img_style: this.get_tabs_adorn_img_style(new_style),
tabs_adorn_icon_size: (new_style?.tabs_adorn_icon_size || 0) * 2 + 'rpx',
more_text_selectd_style: more_button_selectd,
more_text_color: new_style?.more_button_text_color || '#666',
});
// dom
// if (['center', 'right'].includes(this.form.justification)) {