nex_docus/docs/sdd/specs/DV-0003-document-editing/design.md

21 lines
749 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

# DV-0003文档编辑与文件操作 设计Design
## 上下文
`files.py`API、`storage.py`(读写)、前端 `DocumentPage/DocumentEditor`pages/Document、Markdown 组件 bytemd。
## 接口设计
- GET /api/v1/files/{project_id}/tree
- GET|POST /api/v1/files/{project_id}/file
- POST /api/v1/files/{project_id}/file/operate
- POST /api/v1/files/{project_id}/upload{,-document}
- POST /api/v1/files/{project_id}/import-documents
- GET /api/v1/files/{project_id}/export-directory
- GET /api/v1/files/{project_id}/export-pdf
## 前端
- 左侧目录树,右侧 Markdown 编辑/预览PDF 用 react-pdf长列表虚拟滚动。
## 状态与降级
- 写文件自动创建父目录重命名目标冲突→400。