Skip to content

Commit

Permalink
chore: try getFavorites one by one
Browse files Browse the repository at this point in the history
  • Loading branch information
bluelovers committed Jun 6, 2024
1 parent d806005 commit 9a2a366
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/src/components/favorite.vue
Original file line number Diff line number Diff line change
Expand Up @@ -120,10 +120,10 @@ export default {
}
},
emits: ['use'],
mounted() {
this.favorites.forEach(item => {
this.getFavorites(item.key)
})
async mounted() {
for (const item of this.favorites) {
await this.getFavorites(item.key)
}
},
methods: {
formatTime(time) {
Expand All @@ -134,7 +134,7 @@ export default {
let favoriteItem = this.favorites.find(item => item.key === favoriteKey)
if (!favoriteItem) return
this.loading = true
this.gradioAPI.getFavorites(favoriteKey).then(res => {
return this.gradioAPI.getFavorites(favoriteKey).then(res => {
if(res && res.length > 0){
// 倒序
res.reverse()
Expand Down

0 comments on commit 9a2a366

Please sign in to comment.