For AI agents: the complete documentation index is available at https://a3s-lab.github.io/Office/docs/0.1.0/llms.txt, the full documentation bundle is available at https://a3s-lab.github.io/Office/docs/0.1.0/llms-full.txt, and this page is available as Markdown at https://a3s-lab.github.io/Office/docs/0.1.0/components/index.md.

组件接入

所有框架绑定都使用同一套受控内容模型。适配层只转换属性和事件约定,不会维护 第二份编辑器实现。

框架绑定

框架导入路径内容绑定
React@a3s-lab/office/reactcontentonChange
Vue@a3s-lab/office/vuev-model:content,或 content@change
Web Component@a3s-lab/office/web-component.contentchange 事件

可用编辑器

产品组件内容类型
文档DocumentEditorDocumentContent
MarkdownMarkdownEditorMarkdownContent
表格SpreadsheetEditorSpreadsheetContent
演示文稿PresentationEditorPresentationContent
PDFPdfViewer输入、输出均为 Blob

通用界面属性

属性类型默认值说明
theme'light' | 'dark' | 'system''system'编辑器配色模式。
classNamestringReact 宿主元素类名;Vue 与 Web Component 使用普通 class
styleCSSPropertiesReact 宿主元素行内样式;编辑器会填满该元素。
previewbooleanfalse受控编辑器的只读模式。
saveStatusstring各编辑器不同由宿主提供的保存状态。
fileActionsreadonly OfficeFileAction[][]保存、导出、历史记录或审批等宿主文件操作。