feat(frontend): 完善工作区导航与笔记属性并适配手帐主题

This commit is contained in:
2026-09-05 19:11:45 +08:00
parent d5b1050a86
commit a63f6c57e0
13 changed files with 484 additions and 23 deletions
+6
View File
@@ -13,6 +13,10 @@ export const useEditorStore = defineStore('editor', () => {
const currentFilePath = ref<string | null>(null)
const highlightBlockId = ref<string | null>(null)
const cursorPosition = ref({ line: 0, column: 0 })
const headingRequest = ref<{ index: number; offset: number; path: string | null } | null>(null)
function jumpToHeading(index: number, offset: number) {
headingRequest.value = { index, offset, path: currentFilePath.value }
}
const wordCount = computed(() => {
const text = content.value.replace(/[#*`>\-_\[\]()!]/g, '')
@@ -144,6 +148,8 @@ export const useEditorStore = defineStore('editor', () => {
}
return {
headingRequest,
jumpToHeading,
mode,
content,
saveStatus,