fix: 工程类型与素材风格标签分离,支持双栏自定义标签

- 工程层面:新增 PROJECT_TYPES(2D平台跳跃/角色扮演等8种),替代原先与素材生成重复的风格标签栏
- 素材生成层面:StyleSelector 作为素材风格主配置项,新增 CustomTagsEditor 支持任务级自定义标签
- extractTags 合并工程类型、风格分类、工程自定义标签、任务自定义标签
- StyleSelector 支持 categories 参数复用
- 后端:spritesheet 拆分失败回退为单帧、GIF 上传为独立素材、AssetResponse 增加 metadata 字段
This commit is contained in:
2026-05-25 19:31:36 +08:00
parent c48ba6e61d
commit ab2b72e746
14 changed files with 149 additions and 57 deletions
+12 -2
View File
@@ -1,4 +1,5 @@
import { useState } from 'react'
import { PROJECT_TYPES, PROJECT_TYPE_KEY } from '../utils/style'
import StyleSelector from './StyleSelector'
import CustomTagsEditor from './CustomTagsEditor'
@@ -91,9 +92,18 @@ export default function CreateProjectModal({
<div style={{ marginBottom: 16 }}>
<span style={{ display: 'block', fontSize: 13, fontWeight: 600, marginBottom: 8, color: 'var(--text-secondary)' }}>
风格配置
工程类型
</span>
<StyleSelector value={style} onChange={handleStyleChange} compact />
<StyleSelector
value={style}
onChange={handleStyleChange}
compact
categories={[{
key: PROJECT_TYPE_KEY,
label: '工程类型',
options: PROJECT_TYPES.map(p => ({ value: p.value, label: p.label })),
}]}
/>
<CustomTagsEditor style={style} onChange={setStyle} />
</div>