fix(frontend): 修复合并审阅发现的构建与契约问题
恢复 Vue TypeScript 生产构建,补齐可运行页面壳子,并修复文件树与 SSE 状态问题。 按 FastAPI Wire Contract 统一 Service DTO 映射,同时补充前端开发说明和问题修复复盘。
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
<script setup lang="ts">
|
||||
import { useEditorStore } from '@/stores/editor'
|
||||
import { useWorkspaceStore } from '@/stores/workspace'
|
||||
|
||||
const editorStore = useEditorStore()
|
||||
const workspaceStore = useWorkspaceStore()
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<header class="editor-header">
|
||||
<strong>{{ workspaceStore.activeFile?.name ?? '未命名笔记' }}</strong>
|
||||
<span>{{ editorStore.saveStatus }}</span>
|
||||
</header>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.editor-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
min-height: 40px;
|
||||
padding: 0 var(--space-lg);
|
||||
border-bottom: 1px solid var(--color-border-subtle);
|
||||
color: var(--color-text-secondary);
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,30 @@
|
||||
<script setup lang="ts">
|
||||
import { useEditorStore } from '@/stores/editor'
|
||||
|
||||
const editorStore = useEditorStore()
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<textarea
|
||||
class="editor-pane"
|
||||
:value="editorStore.content"
|
||||
spellcheck="false"
|
||||
@input="editorStore.updateContent(($event.target as HTMLTextAreaElement).value); editorStore.scheduleAutoSave()"
|
||||
/>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.editor-pane {
|
||||
box-sizing: border-box;
|
||||
flex: 1;
|
||||
width: 100%;
|
||||
resize: none;
|
||||
border: 0;
|
||||
outline: 0;
|
||||
padding: var(--space-xl);
|
||||
background: var(--color-background-primary);
|
||||
color: var(--color-text-primary);
|
||||
font: inherit;
|
||||
line-height: 1.7;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user