修改页面内容显示

master
于肖磊 2025-01-08 16:12:55 +08:00
parent c0b3c3721e
commit 660d52fdf7
2 changed files with 7 additions and 5 deletions

View File

@ -204,23 +204,24 @@
const data_spacing = ['vertical', 'horizontal'].includes(new_form.data_source_direction) ? new_style.column_gap * (carousel_col - 1) : 0;
//
const width = sys_width - outer_spacing - content_spacing - internal_spacing - data_spacing - this.propOuterContainerPadding;
const new_data_style = !isEmpty(new_style.data_style) ? new_style.data_style : this.old_data_style;
const new_data_content_style = !isEmpty(new_style.data_content_style)? new_style.data_content_style : this.old_data_style;
//
const { padding_top = 0, padding_bottom = 0, margin_bottom = 0, margin_top = 0 } = new_data_style;
let swiper_height = 0;
//
const col = new_list.length > carousel_col ? carousel_col : new_list.length;
const scale_number = width / 390;
const new_scale = scale_number > 0 ? scale_number : 0;
//
const space_between = new_form.data_source_direction == 'horizontal' ? new_style.column_gap : new_style.row_gap;
let col = Number(new_form.data_source_carousel_col);
//
if (new_form.data_source_direction == 'horizontal') {
swiper_height = new_form.height * new_scale + padding_top + padding_bottom + margin_bottom + margin_top;
} else {
//
col = new_list.length > carousel_col ? carousel_col : new_list.length;
swiper_height = (new_form.height * new_scale + padding_top + padding_bottom + margin_bottom + margin_top) * col + ((Number(new_form.data_source_carousel_col) - 1) * space_between);
}
// (gap * gap) /
let gap = (new_style.column_gap * (carousel_col - 1)) / carousel_col;

View File

@ -203,14 +203,15 @@
//
const { padding_top = 0, padding_bottom = 0, margin_bottom = 0, margin_top = 0 } = new_data_style;
let swiper_height = 0;
//
const col = new_list.length > carousel_col ? carousel_col : new_list.length;
let col = Number(new_form.data_source_carousel_col);
//
const space_between = new_form.data_source_direction == 'horizontal' ? new_style.column_gap : new_style.row_gap;
//
if (new_form.data_source_direction == 'horizontal') {
swiper_height = this.propDataHeight * custom_scale + padding_top + padding_bottom + margin_bottom + margin_top;
} else {
//
col = new_list.length > carousel_col ? carousel_col : new_list.length;
swiper_height = (this.propDataHeight * custom_scale + padding_top + padding_bottom + margin_bottom + margin_top) * col + ((Number(new_form.data_source_carousel_col) - 1) * space_between);
}
// (gap * gap) /