diff --git a/apps/fronted/src/components/editor/SidePanel.tsx b/apps/fronted/src/components/editor/SidePanel.tsx index f945190..2be01ac 100644 --- a/apps/fronted/src/components/editor/SidePanel.tsx +++ b/apps/fronted/src/components/editor/SidePanel.tsx @@ -34,6 +34,12 @@ const fontOptions = [ { value: "mono", label: "等宽体" } ]; +const lineHeightOptions = [ + { value: "normal", label: "默认" }, + { value: "relaxed", label: "适中" }, + { value: "loose", label: "宽松" } +]; + function SettingCard({ icon: Icon, title, @@ -184,7 +190,6 @@ export function SidePanel() { {/* 主题色设置 */} -
@@ -226,11 +231,11 @@ export function SidePanel() { ))}
-
+
自定义
- debouncedSetColor(e.target.value)} className="w-[40px] h-[40px] rounded-lg cursor-pointer overflow-hidden hover:scale-105 transition-transform" @@ -296,6 +301,41 @@ export function SidePanel() {
+ {/* 行高选择 */} +
+ +
+ + updateGlobalSettings?.({ lineHeight: value }) + } + className={cn( + theme === "dark" + ? "[&_[role=slider]]:bg-neutral-200" + : "[&_[role=slider]]:bg-gray-900" + )} + /> + + {globalSettings?.lineHeight} + +
+
+ {/* 基础字号选择 */}