切换markdown渲染为cm6
This commit is contained in:
@@ -15,10 +15,12 @@ const props = withDefaults(
|
||||
entries: DirEntry[];
|
||||
content?: string;
|
||||
currentFilePath?: string | null;
|
||||
isFullWidth?: boolean;
|
||||
}>(),
|
||||
{
|
||||
content: "",
|
||||
currentFilePath: null,
|
||||
isFullWidth: false,
|
||||
},
|
||||
);
|
||||
|
||||
@@ -29,6 +31,7 @@ const emit = defineEmits<{
|
||||
openFile: [path: string];
|
||||
createFile: [];
|
||||
createFolder: [];
|
||||
toggleFullWidth: [value: boolean];
|
||||
}>();
|
||||
|
||||
// Wrap the workspace root as a top-level tree node
|
||||
@@ -244,10 +247,31 @@ const showSettings = ref(false);
|
||||
<i class="ri-close-line text-base"></i>
|
||||
</button>
|
||||
</div>
|
||||
<div class="px-4 py-6">
|
||||
<p class="text-xs text-[#b8b3a8] text-center leading-relaxed">
|
||||
设置功能即将上线
|
||||
</p>
|
||||
<div class="px-4 py-6 space-y-5">
|
||||
<!-- Full-width mode toggle -->
|
||||
<div class="flex items-center justify-between">
|
||||
<div class="flex-1 mr-3">
|
||||
<p class="text-sm text-[#38342e] font-medium">全宽模式</p>
|
||||
<p class="text-xs text-[#8c877d] mt-0.5 leading-relaxed">关闭后编辑器居中显示,适合专注书写</p>
|
||||
</div>
|
||||
<button
|
||||
type="button"
|
||||
role="switch"
|
||||
:aria-checked="props.isFullWidth"
|
||||
:class="[
|
||||
'relative inline-flex h-5 w-9 shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out focus:outline-none',
|
||||
props.isFullWidth ? 'bg-[#bf6a3b]' : 'bg-[#d4cfc4]',
|
||||
]"
|
||||
@click="emit('toggleFullWidth', !props.isFullWidth)"
|
||||
>
|
||||
<span
|
||||
:class="[
|
||||
'pointer-events-none inline-block h-4 w-4 rounded-full bg-white shadow-sm ring-0 transition-transform duration-200 ease-in-out',
|
||||
props.isFullWidth ? 'translate-x-4' : 'translate-x-0',
|
||||
]"
|
||||
/>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user