修改页面显示逻辑

v1.2.0
于肖磊 2025-01-10 15:57:20 +08:00
parent bf44bbd8c2
commit 9f77f26bad
1 changed files with 6 additions and 5 deletions

View File

@ -213,17 +213,18 @@ watchEffect(() => {
const carousel_col = Number(form.value?.data_source_carousel_col) || 1;
//
slides_per_group.value = new_style.value.rolling_fashion == 'translation' ? 1 : carousel_col;
//
const col = data_source_content_list.value.length > carousel_col ? carousel_col : data_source_content_list.value.length;
//
slides_per_view.value = col;
const { margin_bottom, margin_top } = new_style.value.data_chunk_margin;
const { padding_top, padding_bottom } = new_style.value.data_chunk_padding;
//
if (form.value.data_source_direction == '2') {
if (form.value.data_source_direction == 'horizontal') {
swiper_height.value = form.value.height * scale.value + padding_top + padding_bottom + margin_bottom + margin_top;
slides_per_view.value = Number(carousel_col);
} else {
//
const col = data_source_content_list.value.length > carousel_col ? carousel_col : data_source_content_list.value.length;
swiper_height.value = (form.value.height * scale.value + padding_top + padding_bottom + margin_bottom + margin_top) * col + ((carousel_col - 1) * space_between.value);
//
slides_per_view.value = col;
}
// key
carouselKey.value = get_math();