diff --git a/frontend/src/components/GenerateForm.tsx b/frontend/src/components/GenerateForm.tsx index 40a05ec..a0ebad9 100644 --- a/frontend/src/components/GenerateForm.tsx +++ b/frontend/src/components/GenerateForm.tsx @@ -5,6 +5,29 @@ import { mergeStyles } from '../utils/style' import StyleSelector from './StyleSelector' import PromptEditor from './PromptEditor' +const ASSET_TYPE_ICONS: Record = { + sprite: ( + + + + ), + background: ( + + + + ), + ui: ( + + + + ), + animation: ( + + + + ), +} + const ASSET_TYPES: { value: AssetType; label: string }[] = [ { value: 'sprite', label: '精灵' }, { value: 'background', label: '背景' }, @@ -58,18 +81,37 @@ export default function GenerateForm({ onSubmit, submitting }: GenerateFormProps

素材类型

-
- {ASSET_TYPES.map(t => ( - - ))} +
+ {ASSET_TYPES.map(t => { + const isSelected = assetType === t.value + return ( + + ) + })}