fix(generate): #1970 Step1 智能降重开关紧贴标题文字 #1977

Merged
auto-approve-bot merged 1 commits from fix/1970-dedup-toggle-layout into develop 2026-09-18 10:40:00 +08:00
@@ -212,52 +212,50 @@ const Step1EditMode: React.FC<Step1EditModeProps> = ({
className="xx-form-field"
style={{
marginTop: 16,
display: "flex",
alignItems: "center",
justifyContent: "space-between",
padding: "12px 16px",
background: "#f9fafb",
borderRadius: 8,
}}
>
<div>
<div style={{ fontSize: 14, fontWeight: 500, color: "#111" }}>
<div style={{ display: "flex", alignItems: "center", gap: 8 }}>
<span style={{ fontSize: 14, fontWeight: 500, color: "#111" }}>
🎯 智能降重 {dedupEnabled ? "已开启" : "已关闭"}
</div>
<div style={{ fontSize: 12, color: "#6b7280", marginTop: 2 }}>
自动对画面做微调,避免查重不过
</div>
</div>
<button
type="button"
onClick={() => onDedupEnabledChange(!dedupEnabled)}
style={{
width: 44,
height: 24,
borderRadius: 12,
border: "none",
background: dedupEnabled ? PURPLE : "#d1d5db",
position: "relative",
cursor: "pointer",
transition: "background 0.2s",
padding: 0,
}}
aria-label="toggle dedup"
>
<span
</span>
<button
type="button"
onClick={() => onDedupEnabledChange(!dedupEnabled)}
style={{
position: "absolute",
top: 2,
left: dedupEnabled ? 22 : 2,
width: 20,
height: 20,
borderRadius: "50%",
background: "#fff",
transition: "left 0.2s",
boxShadow: "0 1px 3px rgba(0,0,0,0.2)",
width: 44,
height: 24,
borderRadius: 12,
border: "none",
background: dedupEnabled ? PURPLE : "#d1d5db",
position: "relative",
cursor: "pointer",
transition: "background 0.2s",
padding: 0,
flexShrink: 0,
}}
/>
</button>
aria-label="toggle dedup"
>
<span
style={{
position: "absolute",
top: 2,
left: dedupEnabled ? 22 : 2,
width: 20,
height: 20,
borderRadius: "50%",
background: "#fff",
transition: "left 0.2s",
boxShadow: "0 1px 3px rgba(0,0,0,0.2)",
}}
/>
</button>
</div>
<div style={{ fontSize: 12, color: "#6b7280", marginTop: 4 }}>
自动对画面做微调,避免查重不过
</div>
</div>
</div>
)