完善预览功能
This commit is contained in:
@@ -78,6 +78,7 @@ const props = withDefaults(
|
||||
defaultDocumentMode?: DocumentMode;
|
||||
appTheme?: AppTheme;
|
||||
renderSingleLineBreaks?: boolean;
|
||||
paragraphIndent?: boolean;
|
||||
}>(),
|
||||
{
|
||||
initialPage: "about",
|
||||
@@ -85,6 +86,7 @@ const props = withDefaults(
|
||||
defaultDocumentMode: "edit",
|
||||
appTheme: "warm",
|
||||
renderSingleLineBreaks: false,
|
||||
paragraphIndent: false,
|
||||
},
|
||||
);
|
||||
|
||||
@@ -93,6 +95,7 @@ const emit = defineEmits<{
|
||||
updateDefaultDocumentMode: [mode: DocumentMode];
|
||||
updateAppTheme: [theme: AppTheme];
|
||||
updateRenderSingleLineBreaks: [value: boolean];
|
||||
updateParagraphIndent: [value: boolean];
|
||||
prepareWorkspaceSync: [done: (saved: boolean) => void];
|
||||
workspaceSynced: [];
|
||||
}>();
|
||||
@@ -604,6 +607,20 @@ onBeforeUnmount(() => {
|
||||
<span></span>
|
||||
</label>
|
||||
</div>
|
||||
<div class="settings-row">
|
||||
<div class="settings-copy">
|
||||
<h3>段落首行缩进</h3>
|
||||
<p>开启后,预览和混合模式下段落首行会缩进两个字符,更符合中文排版习惯。</p>
|
||||
</div>
|
||||
<label class="settings-switch" title="段落首行缩进">
|
||||
<input
|
||||
:checked="paragraphIndent"
|
||||
type="checkbox"
|
||||
@change="emit('updateParagraphIndent', ($event.target as HTMLInputElement).checked)"
|
||||
/>
|
||||
<span></span>
|
||||
</label>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user