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

749 B
Raw Blame History

DV-0003文档编辑与文件操作 设计Design

上下文

files.pyAPIstorage.py(读写)、前端 DocumentPage/DocumentEditorpages/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。