修改页面显示

v1.4.0
于肖磊 2025-08-05 16:24:02 +08:00
parent 92c406902b
commit 8cab2b0871
1 changed files with 7 additions and 2 deletions

View File

@ -78,6 +78,10 @@ const props = defineProps({
return {};
},
},
magicScale: {
type: Number,
default: 1,
},
isCommonStyle: {
type: Boolean,
default: true,
@ -116,6 +120,7 @@ const scale = ref(1);
//
watchEffect(() => {
const { common_style, data_style, data_content_style, column_gap } = new_style.value;
const new_width = 390 * props.magicScale;
//
const outer_spacing = common_style.margin_left + common_style.margin_right + common_style.padding_left + common_style.padding_right + border_width(common_style);
//
@ -125,9 +130,9 @@ watchEffect(() => {
//
const data_spacing = ['vertical', 'horizontal'].includes(form.value.data_source_direction) ? column_gap * (form.value.data_source_carousel_col - 1) : 0;
//
const width = 390 - outer_spacing - internal_spacing - content_spacing - data_spacing - props.outerContainerPadding;
const width = new_width - outer_spacing - internal_spacing - content_spacing - data_spacing - props.outerContainerPadding;
//
const scale_number = width / 390;
const scale_number = width / new_width;
scale.value = scale_number > 0 ? scale_number : 0;
});
//#endregion