# word插件 **Repository Path**: ldesign/ldesign-word ## Basic Information - **Project Name**: word插件 - **Description**: No description available - **Primary Language**: TypeScript - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-02-09 - **Last Updated**: 2026-03-11 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # @ldesign/word > LDesign Word 文档预览组件,基于 docx-preview 实现 Word 文档在线浏览 ## 特性 - 📝 Word 预览 - 支持 .docx 格式 - 🎨 样式保留 - 保留原始格式 - 🖼️ 图片支持 - 显示文档图片 - 📱 响应式设计 ## 安装 ```bash npm install @ldesign/word ``` ## 使用 ```vue ``` ## API ### Props - `src` - Word 文件 URL 或 ArrayBuffer - `width` - 容器宽度 - `height` - 容器高度 ### Events - `load` - Word 加载完成 - `error`word="'/path/to/file.docx'" style="height: 500px" /> ``` ### 原生 JS ```js import { WordEngine } from '@ldesign/word' const engine = new WordEngine({ src: '/path/to/file.docx', }) await engine.mount('#word-viewer') ``` ## License ISC