* 更新图片生成进度 * @param index 页面索引 * @param status 生成状态 * @param url 图片URL(可选) * @param error 错误信息(可选)
(index: number, status: 'generating' | 'done' | 'error', url?: string, error?: string)
| 309 | * @param error 错误信息(可选) |
| 310 | */ |
| 311 | updateProgress(index: number, status: 'generating' | 'done' | 'error', url?: string, error?: string) { |
| 312 | const image = this.images.find(img => img.index === index) |
| 313 | if (image) { |
| 314 | image.status = status |
| 315 | if (url) image.url = url |
| 316 | if (error) image.error = error |
| 317 | } |
| 318 | // 成功完成时增加计数 |
| 319 | if (status === 'done') { |
| 320 | this.progress.current++ |
| 321 | } |
| 322 | }, |
| 323 | |
| 324 | /** |
| 325 | * 更新指定图片的URL |
nothing calls this directly
no outgoing calls
no test coverage detected