mirror of
https://github.com/501351981/vue-office.git
synced 2025-06-15 07:00:00 +08:00
4 lines
3.2 KiB
JavaScript
4 lines
3.2 KiB
JavaScript
import{_ as a,c as e,o as s,O as t}from"./chunks/framework.935eb42c.js";const _=JSON.parse('{"title":"属性","description":"","frontmatter":{},"headers":[],"relativePath":"config/index.md"}'),l={name:"config/index.md"},o=t(`<h1 id="属性" tabindex="-1">属性 <a class="header-anchor" href="#属性" aria-label="Permalink to "属性""></a></h1><h2 id="src" tabindex="-1">src <a class="header-anchor" href="#src" aria-label="Permalink to "src""></a></h2><ul><li>类型:String, ArrayBuffer, Blob</li></ul><p>文档地址,文件在CDN或服务器上的地址,或者是通过FileReader读取的文件ArrayBuffer或者Blob格式。</p><h2 id="request-options" tabindex="-1">request-options <a class="header-anchor" href="#request-options" aria-label="Permalink to "request-options""></a></h2><ul><li>类型:Object</li></ul><p>如果属性src是个文件地址,组件内部会通过window.fetch进行请求,对应window.fetch的请求参数,可以用来设置header等请求信息。</p><h2 id="options-xlsx特有属性" tabindex="-1">options [xlsx特有属性] <a class="header-anchor" href="#options-xlsx特有属性" aria-label="Permalink to "options [xlsx特有属性]""></a></h2><ul><li>类型: Object</li></ul><p>excel相关的配置,目前支持配置项很少。</p><p>minColLength: excel最少渲染多少列,如果想实现xlsx文件内容有几列,就渲染几列,可以将此值设置为0.</p><div class="language-json"><button title="Copy Code" class="copy"></button><span class="lang">json</span><pre class="shiki material-theme-palenight"><code><span class="line"><span style="color:#89DDFF;">{</span></span>
|
||
<span class="line"><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">"</span><span style="color:#C792EA;">minColLength</span><span style="color:#89DDFF;">"</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#F78C6C;">20</span><span style="color:#A6ACCD;"> </span></span>
|
||
<span class="line"><span style="color:#89DDFF;">}</span></span></code></pre></div><h2 id="staticfileurl-pdf特有属性" tabindex="-1">staticFileUrl [pdf特有属性] <a class="header-anchor" href="#staticfileurl-pdf特有属性" aria-label="Permalink to "staticFileUrl [pdf特有属性]""></a></h2><ul><li>类型: String</li></ul><p>pdf渲染时可能会请求一些bcmap文件,这些文件默认从 <a href="https://unpkg.com/pdfjs-dist@3.1.81/" target="_blank" rel="noreferrer">https://unpkg.com/pdfjs-dist@3.1.81/</a> 加载,但是可能存在网络不通问题,如果遇到这种问题,可以将这些文件放到自己静态目录,然后修改该属性,告诉组件去这里请求bcmap文件。</p><p>涉及的文件存放在当前github项目中examples/public/cmaps目录下,可将cmaps目录复制到你的静态服务目录下,然后修改staticFileUrl为cmaps文件夹对应的父地址,必须已http或https开头,如 <a href="http://yourdomain/static/" target="_blank" rel="noreferrer">http://yourdomain/static/</a></p>`,16),n=[o];function r(i,p,c,d,h,u){return s(),e("div",null,n)}const m=a(l,[["render",r]]);export{_ as __pageData,m as default};
|