diff --git a/package.json b/package.json
index 89e5a7e..b81fe78 100644
--- a/package.json
+++ b/package.json
@@ -29,6 +29,7 @@
"axios": "^1.7.3",
"codemirror": "^6.0.1",
"copy-to-clipboard": "^3.3.3",
+ "localforage": "^1.10.0",
"lodash": "^4.17.21",
"markdown-it": "^14.1.0",
"naive-ui": "^2.39.0",
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 5404e59..c263c6e 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -59,6 +59,9 @@ importers:
copy-to-clipboard:
specifier: ^3.3.3
version: 3.3.3
+ localforage:
+ specifier: ^1.10.0
+ version: 1.10.0
lodash:
specifier: ^4.17.21
version: 4.17.21
@@ -890,6 +893,9 @@ packages:
resolution: {integrity: sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==}
engines: {node: '>= 6'}
+ immediate@3.0.6:
+ resolution: {integrity: sha512-XXOFtyqDjNDAQxVfYxuF7g9Il/IbWmmlQg2MYKOH8ExIT1qg6xc4zyS3HaEEATgs1btfzxq15ciUiY7gjSXRGQ==}
+
immutable@4.3.7:
resolution: {integrity: sha512-1hqclzwYwjRDFLjcFxOM5AYkkG0rpFPpr1RLPMEuGczoS7YA8gLhy8SWXYRAA/XwfEHpfo3cw5JGioS32fnMRw==}
@@ -929,9 +935,15 @@ packages:
resolution: {integrity: sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==}
engines: {node: '>=8'}
+ lie@3.1.1:
+ resolution: {integrity: sha512-RiNhHysUjhrDQntfYSfY4MU24coXXdEOgw9WGcKHNeEwffDYbF//u87M1EWaMGzuFoSbqW0C9C6lEEhDOAswfw==}
+
linkify-it@5.0.0:
resolution: {integrity: sha512-5aHCbzQRADcdP+ATqnDuhhJ/MRIqDkZX5pyjFHRRysS8vZ5AbqGEoFIb6pYHPZ+L/OC2Lc+xT8uHVVR5CAK/wQ==}
+ localforage@1.10.0:
+ resolution: {integrity: sha512-14/H1aX7hzBBmmh7sGPd+AOMkkIrHM3Z1PAyGgZigA1H1p5O5ANnMyWzvpAETtG68/dC4pC0ncy3+PPGzXZHPg==}
+
lodash-es@4.17.21:
resolution: {integrity: sha512-mKnC+QJ9pWVzv+C4/U3rRsHapFfHvQFoFB92e52xeyGMcX6/OlIl78je1u8vePzYZSkkogMPJ2yjxxsb89cxyw==}
@@ -2219,6 +2231,8 @@ snapshots:
- supports-color
optional: true
+ immediate@3.0.6: {}
+
immutable@4.3.7: {}
inflight@1.0.6:
@@ -2250,10 +2264,18 @@ snapshots:
dependencies:
is-docker: 2.2.1
+ lie@3.1.1:
+ dependencies:
+ immediate: 3.0.6
+
linkify-it@5.0.0:
dependencies:
uc.micro: 2.1.0
+ localforage@1.10.0:
+ dependencies:
+ lie: 3.1.1
+
lodash-es@4.17.21: {}
lodash@4.17.21: {}
diff --git a/src/plugins/miaoMusicPlayer/export.ts b/src/plugins/miaoMusicPlayer/export.ts
index 22eac71..482e946 100644
--- a/src/plugins/miaoMusicPlayer/export.ts
+++ b/src/plugins/miaoMusicPlayer/export.ts
@@ -8,7 +8,7 @@ const pluginConfig: registerComponentOption = {
name: '音乐',
icon: Disc,
getComponent: async () =>
- (await import('./miaoMusicPlayerDemo.vue')).default,
+ (await import('./miaoMusicPlayer.vue')).default,
filter: (vDirs, vFiles) => {
if (vDirs.length !== 0) {
return false
diff --git a/src/plugins/miaoMusicPlayer/hooks/aplayerMiao.ts b/src/plugins/miaoMusicPlayer/hooks/aplayerMiao.ts
index 5111cdc..d9527f6 100644
--- a/src/plugins/miaoMusicPlayer/hooks/aplayerMiao.ts
+++ b/src/plugins/miaoMusicPlayer/hooks/aplayerMiao.ts
@@ -1,11 +1,12 @@
import { createApp, Reactive } from "vue";
-import aplayerListNew from "../src/aplayerListNew.vue";
+import aplayerListNew from "../src/components/aplayerListNew.vue";
import apType, { audioType } from "../types/ap";
-type aplayerMiaoOption = {
+export type aplayerMiaoOption = {
onDragItemStart?: () => void
onDragItemEnd?: () => void
onPlayVideo?: (element: audioType) => void
+ onSaveCollection?: (audios: audioType[]) => void
}
/**
diff --git a/src/plugins/miaoMusicPlayer/miaoMusicPlayerDemo.vue b/src/plugins/miaoMusicPlayer/miaoMusicPlayer.vue
similarity index 71%
rename from src/plugins/miaoMusicPlayer/miaoMusicPlayerDemo.vue
rename to src/plugins/miaoMusicPlayer/miaoMusicPlayer.vue
index 0bdb5b8..adb9135 100644
--- a/src/plugins/miaoMusicPlayer/miaoMusicPlayerDemo.vue
+++ b/src/plugins/miaoMusicPlayer/miaoMusicPlayer.vue
@@ -2,14 +2,20 @@