chore: try getFavorites one by one
https://github.com/Physton/sd-webui-prompt-all-in-one/issues/328pull/337/head
parent
d806005dad
commit
9a2a366e65
|
|
@ -120,10 +120,10 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
emits: ['use'],
|
emits: ['use'],
|
||||||
mounted() {
|
async mounted() {
|
||||||
this.favorites.forEach(item => {
|
for (const item of this.favorites) {
|
||||||
this.getFavorites(item.key)
|
await this.getFavorites(item.key)
|
||||||
})
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
formatTime(time) {
|
formatTime(time) {
|
||||||
|
|
@ -134,7 +134,7 @@ export default {
|
||||||
let favoriteItem = this.favorites.find(item => item.key === favoriteKey)
|
let favoriteItem = this.favorites.find(item => item.key === favoriteKey)
|
||||||
if (!favoriteItem) return
|
if (!favoriteItem) return
|
||||||
this.loading = true
|
this.loading = true
|
||||||
this.gradioAPI.getFavorites(favoriteKey).then(res => {
|
return this.gradioAPI.getFavorites(favoriteKey).then(res => {
|
||||||
if(res && res.length > 0){
|
if(res && res.length > 0){
|
||||||
// 倒序
|
// 倒序
|
||||||
res.reverse()
|
res.reverse()
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue