diff --git a/src/components/teleport-layout/index.tsx b/src/components/teleport-layout/index.tsx index 29f213de..cb83575d 100644 --- a/src/components/teleport-layout/index.tsx +++ b/src/components/teleport-layout/index.tsx @@ -27,6 +27,7 @@ export const TeleportToAny = defineComponent({ return () => (
( - -
+ +
{lyrice.value.map((item, i) => (
(NAMESPACED) + const LayoutModule = uesModuleStore(LayoutNamespace) + + const { screenSize } = toRefs(LayoutModule.useState()) const lyrice = computed(() => useGetter('musicLyrics')) const { currentTime } = toRefs(useState()) @@ -60,6 +69,7 @@ export const PlayLyrice = defineComponent({ nextTick(() => { offset.value = contanier.value.clientHeight / 2 - 50 disabled.value = !visible.value + console.log(offset.value, disabled.value) }) } @@ -69,11 +79,11 @@ export const PlayLyrice = defineComponent({ } }) - const resize = () => { - if (visible.value) { + const resize = debounce(() => { + if (visible.value && screenSize.value !== Size.SM) { updateOffset() } - } + }, 100) onMounted(() => { on(window, 'resize', resize)