导航组默认高度优化

master
gongfuxiang 2025-04-28 11:06:54 +08:00
parent c8d726f2c1
commit 7ba2e3b7c0
2 changed files with 28 additions and 14 deletions

View File

@ -186,18 +186,19 @@
}
},
"__usePrivacyCheck__" : true,
"plugins" : {}
"plugins" : {
// 线->->线 https://mp.weixin.qq.com/wxopen/plugindevdoc?appid=wx50b5593e81dd937a
// "routePlan" : {
// "version" : "1.0.19",
// "provider" : "wx50b5593e81dd937a"
// },
// ->-> https://mp.weixin.qq.com/wxopen/pluginbasicprofile?action=intro&appid=wx2b03c6e691cd7370
"live-player-plugin" : {
"version" : "1.3.5",
"provider" : "wx2b03c6e691cd7370"
}
}
},
// 线->->线 https://mp.weixin.qq.com/wxopen/plugindevdoc?appid=wx50b5593e81dd937a
// "routePlan" : {
// "version" : "1.0.19",
// "provider" : "wx50b5593e81dd937a"
// },
// ->-> https://mp.weixin.qq.com/wxopen/pluginbasicprofile?action=intro&appid=wx2b03c6e691cd7370
// "live-player-plugin" : {
// "version" : "1.3.5",
// "provider" : "wx2b03c6e691cd7370"
// }
"mp-alipay" : {
"usingComponents" : true,
"appid" : "2021001173639600"

View File

@ -68,7 +68,7 @@ export default {
img_style: '',
text_style: '',
indicator_style: '',
new_height: '300rpx',
new_height: '',
actived_index: 0,
group_width: '',
nav_content_list: [],
@ -127,7 +127,8 @@ export default {
const new_style = this.propValue.style;
let group = 1;
let group_width = `width: ${100 / (new_content.single_line || 4)}%;`;
let single_line = parseInt(new_content.single_line || 4);
let group_width = `width: ${100 / single_line}%;`;
//
if (new_content?.display_style == 'slide') {
if (new_content.row == 1 && new_style.rolling_fashion == 'translation') {
@ -135,10 +136,21 @@ export default {
group_width = 'width: 100%;';
} else {
group = 1;
group_width = `width: ${100 / (new_content.single_line || 4)}%;`;
group_width = `width: ${100 / single_line}%;`;
}
}
//
let height = '126rpx';
let temp_nav_content = new_content.nav_content_list || [];
if(temp_nav_content.length > single_line*3) {
height = '496rpx';
} else if(temp_nav_content.length > single_line*2) {
height = '384rpx';
} else if(temp_nav_content.length > single_line) {
height = '272rpx';
}
this.setData({
form: new_content,
new_style: new_style,
@ -156,6 +168,7 @@ export default {
img_size: 'width:' + (new_style.img_size || 0) * 2 + 'rpx;height:' + (new_style.img_size || 0) * 2 + 'rpx;', //
nav_style: new_content.nav_style || 'image_with_text', //
nav_content_list: this.get_nav_content_list(new_content, new_style),
new_height: height,
});
setTimeout(() => {
const query = uni.createSelectorQuery().in(this);