mirror of
https://github.com/algerkong/AlgerMusicPlayer.git
synced 2026-04-24 08:07:23 +08:00
🌈 style: 优化代码格式化
This commit is contained in:
@@ -28,7 +28,7 @@
|
||||
<play-bar v-if="isPlay" :style="isMobile && store.state.musicFull ? 'bottom: 0;' : ''" />
|
||||
</div>
|
||||
<install-app-modal v-if="!isElectron"></install-app-modal>
|
||||
<update-modal v-if="isElectron"/>
|
||||
<update-modal v-if="isElectron" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -39,9 +39,9 @@ import { useStore } from 'vuex';
|
||||
|
||||
import InstallAppModal from '@/components/common/InstallAppModal.vue';
|
||||
import PlayBottom from '@/components/common/PlayBottom.vue';
|
||||
import UpdateModal from '@/components/common/UpdateModal.vue';
|
||||
import homeRouter from '@/router/home';
|
||||
import { isElectron, isMobile } from '@/utils';
|
||||
import UpdateModal from '@/components/common/UpdateModal.vue';
|
||||
|
||||
const keepAliveInclude = computed(() =>
|
||||
homeRouter
|
||||
|
||||
@@ -116,11 +116,15 @@ const lrcScroll = (behavior = 'smooth') => {
|
||||
const debouncedLrcScroll = useDebounceFn(lrcScroll, 200);
|
||||
|
||||
const mouseOverLayout = () => {
|
||||
if(isMobile.value) {return}
|
||||
if (isMobile.value) {
|
||||
return;
|
||||
}
|
||||
isMouse.value = true;
|
||||
};
|
||||
const mouseLeaveLayout = () => {
|
||||
if(isMobile.value) {return}
|
||||
if (isMobile.value) {
|
||||
return;
|
||||
}
|
||||
setTimeout(() => {
|
||||
isMouse.value = false;
|
||||
lrcScroll();
|
||||
|
||||
@@ -140,7 +140,7 @@
|
||||
</n-popover>
|
||||
</div>
|
||||
<!-- 播放音乐 -->
|
||||
<music-full ref="MusicFullRef" v-model:music-full="musicFullVisible" :background="background" />
|
||||
<music-full ref="MusicFullRef" v-model:music-full="musicFullVisible" :background="background" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -159,7 +159,7 @@ import {
|
||||
textColors
|
||||
} from '@/hooks/MusicHook';
|
||||
import type { SongResult } from '@/type/music';
|
||||
import { getImgUrl, isMobile, secondToMinute, setAnimationClass, isElectron } from '@/utils';
|
||||
import { getImgUrl, isElectron, isMobile, secondToMinute, setAnimationClass } from '@/utils';
|
||||
|
||||
import MusicFull from './MusicFull.vue';
|
||||
|
||||
|
||||
@@ -96,7 +96,7 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { onMounted, ref, watchEffect, computed } from 'vue';
|
||||
import { computed, onMounted, ref, watchEffect } from 'vue';
|
||||
import { useRouter } from 'vue-router';
|
||||
import { useStore } from 'vuex';
|
||||
|
||||
@@ -240,7 +240,7 @@ const checkForUpdates = async () => {
|
||||
|
||||
const toGithubRelease = () => {
|
||||
if (updateInfo.value.hasUpdate) {
|
||||
store.commit('setShowUpdateModal', true)
|
||||
store.commit('setShowUpdateModal', true);
|
||||
} else {
|
||||
window.open('https://github.com/algerkong/AlgerMusicPlayer/releases', '_blank');
|
||||
}
|
||||
@@ -317,7 +317,7 @@ const toGithubRelease = () => {
|
||||
|
||||
.version-info {
|
||||
@apply ml-auto flex items-center;
|
||||
|
||||
|
||||
.version-number {
|
||||
@apply text-xs px-2 py-0.5 rounded;
|
||||
@apply bg-gray-100 dark:bg-gray-700 text-gray-600 dark:text-gray-300;
|
||||
|
||||
@@ -36,6 +36,7 @@
|
||||
<script setup lang="ts">
|
||||
import { ref } from 'vue';
|
||||
import { useStore } from 'vuex';
|
||||
|
||||
import { isElectron } from '@/utils';
|
||||
|
||||
const store = useStore();
|
||||
@@ -56,7 +57,7 @@ const handleAction = (action: 'minimize' | 'close') => {
|
||||
closeAction: action
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
if (action === 'minimize') {
|
||||
window.api.miniTray();
|
||||
} else {
|
||||
@@ -70,13 +71,13 @@ const close = () => {
|
||||
return;
|
||||
}
|
||||
|
||||
const closeAction = store.state.setData.closeAction;
|
||||
|
||||
const { closeAction } = store.state.setData;
|
||||
|
||||
if (closeAction === 'minimize') {
|
||||
window.api.miniTray();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if (closeAction === 'close') {
|
||||
window.api.close();
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user