导航组默认高度优化
parent
c8d726f2c1
commit
7ba2e3b7c0
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in New Issue