导入收藏时,更新收藏项的源站信息

This commit is contained in:
haiyangcui
2020-10-24 14:14:44 +02:00
parent ecfeecf45f
commit 11af5a7ecd

View File

@@ -335,6 +335,11 @@ export default {
result.filePaths.forEach(file => {
var str = fs.readFileSync(file)
const json = JSON.parse(str)
json.forEach(ele => {
if (ele.site === undefined) {
ele.site = this.sites.find(x => x.key === ele.key)
}
})
star.bulkAdd(json).then(e => {
this.getFavorites()
})