🐞 fix: 修复web移动端 页面空白问题 (#24)

closed #24
This commit is contained in:
alger
2024-12-30 11:20:23 +08:00
parent dfdf02a17f
commit f8d421c9b1
6 changed files with 23 additions and 6 deletions
+4
View File
@@ -32,6 +32,10 @@ onMounted(() => {
'setMenus',
homeRouter.filter((item) => item.meta.isMobile),
);
console.log(
'qqq ',
homeRouter.filter((item) => item.meta.isMobile),
);
}
});
</script>
+9
View File
@@ -92,4 +92,13 @@ const route = useRoute();
.main-page {
@apply h-full;
}
.mobile {
.main-content {
height: calc(100vh - 146px);
overflow: auto;
display: block;
flex: none;
}
}
</style>
+1 -1
View File
@@ -118,7 +118,7 @@ const isText = ref(false);
&-item {
&-link {
@apply my-4;
@apply my-4 w-auto;
}
}
}
+6 -1
View File
@@ -40,6 +40,11 @@
<span :style="getLrcStyle(index)">{{ item.text }}</span>
<div class="music-lrc-text-tr">{{ item.trText }}</div>
</div>
<!-- 无歌词 -->
<div v-if="!lrcArray.length" class="music-lrc-text mt-40">
<span>暂无歌词, 请欣赏</span>
</div>
</div>
</n-layout>
<!-- 时间矫正 -->
@@ -291,7 +296,7 @@ defineExpose({
}
}
.music-lrc-text {
text-align: center;
@apply text-xl text-center;
}
}
}
+3 -3
View File
@@ -64,13 +64,13 @@
<n-slider v-model:value="volumeSlider" :step="0.01" :tooltip="false" vertical></n-slider>
</div>
</div>
<n-tooltip trigger="hover" :z-index="9999999">
<n-tooltip v-if="!isMobile" trigger="hover" :z-index="9999999">
<template #trigger>
<i class="iconfont" :class="playModeIcon" @click="togglePlayMode"></i>
</template>
{{ playModeText }}
</n-tooltip>
<n-tooltip trigger="hover" :z-index="9999999">
<n-tooltip v-if="!isMobile" trigger="hover" :z-index="9999999">
<template #trigger>
<i class="iconfont icon-likefill" :class="{ 'like-active': isFavorite }" @click="toggleFavorite"></i>
</template>
@@ -128,7 +128,7 @@ import { useStore } from 'vuex';
import SongItem from '@/components/common/SongItem.vue';
import { allTime, isElectron, isLyricWindowOpen, nowTime, openLyric, sound, textColors } from '@/hooks/MusicHook';
import type { SongResult } from '@/type/music';
import { getImgUrl, secondToMinute, setAnimationClass } from '@/utils';
import { getImgUrl, isMobile, secondToMinute, setAnimationClass } from '@/utils';
import MusicFull from './MusicFull.vue';