mirror of
https://github.com/algerkong/AlgerMusicPlayer.git
synced 2026-05-18 11:37:31 +08:00
refactor: 移除未使用的导入和格式问题
This commit is contained in:
@@ -132,13 +132,11 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { cloneDeep } from 'lodash';
|
|
||||||
import type { MenuOption } from 'naive-ui';
|
import type { MenuOption } from 'naive-ui';
|
||||||
import { NEllipsis, NImage, useMessage, useDialog } from 'naive-ui';
|
import { NEllipsis, NImage, useMessage, useDialog } from 'naive-ui';
|
||||||
import { computed, h, inject, ref, useTemplateRef } from 'vue';
|
import { computed, h, inject, ref, useTemplateRef } from 'vue';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
|
|
||||||
import { getSongUrl } from '@/store/modules/player';
|
|
||||||
import { useArtist } from '@/hooks/useArtist';
|
import { useArtist } from '@/hooks/useArtist';
|
||||||
import { usePlayerStore } from '@/store';
|
import { usePlayerStore } from '@/store';
|
||||||
import type { SongResult } from '@/type/music';
|
import type { SongResult } from '@/type/music';
|
||||||
@@ -350,7 +348,7 @@ const handleSelect = (key: string | number) => {
|
|||||||
showDropdown.value = false;
|
showDropdown.value = false;
|
||||||
switch (key) {
|
switch (key) {
|
||||||
case 'download':
|
case 'download':
|
||||||
downloadMusic();
|
downloadMusic(props.item);
|
||||||
break;
|
break;
|
||||||
case 'playNext':
|
case 'playNext':
|
||||||
handlePlayNext();
|
handlePlayNext();
|
||||||
@@ -376,7 +374,7 @@ const handleSelect = (key: string | number) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
// 下载音乐
|
// 下载音乐
|
||||||
const { isDownloading, downloadMusic } = useDownload();
|
const { downloadMusic } = useDownload();
|
||||||
|
|
||||||
const emits = defineEmits(['play', 'select', 'remove-song']);
|
const emits = defineEmits(['play', 'select', 'remove-song']);
|
||||||
const songImageRef = useTemplateRef('songImg');
|
const songImageRef = useTemplateRef('songImg');
|
||||||
|
|||||||
@@ -103,8 +103,6 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { cloneDeep } from 'lodash';
|
|
||||||
import { useMessage } from 'naive-ui';
|
|
||||||
import { computed, onMounted, ref, watch } from 'vue';
|
import { computed, onMounted, ref, watch } from 'vue';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
import { useRouter } from 'vue-router';
|
import { useRouter } from 'vue-router';
|
||||||
@@ -119,7 +117,6 @@ import { isElectron, setAnimationClass, setAnimationDelay } from '@/utils';
|
|||||||
|
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const playerStore = usePlayerStore();
|
const playerStore = usePlayerStore();
|
||||||
const message = useMessage();
|
|
||||||
const favoriteList = computed(() => playerStore.favoriteList);
|
const favoriteList = computed(() => playerStore.favoriteList);
|
||||||
const favoriteSongs = ref<SongResult[]>([]);
|
const favoriteSongs = ref<SongResult[]>([]);
|
||||||
const loading = ref(false);
|
const loading = ref(false);
|
||||||
|
|||||||
Reference in New Issue
Block a user