From 006da66028bbae652fbacf3caf9a5bd121fbcbc3 Mon Sep 17 00:00:00 2001 From: lyswhut Date: Thu, 28 Jan 2021 14:09:22 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AF=BC=E5=87=BA=E6=AD=8C=E5=8D=95=E7=A7=BB?= =?UTF-8?q?=E9=99=A4=E6=8D=A2=E6=BA=90=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/renderer/views/Setting.vue | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/renderer/views/Setting.vue b/src/renderer/views/Setting.vue index c8830bfb..27c9ad8b 100644 --- a/src/renderer/views/Setting.vue +++ b/src/renderer/views/Setting.vue @@ -719,13 +719,18 @@ export default { } }, exportPlayList(path) { - const data = { + const data = JSON.parse(JSON.stringify({ type: 'playList', data: [ this.defaultList, this.loveList, ...this.userList, ], + })) + for (const list of data.data) { + for (const item of list.list) { + if (item.otherSource) delete item.otherSource + } } this.handleSaveFile(path, JSON.stringify(data)) }, @@ -750,7 +755,7 @@ export default { } }, async exportAllData(path) { - let allData = { + let allData = JSON.parse(JSON.stringify({ type: 'allData', setting: Object.assign({ version: this.settingVersion }, this.setting), playList: [ @@ -758,6 +763,11 @@ export default { this.loveList, ...this.userList, ], + })) + for (const list of allData.playList) { + for (const item of list.list) { + if (item.otherSource) delete item.otherSource + } } this.handleSaveFile(path, JSON.stringify(allData)) },