diff --git a/src/components/common/custom-module/model-custom-group/index.vue b/src/components/common/custom-module/model-custom-group/index.vue index 2cd47ffa..c5bd272f 100644 --- a/src/components/common/custom-module/model-custom-group/index.vue +++ b/src/components/common/custom-module/model-custom-group/index.vue @@ -198,12 +198,11 @@ watchEffect(() => { if (!isEmpty(data_source_content_list.value)) { num = new_style.value.rolling_fashion == 'translation' ? data_source_content_list.value.length : Math.ceil(data_source_content_list.value.length / Number(data_source_carousel_col)); } - const { padding_top, padding_bottom, margin_bottom, margin_top } = new_style.value.data_style; // 轮播图高度控制 if (form.value.data_source_direction == 'horizontal') { - swiper_height.value = form.value.custom_height * custom_scale.value + padding_top + padding_bottom + margin_bottom + margin_top; + swiper_height.value = props.dataHeight * custom_scale.value; } else { - swiper_height.value = (form.value.custom_height * custom_scale.value + padding_top + padding_bottom + margin_bottom + margin_top) * col + ((data_source_carousel_col - 1) * space_between.value); + swiper_height.value = (props.dataHeight * custom_scale.value) * col + ((data_source_carousel_col - 1) * space_between.value); } dot_list.value = Array(num); // 更新轮播图的key,确保更换时能重新更新轮播图 @@ -216,7 +215,7 @@ const indicator_style = computed(() => { if (!isEmpty(new_style.value.indicator_radius)) { indicator_styles += radius_computer(new_style.value.indicator_radius); } - const size = new_style.value?.indicator_size || 5; + const size = new_style.value.indicator_size; if (new_style.value.indicator_style == 'num') { indicator_styles += `color: ${new_style.value?.color || '#DDDDDD'};`; indicator_styles += `font-size: ${size}px;`; diff --git a/src/components/model-carousel/index.vue b/src/components/model-carousel/index.vue index 0c731f9f..86627f2a 100644 --- a/src/components/model-carousel/index.vue +++ b/src/components/model-carousel/index.vue @@ -110,7 +110,7 @@ const indicator_style = computed(() => { if (!isEmpty(new_style.value.indicator_radius)) { indicator_styles += radius_computer(new_style.value.indicator_radius) } - const size = new_style.value?.indicator_size || 5; + const size = new_style.value.indicator_size; if (new_style.value.indicator_style == 'num') { indicator_styles += `color: ${new_style.value?.color || '#DDDDDD'};`; indicator_styles += `font-size: ${size}px;`; diff --git a/src/components/model-custom/index.vue b/src/components/model-custom/index.vue index 8ba1bed3..137ece7d 100644 --- a/src/components/model-custom/index.vue +++ b/src/components/model-custom/index.vue @@ -194,7 +194,7 @@ const indicator_style = computed(() => { if (!isEmpty(new_style.value.indicator_radius)) { indicator_styles += radius_computer(new_style.value.indicator_radius); } - const size = new_style.value?.indicator_size || 5; + const size = new_style.value.indicator_size; if (new_style.value.indicator_style == 'num') { indicator_styles += `color: ${new_style.value?.color || '#DDDDDD'};`; indicator_styles += `font-size: ${size}px;`; diff --git a/src/components/model-data-magic/index.vue b/src/components/model-data-magic/index.vue index 0c11434c..75a6f154 100644 --- a/src/components/model-data-magic/index.vue +++ b/src/components/model-data-magic/index.vue @@ -200,7 +200,7 @@ const indicator_style = (item: any) => { if (!isEmpty(item.indicator_radius)) { styles += radius_computer(item.indicator_radius) } - const size = item?.indicator_size || 5; + const size = item.indicator_size; if (item.indicator_style == 'num') { styles += `color: ${item?.color || '#DDDDDD'};`; styles += `font-size: ${size}px;`; diff --git a/src/components/model-nav-group/index.vue b/src/components/model-nav-group/index.vue index 1833d34e..51b7939d 100644 --- a/src/components/model-nav-group/index.vue +++ b/src/components/model-nav-group/index.vue @@ -70,7 +70,7 @@ const indicator_style = computed(() => { if (!isEmpty(new_style.value.indicator_radius)) { indicator_styles += radius_computer(new_style.value.indicator_radius); } - const size = new_style.value?.indicator_size || 5; + const size = new_style.value.indicator_size; if (new_style.value.indicator_style == 'num') { indicator_styles += `color: ${new_style.value?.color || '#DDDDDD'};`; indicator_styles += `font-size: ${size}px;`;