@7niao/doc-previewer 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # @7niao/doc-previewer
1
+ # @7niao/doc-previewer(Trae CN + DeepSeek-v4.1-Flash)
2
2
 
3
3
  基于 Vue 3 + TypeScript 的通用文件预览组件。按文件类型自动选择渲染器并按需懒加载,内置缩放、旋转、下载、打印、全屏与画布拖拽平移,可作为一个独立组件接入任意 Vue 3 项目。
4
4
 
@@ -47,7 +47,6 @@ const options = {
47
47
  height: '640px',
48
48
  showFileInfo: true,
49
49
  zoom: { min: 0.1, max: 8, step: 0.2 },
50
- pdfMaxPages: 50,
51
50
  }
52
51
  </script>
53
52
 
@@ -126,7 +125,6 @@ cp -R node_modules/@7niao/doc-previewer/dist/libarchive public/libarchive
126
125
  | `toolbar` | `boolean` | `true` | 是否显示顶部工具栏 |
127
126
  | `showFileInfo` | `boolean` | `true` | 是否显示文件名与格式信息 |
128
127
  | `zoom` | `{ min?: number; max?: number; step?: number }` | `{ min: 0.1, max: 10, step: 0.2 }` | 缩放范围与每步倍率 |
129
- | `pdfMaxPages` | `number` | `50` | PDF 最多渲染页数,超出部分给出提示 |
130
128
  | `mapTiles` | `string \| false` | 不加载在线底图 | GIS 底图瓦片地址模板,如 `https://tile.openstreetmap.org/{z}/{x}/{y}.png` |
131
129
  | `cadLineColor` | `string` | `'#1f2937'` | CAD 线条颜色 |
132
130
  | `textMaxLength` | `number` | `2000000` | 文本预览最大字符数,超出截断 |
@@ -139,7 +137,7 @@ cp -R node_modules/@7niao/doc-previewer/dist/libarchive public/libarchive
139
137
  | --- | --- | --- | --- |
140
138
  | 图片 | jpg/jpeg/png/gif/webp/avif/bmp/ico/svg/tif | 原生 `<img>` | 自适应适口,支持缩放、旋转、拖拽 |
141
139
  | 音视频 | mp4/webm/ogv/mov/m4v/mkv、mp3/wav/ogg/aac/flac/m4a | 原生 `<video>` / `<audio>` | 使用浏览器原生控制条,不提供缩放 |
142
- | PDF | pdf | `pdfjs-dist` | Canvas 逐页渲染,默认上限 50 页,打印走隐藏 iframe |
140
+ | PDF | pdf | `pdfjs-dist` | Canvas 单页渲染,支持上一页 / 下一页翻页并显示页码,打印走隐藏 iframe |
143
141
  | Word | docx/doc | `docx-preview` | 保留分页与样式;复杂域、嵌入对象可能降级 |
144
142
  | Excel | xlsx/xlsm/xls/csv/ods | `xlsx`(SheetJS) | 转 HTML 展示,支持多 Sheet 切换 |
145
143
  | PPT | pptx/ppt | `pptx-preview` | 列表模式近似还原版式,动画与部分特效不渲染 |