fix:修改渲染区坐标信息获取方式为dom

This commit is contained in:
liuhuajie
2024-11-14 18:47:40 +08:00
parent 402e686d87
commit 63b95b3607
3 changed files with 3 additions and 4 deletions

3
auto-imports.d.ts vendored
View File

@ -3,7 +3,6 @@
// @ts-nocheck
// noinspection JSUnusedGlobalSymbols
// Generated by unplugin-auto-import
// biome-ignore lint: disable
export {}
declare global {
const EffectScope: typeof import('vue')['EffectScope']
@ -304,6 +303,6 @@ declare global {
// for type re-export
declare global {
// @ts-ignore
export type { Component, ComponentPublicInstance, ComputedRef, DirectiveBinding, ExtractDefaultPropTypes, ExtractPropTypes, ExtractPublicPropTypes, InjectionKey, PropType, Ref, MaybeRef, MaybeRefOrGetter, VNode, WritableComputedRef } from 'vue'
export type { Component, ComponentPublicInstance, ComputedRef, ExtractDefaultPropTypes, ExtractPropTypes, ExtractPublicPropTypes, InjectionKey, PropType, Ref, VNode, WritableComputedRef } from 'vue'
import('vue')
}

View File

@ -37,7 +37,7 @@
</div>
</VueDraggable>
</div>
<div ref="targetContent" class="center">
<div ref="targetContent" id="renderArea" class="center">
<VueDraggable
v-model="store.previewScheme"
:sort="true"

View File

@ -103,7 +103,7 @@ const adjustHeaderPosition = () => {
let left = 0;
// 获取最外层组件渲染区域的边界
const containerEl = targetContent.value;
const containerEl = document.getElementById('renderArea');
if (!containerEl) return;
const containerRect = containerEl.getBoundingClientRect();