代码问题

This commit is contained in:
2025-11-23 01:02:47 +08:00
parent 4377dc8dc8
commit 8f3a73433f
4 changed files with 17 additions and 12 deletions

View File

@@ -18,9 +18,11 @@ export const useVoiceCopyStore = defineStore('voiceCopy', {
/**
* 加载配音列表
*/
async load() {
if (this.loaded && !this.loading) return
async load(forceRefresh = false) {
if(!forceRefresh){
if (this.loaded && !this.loading) return
}
this.loading = true
try {
const res = await VoiceService.getPage({
@@ -166,7 +168,7 @@ export const useVoiceCopyStore = defineStore('voiceCopy', {
*/
async refresh() {
this.loaded = false
await this.load()
await this.load(true)
}
}
})