添加青云AI服务提供商支持,修复火山引擎图片生成问题

- 新增青云(qingyun)provider支持,提供文本/图片/视频AI服务
- 修复火山引擎img2img模式下图片尺寸问题(参考图片时强制使用2K)
- 修复火山引擎水印参数(watermark设为必需字段)
- 前端添加图片删除功能,支持删除不满意的生成图片
- 优化素材选择器布局样式,提升用户体验

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
empty
2026-01-19 00:57:12 +08:00
parent d970107a34
commit 45da3dc0ea
5 changed files with 98 additions and 8 deletions

View File

@@ -292,12 +292,20 @@
<el-icon :size="32">
<Picture />
</el-icon>
<p>生成中...</p>
<p>{{ img.status === 'failed' ? 'FAILED' : '生成中...' }}</p>
</div>
<div class="image-info">
<el-tag :type="getStatusType(img.status)" size="small">{{ getStatusText(img.status) }}</el-tag>
<span v-if="img.frame_type" class="frame-type-tag">{{ getFrameTypeText(img.frame_type) }}</span>
</div>
<el-button
class="delete-image-btn"
type="danger"
size="small"
circle
:icon="Delete"
@click.stop="deleteImage(img.id)"
/>
</div>
</div>
</div>
@@ -1652,7 +1660,28 @@ const extractLastFrame = async () => {
}
}
// 获取状态标签类型
// 删除图片生成记录
const deleteImage = async (imageId: number) => {
try {
await ElMessageBox.confirm('确定要删除该图片吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
await imageAPI.deleteImage(imageId)
ElMessage.success('删除成功')
// 刷新图片列表
if (currentStoryboard.value) {
await loadStoryboardImages(currentStoryboard.value.id, selectedFrameType.value)
}
} catch (error: any) {
if (error !== 'cancel') {
ElMessage.error('删除失败: ' + (error.message || '未知错误'))
}
}
}
const getStatusType = (status: string) => {
const statusMap: Record<string, any> = {
pending: 'info',
@@ -4317,4 +4346,20 @@ onBeforeUnmount(() => {
max-height: 80px;
overflow-y: auto;
}
.image-item {
position: relative;
}
.delete-image-btn {
position: absolute;
top: 4px;
right: 4px;
opacity: 0;
transition: opacity 0.2s;
}
.image-item:hover .delete-image-btn {
opacity: 1;
}
</style>