diff --git a/src/layouts/common/GlobalTab/components/MultiTab/index.vue b/src/layouts/common/GlobalTab/components/MultiTab/index.vue index 5b3e4146..3bcbb15e 100644 --- a/src/layouts/common/GlobalTab/components/MultiTab/index.vue +++ b/src/layouts/common/GlobalTab/components/MultiTab/index.vue @@ -71,13 +71,13 @@ function setDropdownConfig(x: number, y: number, currentPath: string) { // 获取当前激活的tab的clientX const tabRef = ref(null); -async function getActiveChromeTabClientX() { +async function getActiveTabClientX() { await nextTick(); const index = app.activeMultiTabIndex; if (tabRef.value) { const activeTabElement = tabRef.value.children[index]; const { x, width } = activeTabElement.getBoundingClientRect(); - const clientX = x + width; + const clientX = x + width / 2; setTimeout(() => { emit('scroll', clientX); }, 50); @@ -103,7 +103,7 @@ useEventListener(window, 'beforeunload', () => { watch( () => app.activeMultiTabIndex, () => { - getActiveChromeTabClientX(); + getActiveTabClientX(); }, { immediate: true diff --git a/src/views/component/video/index.vue b/src/views/component/video/index.vue index 1dfac56e..5208de5b 100644 --- a/src/views/component/video/index.vue +++ b/src/views/component/video/index.vue @@ -7,24 +7,30 @@