fix: 修复工程类型双重标签和自定义标签无法点击的问题
- 移除 CreateProjectModal/ProjectConfigPanel 中外层重复的"工程类型"标签 - CustomTagsEditor 标签 pill 改为 button,点击整个 pill 即可移除标签
This commit is contained in:
@@ -91,9 +91,6 @@ export default function CreateProjectModal({
|
|||||||
</label>
|
</label>
|
||||||
|
|
||||||
<div style={{ marginBottom: 16 }}>
|
<div style={{ marginBottom: 16 }}>
|
||||||
<span style={{ display: 'block', fontSize: 13, fontWeight: 600, marginBottom: 8, color: 'var(--text-secondary)' }}>
|
|
||||||
工程类型
|
|
||||||
</span>
|
|
||||||
<StyleSelector
|
<StyleSelector
|
||||||
value={style}
|
value={style}
|
||||||
onChange={handleStyleChange}
|
onChange={handleStyleChange}
|
||||||
|
|||||||
@@ -32,8 +32,10 @@ export default function CustomTagsEditor({ style, onChange }: CustomTagsEditorPr
|
|||||||
</div>
|
</div>
|
||||||
<div style={{ display: 'flex', flexWrap: 'wrap', gap: 6, marginBottom: 8 }}>
|
<div style={{ display: 'flex', flexWrap: 'wrap', gap: 6, marginBottom: 8 }}>
|
||||||
{tags.map(tag => (
|
{tags.map(tag => (
|
||||||
<span
|
<button
|
||||||
key={tag}
|
key={tag}
|
||||||
|
type="button"
|
||||||
|
onClick={() => onChange(removeCustomTag(style, tag))}
|
||||||
style={{
|
style={{
|
||||||
display: 'inline-flex',
|
display: 'inline-flex',
|
||||||
alignItems: 'center',
|
alignItems: 'center',
|
||||||
@@ -43,25 +45,21 @@ export default function CustomTagsEditor({ style, onChange }: CustomTagsEditorPr
|
|||||||
borderRadius: 999,
|
borderRadius: 999,
|
||||||
background: 'var(--bg-input)',
|
background: 'var(--bg-input)',
|
||||||
border: '1px solid var(--border)',
|
border: '1px solid var(--border)',
|
||||||
|
color: 'var(--text-primary)',
|
||||||
|
cursor: 'pointer',
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{tag}
|
{tag}
|
||||||
<button
|
<span
|
||||||
type="button"
|
|
||||||
style={{
|
style={{
|
||||||
background: 'transparent',
|
|
||||||
border: 'none',
|
|
||||||
color: 'var(--text-muted)',
|
color: 'var(--text-muted)',
|
||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
padding: 0,
|
|
||||||
lineHeight: 1,
|
lineHeight: 1,
|
||||||
cursor: 'pointer',
|
|
||||||
}}
|
}}
|
||||||
onClick={() => onChange(removeCustomTag(style, tag))}
|
|
||||||
>
|
>
|
||||||
x
|
x
|
||||||
</button>
|
</span>
|
||||||
</span>
|
</button>
|
||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
<div style={{ display: 'flex', gap: 8 }}>
|
<div style={{ display: 'flex', gap: 8 }}>
|
||||||
|
|||||||
@@ -73,9 +73,6 @@ export default function ProjectConfigPanel() {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div style={{ flex: 1, overflow: 'auto', padding: '12px 16px' }}>
|
<div style={{ flex: 1, overflow: 'auto', padding: '12px 16px' }}>
|
||||||
<div style={{ fontSize: 13, fontWeight: 600, marginBottom: 8, color: 'var(--text-secondary)' }}>
|
|
||||||
工程类型
|
|
||||||
</div>
|
|
||||||
<StyleSelector
|
<StyleSelector
|
||||||
value={draftStyle}
|
value={draftStyle}
|
||||||
onChange={updateDraft}
|
onChange={updateDraft}
|
||||||
|
|||||||
Reference in New Issue
Block a user