feat: 优化解析功能,添加缓存

This commit is contained in:
alger
2025-09-14 01:03:29 +08:00
parent 8f0728d9db
commit 659c9f9a4c
4 changed files with 654 additions and 192 deletions
+11 -5
View File
@@ -55,11 +55,17 @@ export const textColors = ref<any>(getTextColors());
export let playMusic: ComputedRef<SongResult>;
export let artistList: ComputedRef<Artist[]>;
export const musicDB = await useIndexedDB('musicDB', [
{ name: 'music', keyPath: 'id' },
{ name: 'music_lyric', keyPath: 'id' },
{ name: 'api_cache', keyPath: 'id' }
]);
export const musicDB = await useIndexedDB(
'musicDB',
[
{ name: 'music', keyPath: 'id' },
{ name: 'music_lyric', keyPath: 'id' },
{ name: 'api_cache', keyPath: 'id' },
{ name: 'music_url_cache', keyPath: 'id' },
{ name: 'music_failed_cache', keyPath: 'id' }
],
2
);
// 键盘事件处理器,在初始化后设置
const setupKeyboardListeners = () => {