diff --git a/src/components/common/div-content/index.vue b/src/components/common/div-content/index.vue index ad10df87..b984a4ad 100644 --- a/src/components/common/div-content/index.vue +++ b/src/components/common/div-content/index.vue @@ -139,6 +139,7 @@ const model_class = computed(() => { interface com_data { style: { + offset_number_percentage: string, common_style: { floating_up: number; }; @@ -171,6 +172,7 @@ const model_style = computed(() => { if (item.com_data.style.common_style?.floating_up != 0) { z_index = `z-index: 1`; } + item.com_data.style.offset_number_percentage = (bottom / window.innerHeight).toFixed(4); return item.key == 'float-window' ? `bottom: ${((bottom / window.innerHeight) * 100).toFixed(4) + '%'};` : `margin-top: -${item.com_data.style.common_style?.floating_up || 0}px;${z_index};`; }; }); diff --git a/src/components/model-float-window/index.vue b/src/components/model-float-window/index.vue index ae2dd5bc..3941ab95 100644 --- a/src/components/model-float-window/index.vue +++ b/src/components/model-float-window/index.vue @@ -44,7 +44,7 @@ watch(props.value, (val) => { style.value = location; // 60 为自身高度 - new_style.value.offset_number_percentage = (new_style.value.offset_number / (846 - 60)).toFixed(4); + // new_style.value.offset_number_percentage = (new_style.value.offset_number / (844 - 70)).toFixed(4); emits('change', { bottom: new_style.value.offset_number, location: new_style.value.display_location }); }, {immediate: true, deep: true});