fix: 修复工程类型双重标签和自定义标签无法点击的问题

- 移除 CreateProjectModal/ProjectConfigPanel 中外层重复的"工程类型"标签
- CustomTagsEditor 标签 pill 改为 button,点击整个 pill 即可移除标签
This commit is contained in:
2026-05-25 19:46:04 +08:00
parent a518168762
commit 9d3b8fcd20
3 changed files with 8 additions and 16 deletions
@@ -91,9 +91,6 @@ export default function CreateProjectModal({
</label>
<div style={{ marginBottom: 16 }}>
<span style={{ display: 'block', fontSize: 13, fontWeight: 600, marginBottom: 8, color: 'var(--text-secondary)' }}>
工程类型
</span>
<StyleSelector
value={style}
onChange={handleStyleChange}
+8 -10
View File
@@ -32,8 +32,10 @@ export default function CustomTagsEditor({ style, onChange }: CustomTagsEditorPr
</div>
<div style={{ display: 'flex', flexWrap: 'wrap', gap: 6, marginBottom: 8 }}>
{tags.map(tag => (
<span
<button
key={tag}
type="button"
onClick={() => onChange(removeCustomTag(style, tag))}
style={{
display: 'inline-flex',
alignItems: 'center',
@@ -43,25 +45,21 @@ export default function CustomTagsEditor({ style, onChange }: CustomTagsEditorPr
borderRadius: 999,
background: 'var(--bg-input)',
border: '1px solid var(--border)',
color: 'var(--text-primary)',
cursor: 'pointer',
}}
>
{tag}
<button
type="button"
<span
style={{
background: 'transparent',
border: 'none',
color: 'var(--text-muted)',
fontSize: 14,
padding: 0,
lineHeight: 1,
cursor: 'pointer',
}}
onClick={() => onChange(removeCustomTag(style, tag))}
>
x
</button>
</span>
</span>
</button>
))}
</div>
<div style={{ display: 'flex', gap: 8 }}>
@@ -73,9 +73,6 @@ export default function ProjectConfigPanel() {
</div>
<div style={{ flex: 1, overflow: 'auto', padding: '12px 16px' }}>
<div style={{ fontSize: 13, fontWeight: 600, marginBottom: 8, color: 'var(--text-secondary)' }}>
工程类型
</div>
<StyleSelector
value={draftStyle}
onChange={updateDraft}