<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/">
    <channel>
        <title>IMyself</title>
        <link>https://blog.lmyself.top/</link>
        <description>前端技术分享记录~</description>
        <lastBuildDate>Sun, 20 Sep 2026 07:43:22 GMT</lastBuildDate>
        <docs>https://validator.w3.org/feed/docs/rss2.html</docs>
        <generator>https://github.com/jpmonette/feed</generator>
        <language>zh-CN</language>
        <copyright>All rights reserved 2026, IMyself</copyright>
        <item>
            <title><![CDATA[UEditor 1.3.x 上传去 Flash 化套装]]></title>
            <link>https://blog.lmyself.top/article/3d8ee568-45a2-80fd-a003-d0ce3c5a8d8d</link>
            <guid>https://blog.lmyself.top/article/3d8ee568-45a2-80fd-a003-d0ce3c5a8d8d</guid>
            <pubDate>Fri, 11 Sep 2026 00:00:00 GMT</pubDate>
            <description><![CDATA[UEditor 1.3.6 图片上传去 Flash 化]]></description>
            <content:encoded><![CDATA[<div id="notion-article" class="mx-auto overflow-hidden "><main class="notion light-mode notion-page notion-block-3d8ee56845a280fda003d0ce3c5a8d8d"><div class="notion-viewport"></div><div class="notion-collection-page-properties"></div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-3d8ee56845a28029a45fce04bf3f4850" data-id="3d8ee56845a28029a45fce04bf3f4850"><span><div id="3d8ee56845a28029a45fce04bf3f4850" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3d8ee56845a28029a45fce04bf3f4850" title="UEditor 1.3.x 上传去 Flash 化套装"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">UEditor 1.3.x 上传去 Flash 化套装</span></span></h2><div class="notion-text notion-block-3d8ee56845a28016b139c2ed6a0c89f8">UEditor 1.3.x 的图片上传依赖 Flash，现代浏览器已经彻底移除 Flash，表现为<b>弹窗里本地上传那一栏是空白或点了没反应</b>。
这份套装用一个独立插件把它换成 HTML5 直传（<code class="notion-inline-code">&lt;input type=&quot;file&quot;&gt;</code> + <code class="notion-inline-code">FormData</code> + <code class="notion-inline-code">XMLHttpRequest</code>），
并顺手修掉内置 <code class="notion-inline-code">autoupload</code>（粘贴/拖拽）传参不一致导致后端报错的问题。</div><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-3d8ee56845a2808e8ec0d0d445403ee3" data-id="3d8ee56845a2808e8ec0d0d445403ee3"><span><div id="3d8ee56845a2808e8ec0d0d445403ee3" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3d8ee56845a2808e8ec0d0d445403ee3" title="适用范围"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">适用范围</span></span></h3><table class="notion-simple-table notion-block-3d8ee56845a280e88af4f863f37dfef1"><tbody><tr class="notion-simple-table-row notion-simple-table-header-row notion-block-3d8ee56845a2805db6e1f428f971a63a"><td class="" style="width:120px"><div class="notion-simple-table-cell">ㅤ</div></td><td class="" style="width:568px"><div class="notion-simple-table-cell">ㅤ</div></td></tr><tr class="notion-simple-table-row notion-block-3d8ee56845a280f8a32df56b8479939f"><td class="" style="width:120px"><div class="notion-simple-table-cell">适用版本</div></td><td class="" style="width:568px"><div class="notion-simple-table-cell">UEditor <b>1.3.x</b>（<code class="notion-inline-code">UE.version</code> 可确认）。1.4.x 起官方自带 HTML5 上传，不需要这套</div></td></tr><tr class="notion-simple-table-row notion-block-3d8ee56845a280c08fc5f07f3b9fa945"><td class="" style="width:120px"><div class="notion-simple-table-cell">后端</div></td><td class="" style="width:568px"><div class="notion-simple-table-cell"><b>不用改</b>。沿用 1.3.x 原有接口约定</div></td></tr><tr class="notion-simple-table-row notion-block-3d8ee56845a28031ab8af223845a414b"><td class="" style="width:120px"><div class="notion-simple-table-cell">UEditor 本体</div></td><td class="" style="width:568px"><div class="notion-simple-table-cell"><b>不用改</b>。<code class="notion-inline-code">ueditor.all.min.js</code> / <code class="notion-inline-code">ueditor.all.js</code> 一个字节都不动</div></td></tr><tr class="notion-simple-table-row notion-block-3d8ee56845a28002b569d3411293e616"><td class="" style="width:120px"><div class="notion-simple-table-cell">改动量</div></td><td class="" style="width:568px"><div class="notion-simple-table-cell">新增 1 个 js 文件 + 每个用到编辑器的页面加 1 行 <code class="notion-inline-code">&lt;script&gt;</code></div></td></tr><tr class="notion-simple-table-row notion-block-3d8ee56845a2800eb075c07fb3c6be83"><td class="" style="width:120px"><div class="notion-simple-table-cell">浏览器</div></td><td class="" style="width:568px"><div class="notion-simple-table-cell">需要 <code class="notion-inline-code">FormData</code>（IE10+）。IE9 及以下自动跳过、退回原弹窗</div></td></tr><tr class="notion-simple-table-row notion-block-3d8ee56845a280128372fb91eebf2e7d"><td class="" style="width:120px"><div class="notion-simple-table-cell">覆盖范围</div></td><td class="" style="width:568px"><div class="notion-simple-table-cell">图片的「点按钮上传」「粘贴」「拖拽」三条链路。附件/视频见第 7 节</div></td></tr></tbody></table><hr class="notion-hr notion-block-3d8ee56845a280b0b71bd08033ace826"/><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-3d8ee56845a280c7b45fcaa4ed848c18" data-id="3d8ee56845a280c7b45fcaa4ed848c18"><span><div id="3d8ee56845a280c7b45fcaa4ed848c18" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3d8ee56845a280c7b45fcaa4ed848c18" title="1. 要解决的三个问题"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">1. 要解决的三个问题</span></span></h3><div class="notion-text notion-block-3d8ee56845a280f5aa74df00c458668e"><b>问题 1：点工具栏「插入图片」，本地上传不能用</b></div><div class="notion-text notion-block-3d8ee56845a2802a9273cbc4f56ebb1a">1.3.x 的 <code class="notion-inline-code">dialogs/image/image.html</code> 本地上传走 <code class="notion-inline-code">imageUploader.swf</code>。Flash 没了，这一栏就废了。</div><div class="notion-text notion-block-3d8ee56845a28015ae41ca2e3c458050"><b>问题 2：粘贴 / 拖拽图片，后端报错</b></div><div class="notion-text notion-block-3d8ee56845a280e3ae6bd1ac51ee508b">内置 <code class="notion-inline-code">autoupload</code> 插件发的请求和点按钮那条<b>不一致</b>。在 bundle 里搜 <code class="notion-inline-code">&quot;autoupload&quot;</code> 能看到：</div><div class="notion-text notion-block-3d8ee56845a280728dc4fcd5f50a27d5">于是 <code class="notion-inline-code">type</code> 出现两次：query string 里是 <code class="notion-inline-code">IMAGE</code>，multipart 表单域里是 <code class="notion-inline-code">ajax</code>。
Java 侧 <code class="notion-inline-code">request.getParameter(&quot;type&quot;)</code> 在 multipart 请求下<b>优先取表单域</b>，后端拿到 <code class="notion-inline-code">ajax</code>，
进不了图片分支就报错。点按钮那条只发一个 <code class="notion-inline-code">type</code>，所以是好的 —— 这就是&quot;两条链路传参不一样&quot;的来源。</div><div class="notion-text notion-block-3d8ee56845a280b98a74d2b3d5af0eb3"><b>问题 3：粘贴失败没有任何提示</b></div><div class="notion-text notion-block-3d8ee56845a2801f8c96fa39782d6014">内置 <code class="notion-inline-code">autoupload</code> 的响应处理整个包在 <code class="notion-inline-code">try { ... } catch (d) { }</code> 里，
解析失败、后端返错，页面上<b>一点提示都没有</b>，只能在 Network 面板里看出来。</div><hr class="notion-hr notion-block-3d8ee56845a28076b447e204d8b4a2ec"/><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-3d8ee56845a2802baa9af230381f78d5" data-id="3d8ee56845a2802baa9af230381f78d5"><span><div id="3d8ee56845a2802baa9af230381f78d5" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3d8ee56845a2802baa9af230381f78d5" title="2. 插件代码"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">2. 插件代码</span></span></h3><div class="notion-text notion-block-3d8ee56845a280fa881ec64061106d0d">存成 <code class="notion-inline-code">ueditor.h5upload.js</code>，放在 <code class="notion-inline-code">ueditor.all.min.js</code> 同目录。不含任何项目特定内容，可直接拿走用。</div><hr class="notion-hr notion-block-3d8ee56845a280b9a442c60454127e72"/><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-3d8ee56845a2805a999cc9a0c1b7502d" data-id="3d8ee56845a2805a999cc9a0c1b7502d"><span><div id="3d8ee56845a2805a999cc9a0c1b7502d" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3d8ee56845a2805a999cc9a0c1b7502d" title="3. 接入"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">3. 接入</span></span></h3><div class="notion-text notion-block-3d8ee56845a280d68e3efa5df8279cdc">每个用到编辑器的页面，在 <code class="notion-inline-code">ueditor.all.min.js</code> <b>之后</b>加一行：</div><div class="notion-text notion-block-3d8ee56845a280eebb7bd7554f1e58ca"><b>顺序不能反。</b> <code class="notion-inline-code">ueditor.all.min.js</code> 开头有 <code class="notion-inline-code">UE.plugins = {}</code>，插件放前面会被清空，<b>静默失效、不报错</b>。</div><div class="notion-text notion-block-3d8ee56845a28007b997e3a322d0fa49">实例化代码一个字不用改：</div><div class="notion-text notion-block-3d8ee56845a2806ab18dfd02562ac17f">插件挂在 <code class="notion-inline-code">UE.plugins</code> 上，每个实例初始化时各跑一次，一个页面多个编辑器也没问题。</div><div class="notion-text notion-block-3d8ee56845a280aca872fb900f0132f5">批量找需要加这行的页面：</div><hr class="notion-hr notion-block-3d8ee56845a280aa9e10d622bf3bacd2"/><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-3d8ee56845a2805c91f1f047600ba5ab" data-id="3d8ee56845a2805c91f1f047600ba5ab"><span><div id="3d8ee56845a2805c91f1f047600ba5ab" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3d8ee56845a2805c91f1f047600ba5ab" title="4. 配置项"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">4. 配置项</span></span></h3><div class="notion-text notion-block-3d8ee56845a28033b79aec0cfd7f7c90">都在 <code class="notion-inline-code">ueditor.config.js</code>，插件全部有默认值，一个都不配也能跑。</div><table class="notion-simple-table notion-block-3d8ee56845a280b4ae8bf12221444475"><tbody><tr class="notion-simple-table-row notion-simple-table-header-row notion-block-3d8ee56845a280889f87cf925e741438"><td class="" style="width:120px"><div class="notion-simple-table-cell">配置项</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">默认值</div></td><td class="" style="width:393px"><div class="notion-simple-table-cell">说明</div></td></tr><tr class="notion-simple-table-row notion-block-3d8ee56845a280b0b763fc15c2cc3a23"><td class="" style="width:120px"><div class="notion-simple-table-cell"><code class="notion-inline-code">imageUrl</code></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">UEditor 自带</div></td><td class="" style="width:393px"><div class="notion-simple-table-cell">上传地址。原样使用，<b>不会额外拼参数</b></div></td></tr><tr class="notion-simple-table-row notion-block-3d8ee56845a280d1b1e9f3c6363c22f1"><td class="" style="width:120px"><div class="notion-simple-table-cell"><code class="notion-inline-code">imageFieldName</code></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><code class="notion-inline-code">upfile</code></div></td><td class="" style="width:393px"><div class="notion-simple-table-cell">文件字段名。改了后端要跟着改</div></td></tr><tr class="notion-simple-table-row notion-block-3d8ee56845a28052b7f8ee5eb54652fc"><td class="" style="width:120px"><div class="notion-simple-table-cell"><code class="notion-inline-code">imagePath</code></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><code class="notion-inline-code">&quot;&quot;</code></div></td><td class="" style="width:393px"><div class="notion-simple-table-cell">返回地址的前缀。拼在后端返回的 <code class="notion-inline-code">url</code> 前面</div></td></tr><tr class="notion-simple-table-row notion-block-3d8ee56845a280819a37f87709ecb99f"><td class="" style="width:120px"><div class="notion-simple-table-cell"><code class="notion-inline-code">imageMaxSize</code></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">10M</div></td><td class="" style="width:393px"><div class="notion-simple-table-cell">单张大小上限（字节）</div></td></tr><tr class="notion-simple-table-row notion-block-3d8ee56845a280019528e9cc073e1520"><td class="" style="width:120px"><div class="notion-simple-table-cell"><code class="notion-inline-code">imageAllowFiles</code></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><code class="notion-inline-code">.png .jpg .jpeg .gif .bmp</code></div></td><td class="" style="width:393px"><div class="notion-simple-table-cell">允许的后缀，同时用于 <code class="notion-inline-code">&lt;input accept&gt;</code></div></td></tr><tr class="notion-simple-table-row notion-block-3d8ee56845a280d4be9edd989e288acc"><td class="" style="width:120px"><div class="notion-simple-table-cell"><code class="notion-inline-code">h5upload</code></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">不配即启用</div></td><td class="" style="width:393px"><div class="notion-simple-table-cell">设 <code class="notion-inline-code">false</code> 关掉插件，恢复原来的 Flash 弹窗</div></td></tr></tbody></table><div class="notion-text notion-block-3d8ee56845a28075a7a7d612711f246b">前三个是 UEditor 原有配置，后三个是这个插件加的。</div><blockquote class="notion-quote notion-block-3d8ee56845a280baa06bd02157d14a04"><div><code class="notion-inline-code">imageMaxSize</code> / <code class="notion-inline-code">imageAllowFiles</code> 是<b>前端</b>校验，只为了少发一次没用的请求。
<b>后端必须自己再校验一遍</b> —— 前端这层随便绕。</div></blockquote><hr class="notion-hr notion-block-3d8ee56845a280fcb9ecf6e5ddfb8f48"/><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-3d8ee56845a280f69459d3dacb2d7cfd" data-id="3d8ee56845a280f69459d3dacb2d7cfd"><span><div id="3d8ee56845a280f69459d3dacb2d7cfd" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3d8ee56845a280f69459d3dacb2d7cfd" title="5. 后端接口约定"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">5. 后端接口约定</span></span></h3><div class="notion-text notion-block-3d8ee56845a280ab8741ef8d208b1104">沿用 1.3.x 原有约定，所以后端不用改。</div><div class="notion-text notion-block-3d8ee56845a2807ead15f89bfddb2ebe"><b>请求</b></div><div class="notion-text notion-block-3d8ee56845a2804e9fdcc20208a6ec21">注意插件<b>只发文件字段</b>，不会额外加 <code class="notion-inline-code">type</code> 之类的参数 —— 该带的参数请写在 <code class="notion-inline-code">imageUrl</code> 的 query string 里。
这正是内置 <code class="notion-inline-code">autoupload</code> 出问题的地方（见第 1 节问题 2）。</div><div class="notion-text notion-block-3d8ee56845a280cea14ceb25640a11d4"><b>响应</b></div><div class="notion-text notion-block-3d8ee56845a2802fa63bce6e2588af63">判定规则：</div><table class="notion-simple-table notion-block-3d8ee56845a2804f99b9c7d04a3f0a23"><tbody><tr class="notion-simple-table-row notion-simple-table-header-row notion-block-3d8ee56845a280b2bc07fa3346abbea9"><td class="" style="width:120px"><div class="notion-simple-table-cell">情况</div></td><td class="" style="width:455px"><div class="notion-simple-table-cell">结果</div></td></tr><tr class="notion-simple-table-row notion-block-3d8ee56845a280fe8c3ce2f4927083fc"><td class="" style="width:120px"><div class="notion-simple-table-cell">有 <code class="notion-inline-code">url</code>，且 <code class="notion-inline-code">state</code> 缺失或为 <code class="notion-inline-code">SUCCESS</code></div></td><td class="" style="width:455px"><div class="notion-simple-table-cell">成功，插入 <code class="notion-inline-code">imagePath + url</code></div></td></tr><tr class="notion-simple-table-row notion-block-3d8ee56845a2803e99cac4d5cfa7d5eb"><td class="" style="width:120px"><div class="notion-simple-table-cell"><code class="notion-inline-code">state</code> 是别的值</div></td><td class="" style="width:455px"><div class="notion-simple-table-cell">失败，把 <code class="notion-inline-code">state</code> 的值当错误信息弹出来</div></td></tr><tr class="notion-simple-table-row notion-block-3d8ee56845a280c69639f46195299382"><td class="" style="width:120px"><div class="notion-simple-table-cell">没有 <code class="notion-inline-code">url</code></div></td><td class="" style="width:455px"><div class="notion-simple-table-cell">失败，提示&quot;服务器没有返回地址&quot;</div></td></tr><tr class="notion-simple-table-row notion-block-3d8ee56845a280b691b7cb8cc33dab18"><td class="" style="width:120px"><div class="notion-simple-table-cell">HTTP 非 200 / 响应不是合法 JSON</div></td><td class="" style="width:455px"><div class="notion-simple-table-cell">失败，提示 HTTP 状态码</div></td></tr></tbody></table><div class="notion-text notion-block-3d8ee56845a280539da9f45cbbd5a9f4">两点提醒：</div><ul class="notion-list notion-list-disc notion-block-3d8ee56845a28009bf2ed02641281563"><li>响应必须是<b>严格 JSON</b>（<code class="notion-inline-code">JSON.parse</code> 能解析）。内置插件用 <code class="notion-inline-code">new Function(&quot;return &quot; + res)</code> 能吃单引号、能吃不带引号的 key，这个插件不行。</li></ul><ul class="notion-list notion-list-disc notion-block-3d8ee56845a280c4ba13f8ec25783571"><li><code class="notion-inline-code">state</code> 会<b>原样显示给用户</b>。别往里塞异常堆栈或服务器内部路径。</li></ul><hr class="notion-hr notion-block-3d8ee56845a280bf9f66faae69867dc4"/><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-3d8ee56845a280ff82dfd1e1f6f02877" data-id="3d8ee56845a280ff82dfd1e1f6f02877"><span><div id="3d8ee56845a280ff82dfd1e1f6f02877" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3d8ee56845a280ff82dfd1e1f6f02877" title="6. UEditor 内部的三个接线点"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">6. UEditor 内部的三个接线点</span></span></h3><div class="notion-text notion-block-3d8ee56845a280d4aa81c0e698ef2818">想改这个插件、或排查它为什么没生效，这三处是关键。都在 bundle 里搜关键字就能定位，不用记行号。</div><div class="notion-text notion-block-3d8ee56845a2800e8858ece73c526b83"><b>接线点 1：dialog 实例存在哪</b></div><div class="notion-text notion-block-3d8ee56845a2802dad42cb4fbf72fb75">搜 <code class="notion-inline-code">_dialogs[</code> —— 工具栏构建时把每个弹窗实例挂到 <code class="notion-inline-code">editor.ui._dialogs</code>，key 是 <code class="notion-inline-code">命令名 + &quot;Dialog&quot;</code>，
图片就是 <code class="notion-inline-code">insertimageDialog</code>。构建发生在 <code class="notion-inline-code">initEditorUI</code> 里、<code class="notion-inline-code">ready</code> 事件之前，所以在 <code class="notion-inline-code">ready</code> 里改一定能拿到。</div><div class="notion-text notion-block-3d8ee56845a2802da88ed3d1dc745b7a"><b>接线点 2：谁会打开这个 dialog（两条路径）</b></div><div class="notion-text notion-block-3d8ee56845a280dfa32ad884d0af80ac"><b>路径 B 不走 </b><code class="notion-inline-code"><b>render</b></code><b>。</b> 所以 <code class="notion-inline-code">render</code> 和 <code class="notion-inline-code">open</code> 必须都截 —— 只截 <code class="notion-inline-code">open</code> 的话，
路径 A 已经被 <code class="notion-inline-code">render</code> 把 iframe 建出来了，Flash 的 <code class="notion-inline-code">image.html</code> 照样加载。</div><div class="notion-text notion-block-3d8ee56845a2800b97aff3a2f34f4938"><b>接线点 3：插入图片的命令</b></div><div class="notion-text notion-block-3d8ee56845a2804cb8eed420dfb8855e">搜 <code class="notion-inline-code">UE.commands.insertimage</code>。收单个对象或数组：</div><div class="notion-text notion-block-3d8ee56845a2800a97ccd4f1b7d541f6">行为：光标停在图片上时<b>替换</b>那张图，否则在光标处插入；多个时每张各占一段。
<code class="notion-inline-code">_src</code> 是 UEditor 自己的原图地址标记，跟着 <code class="notion-inline-code">src</code> 写就行。</div><div class="notion-text notion-block-3d8ee56845a28017954efd9dcb7a7196"><b>插件加载顺序</b>（搜 <code class="notion-inline-code">UE.plugin.load</code>）</div><div class="notion-text notion-block-3d8ee56845a280f08f09d8da50a3636d">这个顺序决定了关掉 autoupload 只能在实例化前用同名 <code class="notion-inline-code">register</code> 覆盖，见下面坑 2。</div><hr class="notion-hr notion-block-3d8ee56845a280d8b2ddd9d0d5b28895"/><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-3d8ee56845a280138d00d45ede45c021" data-id="3d8ee56845a280138d00d45ede45c021"><span><div id="3d8ee56845a280138d00d45ede45c021" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3d8ee56845a280138d00d45ede45c021" title="7. 八个坑"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">7. 八个坑</span></span></h3><ol start="1" class="notion-list notion-list-numbered notion-block-3d8ee56845a2807f963ec8eb77d8f612" style="list-style-type:decimal"><li><code class="notion-inline-code"><b>type</b></code><b> 参数撞车（粘贴报错的根因）</b><code class="notion-inline-code">imageUrl</code> 上已有 <code class="notion-inline-code">?type=IMAGE</code>，内置 <code class="notion-inline-code">autoupload</code> 又 <code class="notion-inline-code">append(&quot;type&quot;, &quot;ajax&quot;)</code>。
Java 侧 <code class="notion-inline-code">request.getParameter(&quot;type&quot;)</code> 在 multipart 请求下<b>优先取表单域</b>，后端拿到 <code class="notion-inline-code">ajax</code> 就报错。
排查方法：Network 面板对比点按钮和粘贴两次请求的 Payload，多出来的参数一眼可见。</li></ol><ol start="2" class="notion-list notion-list-numbered notion-block-3d8ee56845a280c7885fc1535b6bd72d" style="list-style-type:decimal"><li><b>关掉内置插件必须在实例化之前，</b><code class="notion-inline-code"><b>setOpt</b></code><b> 来不及</b>
在插件里写 <code class="notion-inline-code">me.setOpt({autoupload: false})</code> <b>无效</b> —— 注册式插件先跑，
等 <code class="notion-inline-code">UE.plugins.h5upload</code> 执行时 autoupload 的 <code class="notion-inline-code">ready</code> 监听已经绑上去了。
正确做法是文件加载时用同名 <code class="notion-inline-code">UE.plugin.register(&#x27;autoupload&#x27;, ...)</code> 覆盖（<code class="notion-inline-code">register</code> 按 name 存 map，同名直接覆盖）。</li></ol><ol start="3" class="notion-list notion-list-numbered notion-block-3d8ee56845a2804dbe91d97b699d45a7" style="list-style-type:decimal"><li><code class="notion-inline-code"><b>render</b></code><b> 和 </b><code class="notion-inline-code"><b>open</b></code><b> 都要截</b>
见上面接线点 2。只截一个的话 Flash 弹窗还是会被加载。</li></ol><ol start="4" class="notion-list notion-list-numbered notion-block-3d8ee56845a280ecbf49d4729ff1b84b" style="list-style-type:decimal"><li><b>剪贴板图片没有文件名</b><code class="notion-inline-code">file.name</code> 是空的，直传后端取不到后缀。按 MIME 拼成 <code class="notion-inline-code">blob.png</code> 这种。
也因为没有文件名，粘贴/拖拽那条<b>只能校验大小、没法校验后缀</b>，后端务必自己查。</li></ol><ol start="5" class="notion-list notion-list-numbered notion-block-3d8ee56845a280f6be4ce4f7624a4dc1" style="list-style-type:decimal"><li><code class="notion-inline-code"><b>input.value</b></code><b> 要先清空</b>
不清的话连续选同一张图不触发 <code class="notion-inline-code">change</code>，表现为&quot;第二次点没反应&quot;。</li></ol><ol start="6" class="notion-list notion-list-numbered notion-block-3d8ee56845a28074a3a1dc198baeba3a" style="list-style-type:decimal"><li><b>多张图等全部传完再一次性插入</b>
逐张插入时网络快慢不同会导致<b>插入顺序和选择顺序不一致</b>。
实现上用 <code class="notion-inline-code">results[index]</code> 按下标回填、<code class="notion-inline-code">pending</code> 计数归零才插入。</li></ol><ol start="7" class="notion-list notion-list-numbered notion-block-3d8ee56845a280ca8692c4a433a0af1c" style="list-style-type:decimal"><li><b>混合粘贴不能拦</b>
剪贴板里同时有图和文字（从 Word 复制那种）时直接 return，交给 UEditor 原来的粘贴逻辑。
全拦下来会把带格式的正文粘贴弄坏。这个判断照抄内置插件。</li></ol><ol start="8" class="notion-list notion-list-numbered notion-block-3d8ee56845a2800a903ccf68593f9395" style="list-style-type:decimal"><li><code class="notion-inline-code"><b>window.top.layer</b></code><b> 要包 try/catch</b>
页面被跨域 iframe 嵌套时访问 <code class="notion-inline-code">window.top</code> 会抛安全异常，把上传成功的流程一起带崩。</li></ol><hr class="notion-hr notion-block-3d8ee56845a280cd8b91cdc86f3e5190"/><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-3d8ee56845a28000ac6fd4be58182cbf" data-id="3d8ee56845a28000ac6fd4be58182cbf"><span><div id="3d8ee56845a28000ac6fd4be58182cbf" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3d8ee56845a28000ac6fd4be58182cbf" title="8. 扩展到附件 / 视频"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">8. 扩展到附件 / 视频</span></span></h3><div class="notion-text notion-block-3d8ee56845a280db9761e1af2d476b15">附件、视频弹窗是同样的 Flash 问题，思路完全一致：截掉对应 dialog 的 <code class="notion-inline-code">render</code>/<code class="notion-inline-code">open</code>，
弹文件框，传完调对应命令插入。差异在这张表：</div><table class="notion-simple-table notion-block-3d8ee56845a280cdbbd0cb1cdb1eef98"><tbody><tr class="notion-simple-table-row notion-simple-table-header-row notion-block-3d8ee56845a280ebae06ef19c76d3ce9"><td class="" style="width:120px"><div class="notion-simple-table-cell">ㅤ</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">图片</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">附件</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">视频</div></td></tr><tr class="notion-simple-table-row notion-block-3d8ee56845a28084b2eeca28e0efa2a0"><td class="" style="width:120px"><div class="notion-simple-table-cell">dialog key</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><code class="notion-inline-code">insertimageDialog</code></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><code class="notion-inline-code">attachmentDialog</code></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><code class="notion-inline-code">insertvideoDialog</code></div></td></tr><tr class="notion-simple-table-row notion-block-3d8ee56845a2807b9af1ffa2e8ca5755"><td class="" style="width:120px"><div class="notion-simple-table-cell">上传地址配置</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><code class="notion-inline-code">imageUrl</code></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><code class="notion-inline-code">fileUrl</code></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><code class="notion-inline-code">videoUrl</code></div></td></tr><tr class="notion-simple-table-row notion-block-3d8ee56845a28019bddee1ca8a3f9917"><td class="" style="width:120px"><div class="notion-simple-table-cell">路径前缀配置</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><code class="notion-inline-code">imagePath</code></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><code class="notion-inline-code">filePath</code></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><code class="notion-inline-code">videoPath</code></div></td></tr><tr class="notion-simple-table-row notion-block-3d8ee56845a280c483bef9ad7d7d73f0"><td class="" style="width:120px"><div class="notion-simple-table-cell">字段名配置</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><code class="notion-inline-code">imageFieldName</code></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><code class="notion-inline-code">fileFieldName</code></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><code class="notion-inline-code">videoFieldName</code></div></td></tr><tr class="notion-simple-table-row notion-block-3d8ee56845a28044bc3df1a78bdd7d5c"><td class="" style="width:120px"><div class="notion-simple-table-cell">插入方式</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><code class="notion-inline-code">execCommand(&#x27;insertimage&#x27;, [{src, _src}])</code></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">无现成命令，见下</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><code class="notion-inline-code">execCommand(&#x27;insertvideo&#x27;, [{url, width, height, align}], &#x27;upload&#x27;)</code></div></td></tr></tbody></table><div class="notion-text notion-block-3d8ee56845a280a381f3ffae02ed7a2f"><b>成熟度不一样，照抄前先看清：</b></div><ul class="notion-list notion-list-disc notion-block-3d8ee56845a28024b176f50ce1d2779c"><li><b>图片</b> —— 本套装已实现并测过。</li></ul><ul class="notion-list notion-list-disc notion-block-3d8ee56845a2807f9a47d059450a968e"><li><b>视频</b> —— <code class="notion-inline-code">insertvideo</code> 命令签名已在 bundle 里核对（搜 <code class="notion-inline-code">commands.insertvideo</code>，
第三个参数传 <code class="notion-inline-code">&#x27;upload&#x27;</code> 时用 <code class="notion-inline-code">edui-upload-video</code> 类名走 video 标签，否则走 embed）。<b>但没有实测。</b></li></ul><ul class="notion-list notion-list-disc notion-block-3d8ee56845a28017aba5d21f734bf469"><li><b>附件</b> —— 核心 bundle 里<b>没有</b> <code class="notion-inline-code">insertfile</code> 命令，附件是 <code class="notion-inline-code">dialogs/attachment/attachment.html</code>
自己拼 <code class="notion-inline-code">&lt;a&gt;</code> 标签再 <code class="notion-inline-code">insertHtml</code> 的。要复刻得先读那个 dialog 文件，抄它的 HTML 结构和 class
（关系到列表样式和图标）。<b>这套装没做也没验证。</b></li></ul><div class="notion-text notion-block-3d8ee56845a280d08496cfd23972252a">建议一次只扩一种，各自实测。</div><hr class="notion-hr notion-block-3d8ee56845a28062bf89f785d81bf407"/><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-3d8ee56845a28079b728f261eea27b36" data-id="3d8ee56845a28079b728f261eea27b36"><span><div id="3d8ee56845a28079b728f261eea27b36" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3d8ee56845a28079b728f261eea27b36" title="9. 已知限制"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">9. 已知限制</span></span></h3><ul class="notion-list notion-list-disc notion-block-3d8ee56845a280e19cf7d75560ed9fc9"><li><b>图片属性编辑没了</b>。原弹窗能改 URL、宽高、对齐、边距，现在点「编辑」直接变成&quot;换一张图&quot;。
对齐用工具栏按钮，缩放靠拖拽把手（需 <code class="notion-inline-code">scaleEnabled: true</code>）。</li></ul><ul class="notion-list notion-list-disc notion-block-3d8ee56845a2803dbb45fca625d1e270"><li><b>没有上传进度</b>。大文件上传时没有任何反馈。要做的话监听 <code class="notion-inline-code">xhr.upload.onprogress</code>。</li></ul><ul class="notion-list notion-list-disc notion-block-3d8ee56845a280df95abe00908f257a6"><li><b>IE9 及以下不支持</b>。没有 <code class="notion-inline-code">FormData</code>，插件自动跳过、退回原 Flash 弹窗（等于还是不能上传，但不报错）。</li></ul><ul class="notion-list notion-list-disc notion-block-3d8ee56845a2800d95dec3fe4d9e126b"><li><b>截图、涂鸦仍依赖 Flash</b>（<code class="notion-inline-code">snapscreen</code> / <code class="notion-inline-code">scrawl</code>），本套装没动。</li></ul><ul class="notion-list notion-list-disc notion-block-3d8ee56845a280a9b621c6b38b06a6fa"><li><b>同名 register 覆盖是&quot;不受支持&quot;的用法</b>。UEditor 官方没承诺 <code class="notion-inline-code">register</code> 可覆盖，
升级小版本时值得回归一下（1.3.x 内部就是按 name 存 map，同名覆盖是必然行为，但仅限 1.3.x）。</li></ul><hr class="notion-hr notion-block-3d8ee56845a28046a106cdb6c8a5147c"/><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-3d8ee56845a280b795cfdea78dbaaf89" data-id="3d8ee56845a280b795cfdea78dbaaf89"><span><div id="3d8ee56845a280b795cfdea78dbaaf89" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3d8ee56845a280b795cfdea78dbaaf89" title="10. 上线前必须确认"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">10. 上线前必须确认</span></span></h3><div class="notion-to-do notion-block-3d8ee56845a28009bcc6cf08e851fbda"><div class="notion-to-do-item"><span class="notion-property notion-property-checkbox"><div class="notion-property-checkbox-unchecked"></div></span><div class="notion-to-do-body"><code class="notion-inline-code">ueditor.h5upload.js</code> 已部署，且 <code class="notion-inline-code">&lt;script&gt;</code> 在 <code class="notion-inline-code">ueditor.all.min.js</code> <b>之后</b></div></div><div class="notion-to-do-children"></div></div><div class="notion-to-do notion-block-3d8ee56845a2805a8ea8c445f454dc09"><div class="notion-to-do-item"><span class="notion-property notion-property-checkbox"><div class="notion-property-checkbox-unchecked"></div></span><div class="notion-to-do-body"><b>每个</b>用到编辑器的页面都加了（<code class="notion-inline-code">grep -rl &quot;ueditor.all&quot;</code> 挨个核）</div></div><div class="notion-to-do-children"></div></div><div class="notion-to-do notion-block-3d8ee56845a2800889d4de32b1ae820e"><div class="notion-to-do-item"><span class="notion-property notion-property-checkbox"><div class="notion-property-checkbox-unchecked"></div></span><div class="notion-to-do-body">三条链路各试一次：点按钮选图、粘贴截图（Win+Shift+S 截完直接粘）、拖文件进编辑区</div></div><div class="notion-to-do-children"></div></div><div class="notion-to-do notion-block-3d8ee56845a28024b6a4edf1450ca368"><div class="notion-to-do-item"><span class="notion-property notion-property-checkbox"><div class="notion-property-checkbox-unchecked"></div></span><div class="notion-to-do-body">一次多选几张图，确认<b>插入顺序</b>和选择顺序一致</div></div><div class="notion-to-do-children"></div></div><div class="notion-to-do notion-block-3d8ee56845a280d6815ad55c4647ec6c"><div class="notion-to-do-item"><span class="notion-property notion-property-checkbox"><div class="notion-property-checkbox-unchecked"></div></span><div class="notion-to-do-body">故意传一个超限的大文件、一个 <code class="notion-inline-code">.txt</code>，确认<b>有提示</b>而不是静默失败</div></div><div class="notion-to-do-children"></div></div><div class="notion-to-do notion-block-3d8ee56845a28068962cfa53625afad2"><div class="notion-to-do-item"><span class="notion-property notion-property-checkbox"><div class="notion-property-checkbox-unchecked"></div></span><div class="notion-to-do-body">后端故意返个错，确认错误信息弹出来了（内置插件这里是完全静默的）</div></div><div class="notion-to-do-children"></div></div><div class="notion-to-do notion-block-3d8ee56845a280fbba07e8533a7ea6d2"><div class="notion-to-do-item"><span class="notion-property notion-property-checkbox"><div class="notion-property-checkbox-unchecked"></div></span><div class="notion-to-do-body">点已插入的图片 →「编辑」，确认是换图而不是弹出空白框</div></div><div class="notion-to-do-children"></div></div><div class="notion-to-do notion-block-3d8ee56845a28095b3efcdfd7119a930"><div class="notion-to-do-item"><span class="notion-property notion-property-checkbox"><div class="notion-property-checkbox-unchecked"></div></span><div class="notion-to-do-body">从 Word 复制一段带格式的图文混排内容粘贴，确认<b>排版没坏</b></div></div><div class="notion-to-do-children"></div></div><div class="notion-to-do notion-block-3d8ee56845a280d986d7c0ed0b2fd531"><div class="notion-to-do-item"><span class="notion-property notion-property-checkbox"><div class="notion-property-checkbox-unchecked"></div></span><div class="notion-to-do-body">保存后重新打开，确认图片地址没丢（<code class="notion-inline-code">imagePath</code> 前缀拼接是否正确）</div></div><div class="notion-to-do-children"></div></div><div class="notion-to-do notion-block-3d8ee56845a280e8b801ff87a28f41b0"><div class="notion-to-do-item"><span class="notion-property notion-property-checkbox"><div class="notion-property-checkbox-unchecked"></div></span><div class="notion-to-do-body">前台展示页确认图片能正常显示（有的项目有 HTML 过滤器会改写 <code class="notion-inline-code">src</code>）</div></div><div class="notion-to-do-children"></div></div><div class="notion-to-do notion-block-3d8ee56845a2807b8184cf1a25699c66"><div class="notion-to-do-item"><span class="notion-property notion-property-checkbox"><div class="notion-property-checkbox-unchecked"></div></span><div class="notion-to-do-body">后端已独立校验类型和大小（前端那层随便绕）</div></div><div class="notion-to-do-children"></div></div></main></div>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[一些项目中用到的东西]]></title>
            <link>https://blog.lmyself.top/article/js625</link>
            <guid>https://blog.lmyself.top/article/js625</guid>
            <pubDate>Wed, 25 Jun 2025 00:00:00 GMT</pubDate>
            <description><![CDATA[一些JS方法的封装]]></description>
            <content:encoded><![CDATA[<div id="notion-article" class="mx-auto overflow-hidden "><main class="notion light-mode notion-page notion-block-21dee56845a280acad4fe3299c00fefd"><div class="notion-viewport"></div><div class="notion-collection-page-properties"></div><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-3b5ee56845a28028833af8fbc11c8688" data-id="3b5ee56845a28028833af8fbc11c8688"><span><div id="3b5ee56845a28028833af8fbc11c8688" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3b5ee56845a28028833af8fbc11c8688" title="Vscode关闭新UI"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">Vscode关闭新UI</span></span></h3><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-3b5ee56845a28030837ac3abf189a8e9"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:100%"><img style="object-fit:cover" src="https://www.notion.so/image/attachment%3A2e71bfa5-57ef-4fff-b06a-0af285159e65%3Aimage.png?table=block&amp;id=3b5ee568-45a2-8030-837a-c3abf189a8e9&amp;t=3b5ee568-45a2-8030-837a-c3abf189a8e9" alt="notion image" loading="lazy" decoding="async"/></div></figure><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-2a1ee56845a280448713faa3576be0d0" data-id="2a1ee56845a280448713faa3576be0d0"><span><div id="2a1ee56845a280448713faa3576be0d0" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2a1ee56845a280448713faa3576be0d0" title="Google自带分屏"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">Google自带分屏</span></span></h3><div class="notion-text notion-block-2a1ee56845a28081a8c4eef2af33ed75"><b>如果没有开启的话在地址栏输入</b><span class="notion-red"><code class="notion-inline-code"><b>chrome://flags/</b></code></span><span class="notion-red"><b> </b></span><b>搜索</b><code class="notion-inline-code"><b>Split View</b></code><b> 然后选择</b><code class="notion-inline-code"><b>Enabled</b></code><b> 开启即可</b></div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-2a1ee56845a280028f54c97c106c402b"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:100%"><img style="object-fit:cover" src="https://www.notion.so/image/attachment%3Af81b8f34-a591-4371-b449-1cada8aa5f39%3Aimage.png?table=block&amp;id=2a1ee568-45a2-8002-8f54-c97c106c402b&amp;t=2a1ee568-45a2-8002-8f54-c97c106c402b" alt="notion image" loading="lazy" decoding="async"/></div></figure><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-21dee56845a28046b48de2a196d95564" data-id="21dee56845a28046b48de2a196d95564"><span><div id="21dee56845a28046b48de2a196d95564" class="notion-header-anchor"></div><a class="notion-hash-link" href="#21dee56845a28046b48de2a196d95564" title="获取当年的周数以及当前周的日期区间"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">获取当年的周数以及当前周的日期区间</span></span></h3><div class="notion-text notion-block-21dee56845a2801a9c3dc43d3df08e46">示例数据展示</div><div class="notion-text notion-block-21dee56845a2807e8930ff405d591fd3">方法调用</div><div class="notion-text notion-block-21dee56845a2809abd04eea5ecdb9b4c"><b>判断当前日期是第几周</b></div><details class="notion-toggle notion-block-21dee56845a2809a8842d409fafeca48"><summary><code class="notion-inline-code"><b>Vue vant(v)选择周组件封装</b></code><b> </b></summary><div></div></details><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-22aee56845a280dbb7c5e312a1458d0d" data-id="22aee56845a280dbb7c5e312a1458d0d"><span><div id="22aee56845a280dbb7c5e312a1458d0d" class="notion-header-anchor"></div><a class="notion-hash-link" href="#22aee56845a280dbb7c5e312a1458d0d" title="js控制元素丝滑滚动"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">js控制元素丝滑滚动</span></span></h3><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-2afee56845a2801e99b7c7c932daf82b" data-id="2afee56845a2801e99b7c7c932daf82b"><span><div id="2afee56845a2801e99b7c7c932daf82b" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2afee56845a2801e99b7c7c932daf82b" title=" antd-vue 控制a-table默认滚动条滚动到最右边"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"> antd-vue 控制a-table默认滚动条滚动到最右边</span></span></h3><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-232ee56845a280cd9f2cfd3c29894d72" data-id="232ee56845a280cd9f2cfd3c29894d72"><span><div id="232ee56845a280cd9f2cfd3c29894d72" class="notion-header-anchor"></div><a class="notion-hash-link" href="#232ee56845a280cd9f2cfd3c29894d72" title="antd-vue a-table合计功能"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">antd-vue a-table合计功能</span></span></h3><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-232ee56845a280158cd5cddd3c7e9151"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:100%"><img style="object-fit:cover" src="https://www.notion.so/image/attachment%3Adec851dd-a584-4505-be91-d452113b990d%3Aimage.png?table=block&amp;id=232ee568-45a2-8015-8cd5-cddd3c7e9151&amp;t=232ee568-45a2-8015-8cd5-cddd3c7e9151" alt="notion image" loading="lazy" decoding="async"/></div></figure><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-237ee56845a280929db2fb2900c38a03" data-id="237ee56845a280929db2fb2900c38a03"><span><div id="237ee56845a280929db2fb2900c38a03" class="notion-header-anchor"></div><a class="notion-hash-link" href="#237ee56845a280929db2fb2900c38a03" title="a-input(Ant Design of Vue1.7x)版本限制只能输入数字并且最多十位"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">a-input(Ant Design of Vue1.7x)版本限制只能输入数字并且最多十位</span></span></h3><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-238ee56845a2804798b8ebdd977281e6" data-id="238ee56845a2804798b8ebdd977281e6"><span><div id="238ee56845a2804798b8ebdd977281e6" class="notion-header-anchor"></div><a class="notion-hash-link" href="#238ee56845a2804798b8ebdd977281e6" title="如果碰到表单校验提示导致html错位"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">如果碰到表单校验提示导致html错位</span></span></h3><div class="notion-text notion-block-25aee56845a28046b1d8fb8d5fd00ba3">没用的话就改一下样式吧</div><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-23aee56845a280bca687f7987d4f9b68" data-id="23aee56845a280bca687f7987d4f9b68"><span><div id="23aee56845a280bca687f7987d4f9b68" class="notion-header-anchor"></div><a class="notion-hash-link" href="#23aee56845a280bca687f7987d4f9b68" title="对象数组补足长度"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">对象数组补足长度</span></span></h3><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-23fee56845a2801c81e1f1798a0d0fb2" data-id="23fee56845a2801c81e1f1798a0d0fb2"><span><div id="23fee56845a2801c81e1f1798a0d0fb2" class="notion-header-anchor"></div><a class="notion-hash-link" href="#23fee56845a2801c81e1f1798a0d0fb2" title="a-table序号列设置了fixed导致多出一列空白的问题"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">a-table序号列设置了fixed导致多出一列空白的问题</span></span></h3><div class="notion-callout notion-gray_background_co notion-block-2e6ee56845a28083a771fca0f14c9377"><div class="notion-page-icon-inline notion-page-icon-span"><span class="notion-page-icon" role="img" aria-label="💯">💯</span></div><div class="notion-callout-text"><div class="notion-text notion-block-2e6ee56845a280b78421c1de84d2ea86">或者将所有列的宽度加起来等于<code class="notion-inline-code">:scroll=&quot;{ x: m }&quot;</code>里<code class="notion-inline-code">m</code>的值,然后其中一列不设置宽度</div></div></div><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-240ee56845a28071ba7dc58187e6d83f" data-id="240ee56845a28071ba7dc58187e6d83f"><span><div id="240ee56845a28071ba7dc58187e6d83f" class="notion-header-anchor"></div><a class="notion-hash-link" href="#240ee56845a28071ba7dc58187e6d83f" title="获取指定年份12个月份为数组并替换匹配数据的值"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">获取指定年份12个月份为数组并替换匹配数据的值</span></span></h3><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-240ee56845a280dab3a0cf6711f255d0" data-id="240ee56845a280dab3a0cf6711f255d0"><span><div id="240ee56845a280dab3a0cf6711f255d0" class="notion-header-anchor"></div><a class="notion-hash-link" href="#240ee56845a280dab3a0cf6711f255d0" title="flex 布局导致子项高度相同，如何解决"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>flex 布局导致子项高度相同，如何解决</b></span></span></h3><div class="notion-text notion-block-240ee56845a2803aa501fdd533eaa904">直接在<code class="notion-inline-code">flex</code>容器上，将<code class="notion-inline-code">align-items</code>设为<code class="notion-inline-code">flex-start</code>,或者<code class="notion-inline-code">align-items</code>属性的其他值都可以,子项就会保持其自身的高度了</div><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-257ee56845a280bb808cc75324058568" data-id="257ee56845a280bb808cc75324058568"><span><div id="257ee56845a280bb808cc75324058568" class="notion-header-anchor"></div><a class="notion-hash-link" href="#257ee56845a280bb808cc75324058568" title="CSS :before、:after伪元素 content属性 中文乱码"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>CSS :before、:after伪元素 content属性 中文乱码</b></span></span></h3><div class="notion-text notion-block-257ee56845a2806faa20cdbe1ac1bbc9">将中文转为<code class="notion-inline-code">unicode</code>编码 <a class="notion-link" href="https://link.juejin.cn/?target=http%3A%2F%2Ftool.chinaz.com%2FTools%2FUnicode.aspx" target="_blank" rel="noopener noreferrer">站长工具</a>，例如：<code class="notion-inline-code">、</code>—&gt;<code class="notion-inline-code">\u3001</code></div><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-257ee56845a2806fbaddd871148755f3" data-id="257ee56845a2806fbaddd871148755f3"><span><div id="257ee56845a2806fbaddd871148755f3" class="notion-header-anchor"></div><a class="notion-hash-link" href="#257ee56845a2806fbaddd871148755f3" title="a-teble滚动加载"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">a-teble滚动加载</span></span></h3><details class="notion-toggle notion-block-25bee56845a280329df7cf1efa5cef63"><summary>监听表格滚动条</summary><div></div></details><details class="notion-toggle notion-block-25bee56845a28033ae08ef8f713410ee"><summary>监听父级容器</summary><div></div></details><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-278ee56845a28058b8cdeade6aed3d01" data-id="278ee56845a28058b8cdeade6aed3d01"><span><div id="278ee56845a28058b8cdeade6aed3d01" class="notion-header-anchor"></div><a class="notion-hash-link" href="#278ee56845a28058b8cdeade6aed3d01" title="修改a-rate 评分颜色"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">修改<code class="notion-inline-code">a-rate</code> 评分颜色</span></span></h3><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-27aee56845a28062ac89cb1d560e8da0" data-id="27aee56845a28062ac89cb1d560e8da0"><span><div id="27aee56845a28062ac89cb1d560e8da0" class="notion-header-anchor"></div><a class="notion-hash-link" href="#27aee56845a28062ac89cb1d560e8da0" title="vue中$router.push打开新窗口"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>vue中$router.push打开新窗口</b></span></span></h3><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-27aee56845a2808b9259eb3f501ca980" data-id="27aee56845a2808b9259eb3f501ca980"><span><div id="27aee56845a2808b9259eb3f501ca980" class="notion-header-anchor"></div><a class="notion-hash-link" href="#27aee56845a2808b9259eb3f501ca980" title="最快速删除node_modules的几种方式"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>最快速删除node_modules的几种方式</b></span></span></h3><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-27eee56845a2809586b2e801107b1b0c" data-id="27eee56845a2809586b2e801107b1b0c"><span><div id="27eee56845a2809586b2e801107b1b0c" class="notion-header-anchor"></div><a class="notion-hash-link" href="#27eee56845a2809586b2e801107b1b0c" title="Ant Design of Vue 表单校验问题"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>Ant Design of Vue 表单校验问题</b></span></span></h3><div class="notion-text notion-block-27eee56845a2807faff3d5554a422659"><span class="notion-red">有时候明明已经赋值了但是校验还是提示需要输入值</span></div><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-27eee56845a280f7a60bed4650928c27" data-id="27eee56845a280f7a60bed4650928c27"><span><div id="27eee56845a280f7a60bed4650928c27" class="notion-header-anchor"></div><a class="notion-hash-link" href="#27eee56845a280f7a60bed4650928c27" title="1. 数据绑定问题"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">1. 数据绑定问题</span></span></h3><div class="notion-text notion-block-27eee56845a28030a31be2b5563f4b6d">确保 <code class="notion-inline-code">form.reckonDate</code>的值格式正确：</div><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-27eee56845a28079bf08d9e074955b59" data-id="27eee56845a28079bf08d9e074955b59"><span><div id="27eee56845a28079bf08d9e074955b59" class="notion-header-anchor"></div><a class="notion-hash-link" href="#27eee56845a28079bf08d9e074955b59" title="2. 使用 v-model 替代 :value"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">2. 使用 v-model 替代 :value</span></span></h3><div class="notion-text notion-block-27eee56845a28035acaac906c6b48a25">将 <code class="notion-inline-code">:value</code> 改为 <code class="notion-inline-code">v-model</code>：</div><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-287ee56845a28057937ad13986b5492b" data-id="287ee56845a28057937ad13986b5492b"><span><div id="287ee56845a28057937ad13986b5492b" class="notion-header-anchor"></div><a class="notion-hash-link" href="#287ee56845a28057937ad13986b5492b" title="Vue组件互相引用问题"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">Vue组件互相引用问题</span></span></h3><blockquote class="notion-quote notion-block-287ee56845a28083aca2fef07331eb0a"><div>即 A 引用 B，B 又引用 A，并且这两个引用都是<b>第一次</b>导入会形成<b>循环依赖</b>，在大多数情况下会导致报错或未定义行为</div></blockquote><div class="notion-text notion-block-287ee56845a2807097b0c38bdd39c35f">让我们来详细解释一下：</div><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-287ee56845a28001a9ebedcd0af39d1a" data-id="287ee56845a28001a9ebedcd0af39d1a"><span><div id="287ee56845a28001a9ebedcd0af39d1a" class="notion-header-anchor"></div><a class="notion-hash-link" href="#287ee56845a28001a9ebedcd0af39d1a" title="什么是循环依赖？"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">什么是循环依赖？</span></span></h4><div class="notion-text notion-block-287ee56845a2809fbe15e717e7941248">当模块 A 尝试导入模块 B，而模块 B 又尝试导入模块 A 时，就形成了循环依赖。在 JavaScript（包括 Vue 组件）中，当一个模块被导入时，它的代码会立即执行。</div><ul class="notion-list notion-list-disc notion-block-287ee56845a280cfbde9da17458518f1"><li><b>场景 1: A 导入 B</b></li><ul class="notion-list notion-list-disc notion-block-287ee56845a280cfbde9da17458518f1"><li>JS 引擎开始执行 A。</li><li>A 遇到 import B from &#x27;./B.vue&#x27;。</li><li>JS 引擎暂停执行 A，去执行 B。</li></ul></ul><ul class="notion-list notion-list-disc notion-block-287ee56845a280889231c3f4be99b3bd"><li><b>场景 2: B 导入 A (在执行 B 的过程中)</b></li><ul class="notion-list notion-list-disc notion-block-287ee56845a280889231c3f4be99b3bd"><li>JS 引擎开始执行 B。</li><li>B 遇到 import A from &#x27;./A.vue&#x27;。</li><li>JS 引擎暂停执行 B，去执行 A。</li><li><b>问题来了：</b> A 已经被暂停了，现在又被要求执行。这就会导致一个死循环，或者其中一个模块在导入时会得到 undefined（因为它还没有完全导出）。</li></ul></ul><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-287ee56845a2806a9a38f44df3af6cd0" data-id="287ee56845a2806a9a38f44df3af6cd0"><span><div id="287ee56845a2806a9a38f44df3af6cd0" class="notion-header-anchor"></div><a class="notion-hash-link" href="#287ee56845a2806a9a38f44df3af6cd0" title="为什么 Vue 组件会报错？"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">为什么 Vue 组件会报错？</span></span></h4><div class="notion-text notion-block-287ee56845a280f8a9b0df263abfc3ec">在 Vue 中，当你局部注册一个组件时，你需要提供一个已经完全定义的组件选项对象。</div><ul class="notion-list notion-list-disc notion-block-287ee56845a2806ca4b9c2e537625e14"><li><b>A.vue:</b>codeJavaScript</li><ul class="notion-list notion-list-disc notion-block-287ee56845a2806ca4b9c2e537625e14"></ul></ul><ul class="notion-list notion-list-disc notion-block-287ee56845a2809191defd9aff0770b9"><li><b>B.vue:</b>codeJavaScript</li><ul class="notion-list notion-list-disc notion-block-287ee56845a2809191defd9aff0770b9"></ul></ul><div class="notion-text notion-block-287ee56845a28032b9a4da1be1465539">当你尝试编译 A.vue 时：</div><ol start="1" class="notion-list notion-list-numbered notion-block-287ee56845a2800eb8f2cd143460b794" style="list-style-type:decimal"><li>它需要 B.vue。</li></ol><ol start="2" class="notion-list notion-list-numbered notion-block-287ee56845a280f48068fe2a1e78ebf1" style="list-style-type:decimal"><li>编译 B.vue 时，它又需要 A.vue。</li></ol><ol start="3" class="notion-list notion-list-numbered notion-block-287ee56845a2804bb458fd7cfb5c4be5" style="list-style-type:decimal"><li>因为 A.vue 还在等待 B.vue，所以它并没有完全导出。当 B.vue 尝试导入 A.vue 时，它可能得到一个 undefined 或者一个不完整的模块对象。</li></ol><ol start="4" class="notion-list notion-list-numbered notion-block-287ee56845a280849688f42d46042d2a" style="list-style-type:decimal"><li>结果就是，当你尝试在 components 选项中注册这个 undefined 或不完整的对象时，Vue 就会报错，通常是 Unknown custom element 或 Failed to resolve component。</li></ol><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-287ee56845a2806384adf7b53c2419e5" data-id="287ee56845a2806384adf7b53c2419e5"><span><div id="287ee56845a2806384adf7b53c2419e5" class="notion-header-anchor"></div><a class="notion-hash-link" href="#287ee56845a2806384adf7b53c2419e5" title="解决方案"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">解决方案</span></span></h4><div class="notion-text notion-block-287ee56845a280c195beef8c513cf995">解决循环依赖通常有以下几种方法：</div><ol start="1" class="notion-list notion-list-numbered notion-block-287ee56845a2801a852be7ad997760c2" style="list-style-type:decimal"><li><b>异步组件/懒加载 (Lazy Loading)</b>codeJavaScriptcodeJavaScript</li><ol class="notion-list notion-list-numbered notion-block-287ee56845a2801a852be7ad997760c2" style="list-style-type:lower-alpha"><div class="notion-text notion-block-287ee56845a280b39687d7cfa2f563dc">这可以打破导入时的即时执行，但需要组件在用到时才加载。</div><div class="notion-text notion-block-287ee56845a2808b80a3ccbf892ac5d1">这种方法在技术上可行，但仍然表明你的组件设计可能需要优化，因为它并没有真正解决组件之间紧密耦合的问题。</div></ol></ol><ol start="2" class="notion-list notion-list-numbered notion-block-287ee56845a280748b71ebf5897a7e4c" style="list-style-type:decimal"><li><b>全局注册 (谨慎使用)</b>codeJavaScript</li><ol class="notion-list notion-list-numbered notion-block-287ee56845a280748b71ebf5897a7e4c" style="list-style-type:lower-alpha"><div class="notion-text notion-block-287ee56845a28022b153e792b0db83a2">如果你把其中一个或两个组件都全局注册了，那么在它们需要的时候它们就已经在 Vue 实例上可用了，而不需要在另一个组件中 import。</div><div class="notion-text notion-block-287ee56845a28049b62bdc68d706aeea">这样，在 A.vue 和 B.vue 中就都不需要 import 对方了。</div><div class="notion-text notion-block-287ee56845a2808490ecdb46a9c07c7a"><b>缺点：</b> 全局注册会导致所有组件都会被打包，即使有些组件可能只在少数地方使用，增加了首次加载的大小。并且，它同样没有从根本上解决组件耦合的问题，只是绕过了模块导入的限制。</div></ol></ol><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-28bee56845a2809e8a1accc37a62b10a" data-id="28bee56845a2809e8a1accc37a62b10a"><span><div id="28bee56845a2809e8a1accc37a62b10a" class="notion-header-anchor"></div><a class="notion-hash-link" href="#28bee56845a2809e8a1accc37a62b10a" title="antd a-date-picker设置可选时间范围"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">antd a-date-picker设置可选时间范围</span></span></h3><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-28dee56845a28069a608c3b32d4b8d83" data-id="28dee56845a28069a608c3b32d4b8d83"><span><div id="28dee56845a28069a608c3b32d4b8d83" class="notion-header-anchor"></div><a class="notion-hash-link" href="#28dee56845a28069a608c3b32d4b8d83" title="Vue无缝滚动插件"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">Vue无缝滚动插件</span></span></h3><div class="notion-text notion-block-28dee56845a2800b97f1d1502e422610"><a class="notion-link" href="https://chenxuan0000.github.io/vue-seamless-scroll/zh/" target="_blank" rel="noopener noreferrer">官网</a></div><div class="notion-text notion-block-28dee56845a280938332f96a1cfd534d">注册组件</div><div class="notion-text notion-block-28dee56845a2807ca408c6c74bf4026a">使用组件</div><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-29bee56845a28084bccbf1b56a512db7" data-id="29bee56845a28084bccbf1b56a512db7"><span><div id="29bee56845a28084bccbf1b56a512db7" class="notion-header-anchor"></div><a class="notion-hash-link" href="#29bee56845a28084bccbf1b56a512db7" title="js控制全局滚动或者元素内部滚动"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">js控制全局滚动或者元素内部滚动</span></span></h3><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-2aeee56845a2808980e7e227de98ba60" data-id="2aeee56845a2808980e7e227de98ba60"><span><div id="2aeee56845a2808980e7e227de98ba60" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2aeee56845a2808980e7e227de98ba60" title="v-show在template标签不生效"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">v-show在template标签不生效</span></span></h3><blockquote class="notion-quote notion-block-2aeee56845a2809cabe4c13aae6735c9"><div><code class="notion-inline-code"><b>&lt;template&gt;</b></code><b> 标签本身不会被渲染到 DOM 中</b>,所以 <code class="notion-inline-code">v-show</code> 指令在 <code class="notion-inline-code">&lt;template&gt;</code> 上不会生效!</div></blockquote><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-2b8ee56845a280baa407e3bd06266d06" data-id="2b8ee56845a280baa407e3bd06266d06"><span><div id="2b8ee56845a280baa407e3bd06266d06" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2b8ee56845a280baa407e3bd06266d06" title="a-form-model自定义校验"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">a-form-model自定义校验</span></span></h3><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-2b9ee56845a28034adc1e3a045c16cf4" data-id="2b9ee56845a28034adc1e3a045c16cf4"><span><div id="2b9ee56845a28034adc1e3a045c16cf4" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2b9ee56845a28034adc1e3a045c16cf4" title="vue-quill-editor自定义截图上传"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">vue-quill-editor自定义截图上传</span></span></h3><details class="notion-toggle notion-block-2b9ee56845a280e7bd30ee8e6a1ad2cd"><summary>代码</summary><div></div></details><details class="notion-toggle notion-block-2b9ee56845a2805d9827d2adcab056d7"><summary>使用</summary><div></div></details><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-2b9ee56845a280a19524c810b29fc910" data-id="2b9ee56845a280a19524c810b29fc910"><span><div id="2b9ee56845a280a19524c810b29fc910" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2b9ee56845a280a19524c810b29fc910" title="表单校验不通过时定位到未通过校验的位置"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">表单校验不通过时定位到未通过校验的位置</span></span></h3><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-2eeee56845a280bdba44cb24a78e6b94" data-id="2eeee56845a280bdba44cb24a78e6b94"><span><div id="2eeee56845a280bdba44cb24a78e6b94" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2eeee56845a280bdba44cb24a78e6b94" title="通用脱敏方法"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">通用脱敏方法</span></span></h3><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-2f0ee56845a280b2a817c3d8fbd51099" data-id="2f0ee56845a280b2a817c3d8fbd51099"><span><div id="2f0ee56845a280b2a817c3d8fbd51099" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2f0ee56845a280b2a817c3d8fbd51099" title="在数组中找到对应的对象并将该对象中同名的属性置空"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">在数组中找到对应的对象并将该对象中<b>同名的属性</b>置空</span></span></h3><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-2fcee56845a280a8bb3ad37e5998099c" data-id="2fcee56845a280a8bb3ad37e5998099c"><span><div id="2fcee56845a280a8bb3ad37e5998099c" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2fcee56845a280a8bb3ad37e5998099c" title="合并对象数组保留指定属性值"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">合并对象数组保留指定属性值</span></span></h3></main></div>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[前端调用浏览器打印]]></title>
            <link>https://blog.lmyself.top/article/3b2ee568-45a2-8082-bd59-e83b91903f0f</link>
            <guid>https://blog.lmyself.top/article/3b2ee568-45a2-8082-bd59-e83b91903f0f</guid>
            <pubDate>Tue, 04 Aug 2026 00:00:00 GMT</pubDate>
            <description><![CDATA[前端调用浏览器打印]]></description>
            <content:encoded><![CDATA[<div id="notion-article" class="mx-auto overflow-hidden "><main class="notion light-mode notion-page notion-block-3b2ee56845a28082bd59e83b91903f0f"><div class="notion-viewport"></div><div class="notion-collection-page-properties"></div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-3b2ee56845a28013b7bec368802ea42e" data-id="3b2ee56845a28013b7bec368802ea42e"><span><div id="3b2ee56845a28013b7bec368802ea42e" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3b2ee56845a28013b7bec368802ea42e" title="前端文件打印方案"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">前端文件打印方案</span></span></h2><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-3b2ee56845a28099a629ced9ee5cc3fb" data-id="3b2ee56845a28099a629ced9ee5cc3fb"><span><div id="3b2ee56845a28099a629ced9ee5cc3fb" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3b2ee56845a28099a629ced9ee5cc3fb" title="概述"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">概述</span></span></h3><div class="notion-text notion-block-3b2ee56845a280ec94a3d30d8fc39522">本方案实现了纯前端打印远程文件的能力，支持 PDF、图片、Word（docx）、Excel（xlsx/xls）、文本等常见格式。用户点击&quot;打印&quot;按钮后，直接唤起浏览器打印对话框，无需下载文件到本地。</div><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-3b2ee56845a28052a333db5ad0556a6e" data-id="3b2ee56845a28052a333db5ad0556a6e"><span><div id="3b2ee56845a28052a333db5ad0556a6e" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3b2ee56845a28052a333db5ad0556a6e" title="核心问题与解决方案"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">核心问题与解决方案</span></span></h3><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-3b2ee56845a280d2bcd8ecf363240148" data-id="3b2ee56845a280d2bcd8ecf363240148"><span><div id="3b2ee56845a280d2bcd8ecf363240148" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3b2ee56845a280d2bcd8ecf363240148" title="问题背景"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">问题背景</span></span></h4><div class="notion-text notion-block-3b2ee56845a280899bb0c003b451321c">传统的文件打印方案面临两个核心障碍：</div><ol start="1" class="notion-list notion-list-numbered notion-block-3b2ee56845a28008b627d7bd73f3eff3" style="list-style-type:decimal"><li><b>OSS 响应头限制</b></li><ol class="notion-list notion-list-numbered notion-block-3b2ee56845a28008b627d7bd73f3eff3" style="list-style-type:lower-alpha"><div class="notion-text notion-block-3b2ee56845a280dbb057ea8ba8742dd7">阿里云 OSS 返回的文件 URL 携带 <code class="notion-inline-code">Content-Disposition: attachment</code>，导致浏览器直接下载而非预览。无论使用 <code class="notion-inline-code">window.open</code>、<code class="notion-inline-code">&lt;iframe&gt;</code>、还是 <code class="notion-inline-code">printJS</code> 直接传 URL，都会触发下载行为。</div></ol></ol><ol start="2" class="notion-list notion-list-numbered notion-block-3b2ee56845a280d39c1bcd68a806fbd0" style="list-style-type:decimal"><li><b>Office 格式不可直接渲染</b></li><ol class="notion-list notion-list-numbered notion-block-3b2ee56845a280d39c1bcd68a806fbd0" style="list-style-type:lower-alpha"><div class="notion-text notion-block-3b2ee56845a280c98b0eff803e60bafc">浏览器原生只能渲染 PDF、图片、文本、HTML，无法直接显示 <code class="notion-inline-code">.docx</code> / <code class="notion-inline-code">.xlsx</code> 文件。</div></ol></ol><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-3b2ee56845a280e0a7f2e5cb02386891" data-id="3b2ee56845a280e0a7f2e5cb02386891"><span><div id="3b2ee56845a280e0a7f2e5cb02386891" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3b2ee56845a280e0a7f2e5cb02386891" title="解决思路"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">解决思路</span></span></h4><div class="notion-text notion-block-3b2ee56845a280eab4c0f9d5be94fec0"><b>绕过 attachment 响应头</b></div><div class="notion-text notion-block-3b2ee56845a2804d828ffa67bde5ae0d">使用 <code class="notion-inline-code">fetch()</code> API 将文件以 ArrayBuffer 形式拉取到浏览器内存中。这样文件内容由 JavaScript 控制，不受服务端响应头影响。</div><div class="notion-text notion-block-3b2ee56845a28011b053d17931274c24"><b>格式转换 + 同源 iframe 打印</b></div><ul class="notion-list notion-list-disc notion-block-3b2ee56845a280d3ad0ffd60eda9404d"><li>将 Office 文档转换为 HTML</li></ul><ul class="notion-list notion-list-disc notion-block-3b2ee56845a280748580cd8e17d188bf"><li>将 PDF / 图片转换为 Blob URL</li></ul><ul class="notion-list notion-list-disc notion-block-3b2ee56845a28051bf8af97e2bdb4caa"><li>把转换后的内容注入同源的隐藏 <code class="notion-inline-code">&lt;iframe&gt;</code> 中</li></ul><ul class="notion-list notion-list-disc notion-block-3b2ee56845a2805eb65ef0af8ec5bd43"><li>调用 <code class="notion-inline-code">iframe.contentWindow.print()</code> 唤起打印对话框</li></ul><div class="notion-text notion-block-3b2ee56845a280d9b6ddfc54fb3957c9">由于 iframe 是同源的（通过 <code class="notion-inline-code">document.write</code> 创建），不受跨域限制，<code class="notion-inline-code">print()</code> 可以正常调用。</div><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-3b2ee56845a280bc97e1ea9ad29cf07e" data-id="3b2ee56845a280bc97e1ea9ad29cf07e"><span><div id="3b2ee56845a280bc97e1ea9ad29cf07e" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3b2ee56845a280bc97e1ea9ad29cf07e" title="技术实现"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">技术实现</span></span></h3><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-3b2ee56845a280188d2ef1fb2d373f81" data-id="3b2ee56845a280188d2ef1fb2d373f81"><span><div id="3b2ee56845a280188d2ef1fb2d373f81" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3b2ee56845a280188d2ef1fb2d373f81" title="核心依赖"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">核心依赖</span></span></h4><div class="notion-text notion-block-3b2ee56845a28006997ac97bab2ae54e">这三个库都采用<b>动态 import</b>，按需加载，不会增加主包体积。</div><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-3b2ee56845a2809ca307e932f3839471" data-id="3b2ee56845a2809ca307e932f3839471"><span><div id="3b2ee56845a2809ca307e932f3839471" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3b2ee56845a2809ca307e932f3839471" title="文件处理流程"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">文件处理流程</span></span></h4><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-3b2ee56845a2807b8d24ce6fd61c044f" data-id="3b2ee56845a2807b8d24ce6fd61c044f"><span><div id="3b2ee56845a2807b8d24ce6fd61c044f" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3b2ee56845a2807b8d24ce6fd61c044f" title="支持格式列表"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">支持格式列表</span></span></h4><table class="notion-simple-table notion-block-3b2ee56845a28099ae5ad8d11da97280"><tbody><tr class="notion-simple-table-row notion-simple-table-header-row notion-block-3b2ee56845a28048a71cd693e376b625"><td class="" style="width:120px"><div class="notion-simple-table-cell">格式分类</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">支持的后缀</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">处理方式</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">备注</div></td></tr><tr class="notion-simple-table-row notion-block-3b2ee56845a280b39ff3f83b8aaa1477"><td class="" style="width:120px"><div class="notion-simple-table-cell">PDF</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">pdf</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">print-js</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">调用浏览器内置 PDF 阅读器</div></td></tr><tr class="notion-simple-table-row notion-block-3b2ee56845a280fc9f59da796f6bd75f"><td class="" style="width:120px"><div class="notion-simple-table-cell">图片</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">jpg, jpeg, png, gif, bmp, webp, svg</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">Blob URL → <code class="notion-inline-code">&lt;img&gt;</code></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">自动居中，响应式缩放</div></td></tr><tr class="notion-simple-table-row notion-block-3b2ee56845a280379fc9ce9927a1174f"><td class="" style="width:120px"><div class="notion-simple-table-cell">Word</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">docx</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">mammoth.js 转 HTML</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">⚠️ 丢失分页、页眉页脚、文本框</div></td></tr><tr class="notion-simple-table-row notion-block-3b2ee56845a28020b181f55a22fb8381"><td class="" style="width:120px"><div class="notion-simple-table-cell">Excel</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">xlsx, xls, xlsm</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">SheetJS 转 HTML 表格</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">⚠️ 仅保留计算结果，丢失公式、图表</div></td></tr><tr class="notion-simple-table-row notion-block-3b2ee56845a28018bc96f2c507d37cda"><td class="" style="width:120px"><div class="notion-simple-table-cell">文本</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">txt, json, xml, csv, properties, log, md</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">文本解码 + <code class="notion-inline-code">&lt;pre&gt;</code></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">UTF-8 失败自动尝试 GBK</div></td></tr><tr class="notion-simple-table-row notion-block-3b2ee56845a28057a3eef171a8597b14"><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>不支持</b></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">doc, ppt, pptx</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">-</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">提示并自动下载</div></td></tr></tbody></table><blockquote class="notion-quote notion-block-3b2ee56845a280d49440ed88cfc63909"><div>⚠️ <b>重要提示</b>：Word / Excel 转换会丢失部分格式和功能。如果需要打印<b>带签章的正式文档</b>或<b>复杂排版</b>，建议后端使用 LibreOffice / OnlyOffice / Aspose 转换为 PDF 后再打印。</div></blockquote><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-3b2ee56845a280a2ac83fcbf1562f661" data-id="3b2ee56845a280a2ac83fcbf1562f661"><span><div id="3b2ee56845a280a2ac83fcbf1562f661" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3b2ee56845a280a2ac83fcbf1562f661" title="使用方法"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">使用方法</span></span></h3><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-3b2ee56845a2801e82f7e11e1ce9a59a" data-id="3b2ee56845a2801e82f7e11e1ce9a59a"><span><div id="3b2ee56845a2801e82f7e11e1ce9a59a" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3b2ee56845a2801e82f7e11e1ce9a59a" title="1. 安装依赖"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">1. 安装依赖</span></span></h4><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-3b2ee56845a2803388fed41db6c580af" data-id="3b2ee56845a2803388fed41db6c580af"><span><div id="3b2ee56845a2803388fed41db6c580af" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3b2ee56845a2803388fed41db6c580af" title="2. 导入工具函数"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">2. 导入工具函数</span></span></h4><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-3b2ee56845a280249a61f52a2b3febfd" data-id="3b2ee56845a280249a61f52a2b3febfd"><span><div id="3b2ee56845a280249a61f52a2b3febfd" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3b2ee56845a280249a61f52a2b3febfd" title="3. 调用打印函数"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">3. 调用打印函数</span></span></h4><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-3b2ee56845a2806fae82d79f2d3d28c3" data-id="3b2ee56845a2806fae82d79f2d3d28c3"><span><div id="3b2ee56845a2806fae82d79f2d3d28c3" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3b2ee56845a2806fae82d79f2d3d28c3" title="API 说明"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">API 说明</span></span></h4><h5 class="notion-h notion-h4 notion-h-indent-3 notion-block-3b2ee56845a2806782a1d7a2ef26e850" data-id="3b2ee56845a2806782a1d7a2ef26e850"><span><div id="3b2ee56845a2806782a1d7a2ef26e850" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3b2ee56845a2806782a1d7a2ef26e850" title="printRemoteFile(url, options)"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><code class="notion-inline-code">printRemoteFile(url, options)</code></span></span></h5><div class="notion-text notion-block-3b2ee56845a2808f8d45cf6c0ed45f65"><b>参数</b></div><table class="notion-simple-table notion-block-3b2ee56845a280aeb80cd5381ccc98c6"><tbody><tr class="notion-simple-table-row notion-simple-table-header-row notion-block-3b2ee56845a280c49932ee458c83cf02"><td class="" style="width:120px"><div class="notion-simple-table-cell">参数</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">类型</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">必填</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">说明</div></td></tr><tr class="notion-simple-table-row notion-block-3b2ee56845a2801b898ae71dbd9454a7"><td class="" style="width:120px"><div class="notion-simple-table-cell"><code class="notion-inline-code">url</code></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">string</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">✅</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">文件地址（需允许跨域读取）</div></td></tr><tr class="notion-simple-table-row notion-block-3b2ee56845a280c7aa77c3b257bca030"><td class="" style="width:120px"><div class="notion-simple-table-cell"><code class="notion-inline-code">options.suffix</code></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">string</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">❌</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">文件后缀（如 <code class="notion-inline-code">&#x27;pdf&#x27;</code> / <code class="notion-inline-code">&#x27;docx&#x27;</code>）&lt;br&gt;不传时会从 <code class="notion-inline-code">url</code> 或 <code class="notion-inline-code">fileName</code> 自动推断</div></td></tr><tr class="notion-simple-table-row notion-block-3b2ee56845a280e9ae7efa8bb3425189"><td class="" style="width:120px"><div class="notion-simple-table-cell"><code class="notion-inline-code">options.fileName</code></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">string</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">❌</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">文件名，用于打印标题</div></td></tr></tbody></table><div class="notion-text notion-block-3b2ee56845a28045bf01ca7075c886ea"><b>返回值</b></div><div class="notion-text notion-block-3b2ee56845a28051a7b7fefa1403b647"><code class="notion-inline-code">Promise&lt;void&gt;</code> - 打印对话框唤起后 resolve；失败时 reject</div><div class="notion-text notion-block-3b2ee56845a280838469e8157b8ffccd"><b>错误类型</b></div><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-3b2ee56845a280e49768e85c9b24cd97" data-id="3b2ee56845a280e49768e85c9b24cd97"><span><div id="3b2ee56845a280e49768e85c9b24cd97" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3b2ee56845a280e49768e85c9b24cd97" title="前提条件"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">前提条件</span></span></h3><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-3b2ee56845a28053b666c340407409c6" data-id="3b2ee56845a28053b666c340407409c6"><span><div id="3b2ee56845a28053b666c340407409c6" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3b2ee56845a28053b666c340407409c6" title="CORS 跨域配置"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">CORS 跨域配置</span></span></h4><div class="notion-text notion-block-3b2ee56845a280e096afc96b376a5e84">前端需要通过 <code class="notion-inline-code">fetch()</code> 读取文件内容，OSS Bucket 必须配置允许跨域访问。</div><div class="notion-text notion-block-3b2ee56845a2801ca088c0cbb8acfb8f"><b>验证方法</b>（在浏览器控制台执行）：</div><div class="notion-text notion-block-3b2ee56845a2803795e9dcce3f214201">如果看到 <code class="notion-inline-code">CORS policy</code> 相关错误，需要在 OSS 控制台设置跨域规则：</div><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-3b2ee56845a280e0b19fea5864859ba2" data-id="3b2ee56845a280e0b19fea5864859ba2"><span><div id="3b2ee56845a280e0b19fea5864859ba2" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3b2ee56845a280e0b19fea5864859ba2" title="已知限制"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">已知限制</span></span></h3><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-3b2ee56845a2801d8e26f286e75541a2" data-id="3b2ee56845a2801d8e26f286e75541a2"><span><div id="3b2ee56845a2801d8e26f286e75541a2" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3b2ee56845a2801d8e26f286e75541a2" title="1. Word 文档转换限制"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">1. Word 文档转换限制</span></span></h4><div class="notion-text notion-block-3b2ee56845a2800399eeccd0a9c569f3"><b>✅ 能保留的</b></div><ul class="notion-list notion-list-disc notion-block-3b2ee56845a280c3a4e7c8eadee141b7"><li>段落、标题、列表</li></ul><ul class="notion-list notion-list-disc notion-block-3b2ee56845a280c695cef0143aafa1ce"><li>加粗、斜体、下划线</li></ul><ul class="notion-list notion-list-disc notion-block-3b2ee56845a2806c8687d0a4b937d31e"><li>表格结构</li></ul><ul class="notion-list notion-list-disc notion-block-3b2ee56845a280f9a48fe90131e1b7e6"><li>内嵌图片</li></ul><div class="notion-text notion-block-3b2ee56845a28087a8ebdd14e3ba3c09"><b>❌ 会丢失的</b></div><ul class="notion-list notion-list-disc notion-block-3b2ee56845a2805d9649feaf51f0e545"><li>分页符、页眉页脚</li></ul><ul class="notion-list notion-list-disc notion-block-3b2ee56845a280bbb2f2dbf8196105ae"><li>文本框、浮动图片定位</li></ul><ul class="notion-list notion-list-disc notion-block-3b2ee56845a2801f8b63f68c17892b93"><li>批注、修订</li></ul><ul class="notion-list notion-list-disc notion-block-3b2ee56845a2800891aceabc49ef7340"><li>艺术字、形状</li></ul><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-3b2ee56845a28040995ccfa11d39adf5" data-id="3b2ee56845a28040995ccfa11d39adf5"><span><div id="3b2ee56845a28040995ccfa11d39adf5" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3b2ee56845a28040995ccfa11d39adf5" title="2. Excel 文档转换限制"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">2. Excel 文档转换限制</span></span></h4><div class="notion-text notion-block-3b2ee56845a28042afc8d431287c3cb7"><b>✅ 能保留的</b></div><ul class="notion-list notion-list-disc notion-block-3b2ee56845a280138216f454c7e0018f"><li>单元格值（公式的计算结果）</li></ul><ul class="notion-list notion-list-disc notion-block-3b2ee56845a28002a068cc4fac804418"><li>合并单元格</li></ul><ul class="notion-list notion-list-disc notion-block-3b2ee56845a2800abba6d7e96f713846"><li>基本表格结构</li></ul><div class="notion-text notion-block-3b2ee56845a28077990ddb810d12a4f6"><b>❌ 会丢失的</b></div><ul class="notion-list notion-list-disc notion-block-3b2ee56845a280688631f97a2d8b99c9"><li>公式本身（只保留计算结果）</li></ul><ul class="notion-list notion-list-disc notion-block-3b2ee56845a280789b28c708ffbd3ebf"><li>条件格式、数据透视表</li></ul><ul class="notion-list notion-list-disc notion-block-3b2ee56845a280bdbe1ecf5f0c9c153b"><li>图表、迷你图</li></ul><ul class="notion-list notion-list-disc notion-block-3b2ee56845a2808a9918cda00a9cb1d1"><li>精确的列宽 / 行高</li></ul><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-3b2ee56845a28084ae60d3cf2762df5b" data-id="3b2ee56845a28084ae60d3cf2762df5b"><span><div id="3b2ee56845a28084ae60d3cf2762df5b" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3b2ee56845a28084ae60d3cf2762df5b" title="3. 不支持的格式"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">3. 不支持的格式</span></span></h4><table class="notion-simple-table notion-block-3b2ee56845a280a0b67bf8b00e689459"><tbody><tr class="notion-simple-table-row notion-simple-table-header-row notion-block-3b2ee56845a2805fa23ed6255c015c83"><td class="" style="width:120px"><div class="notion-simple-table-cell">格式</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">原因</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">处理方式</div></td></tr><tr class="notion-simple-table-row notion-block-3b2ee56845a280e1840ec7e8b5fe65a4"><td class="" style="width:120px"><div class="notion-simple-table-cell"><code class="notion-inline-code">.doc</code></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">二进制 BIFF 格式，mammoth 不支持</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">自动下载</div></td></tr><tr class="notion-simple-table-row notion-block-3b2ee56845a280bd94faecdc36b87a44"><td class="" style="width:120px"><div class="notion-simple-table-cell"><code class="notion-inline-code">.ppt</code> / <code class="notion-inline-code">.pptx</code></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">无成熟的纯前端解析方案</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">自动下载</div></td></tr></tbody></table><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-3b2ee56845a280e78a18ecbd25501043" data-id="3b2ee56845a280e78a18ecbd25501043"><span><div id="3b2ee56845a280e78a18ecbd25501043" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3b2ee56845a280e78a18ecbd25501043" title="适用场景"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">适用场景</span></span></h3><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-3b2ee56845a280749151e8edf2780fd2" data-id="3b2ee56845a280749151e8edf2780fd2"><span><div id="3b2ee56845a280749151e8edf2780fd2" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3b2ee56845a280749151e8edf2780fd2" title="✅ 适合使用本方案的场景"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">✅ 适合使用本方案的场景</span></span></h4><ul class="notion-list notion-list-disc notion-block-3b2ee56845a280c08012cfe2c9553d40"><li>打印<b>内容为主</b>的文档（如知识库文章、技术文档）</li></ul><ul class="notion-list notion-list-disc notion-block-3b2ee56845a280828860e9b043d0046f"><li>打印图片、PDF</li></ul><ul class="notion-list notion-list-disc notion-block-3b2ee56845a2800abf4dd79d060bcd7a"><li>快速预览并打印 Excel 数据表</li></ul><ul class="notion-list notion-list-disc notion-block-3b2ee56845a280fe8f8df68ebea68e4c"><li>不需要完全还原原始排版</li></ul><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-3b2ee56845a280a8a778f36cec763d72" data-id="3b2ee56845a280a8a778f36cec763d72"><span><div id="3b2ee56845a280a8a778f36cec763d72" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3b2ee56845a280a8a778f36cec763d72" title="⚠️ 不适合使用本方案的场景"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">⚠️ 不适合使用本方案的场景</span></span></h4><ul class="notion-list notion-list-disc notion-block-3b2ee56845a280c396e2e4b2c717fd27"><li>打印<b>带签章的正式文档</b>（如合同、证明）</li></ul><ul class="notion-list notion-list-disc notion-block-3b2ee56845a280b4a7dce0588734423d"><li>打印需要<b>精确排版</b>的 Word 报告</li></ul><ul class="notion-list notion-list-disc notion-block-3b2ee56845a2805f878dcb521d0bca09"><li>打印包含<b>复杂公式</b>的 Excel 财务表</li></ul><ul class="notion-list notion-list-disc notion-block-3b2ee56845a28062988de5071049ec2a"><li>打印 PPT 演示文稿</li></ul><blockquote class="notion-quote notion-block-3b2ee56845a280ddaf95f840cc57a591"><div>对于以上场景，建议后端使用 <b>LibreOffice</b> / <b>OnlyOffice</b> / <b>Aspose</b> 转换为 PDF 后再打印，确保内容与原件一致。</div></blockquote><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-3b2ee56845a2802982c6c56829230cf2" data-id="3b2ee56845a2802982c6c56829230cf2"><span><div id="3b2ee56845a2802982c6c56829230cf2" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3b2ee56845a2802982c6c56829230cf2" title="性能优化"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">性能优化</span></span></h3><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-3b2ee56845a280fc90eac095953ced88" data-id="3b2ee56845a280fc90eac095953ced88"><span><div id="3b2ee56845a280fc90eac095953ced88" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3b2ee56845a280fc90eac095953ced88" title="1. 动态加载"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">1. 动态加载</span></span></h4><div class="notion-text notion-block-3b2ee56845a28028bab4cb5ec3e1d705"><code class="notion-inline-code">mammoth</code> 和 <code class="notion-inline-code">xlsx</code> 使用动态 <code class="notion-inline-code">import()</code>，只在需要时加载：</div><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-3b2ee56845a280ebb7d2cf10493a53b3" data-id="3b2ee56845a280ebb7d2cf10493a53b3"><span><div id="3b2ee56845a280ebb7d2cf10493a53b3" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3b2ee56845a280ebb7d2cf10493a53b3" title="2. Blob URL 自动回收"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">2. Blob URL 自动回收</span></span></h4><div class="notion-text notion-block-3b2ee56845a280788607c674a3f2c369">创建的 Blob URL 会在打印完成后自动释放：</div><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-3b2ee56845a280d0b82cc4bc765f89cb" data-id="3b2ee56845a280d0b82cc4bc765f89cb"><span><div id="3b2ee56845a280d0b82cc4bc765f89cb" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3b2ee56845a280d0b82cc4bc765f89cb" title="3. 图片预加载"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">3. 图片预加载</span></span></h4><div class="notion-text notion-block-3b2ee56845a280d4967fd3c4f105c23f">HTML 注入 iframe 后，会等待所有图片加载完成再打印，避免打印空白图片：</div><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-3b2ee56845a2807fb3b7eaf2191b7856" data-id="3b2ee56845a2807fb3b7eaf2191b7856"><span><div id="3b2ee56845a2807fb3b7eaf2191b7856" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3b2ee56845a2807fb3b7eaf2191b7856" title="故障排查"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">故障排查</span></span></h3><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-3b2ee56845a280e08900dc2369c47a82" data-id="3b2ee56845a280e08900dc2369c47a82"><span><div id="3b2ee56845a280e08900dc2369c47a82" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3b2ee56845a280e08900dc2369c47a82" title="问题：点击打印后直接下载文件"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">问题：点击打印后直接下载文件</span></span></h4><div class="notion-text notion-block-3b2ee56845a280f192bcca84f2def423"><b>原因</b>：CORS 配置缺失，<code class="notion-inline-code">fetch()</code> 被浏览器拦截。</div><div class="notion-text notion-block-3b2ee56845a280f98b87c304bd3f64f3"><b>解决</b>：检查 OSS Bucket 跨域规则，或改用后端代理接口（同源请求不受 CORS 限制）。</div><hr class="notion-hr notion-block-3b2ee56845a2801e92dee047c8bc15b1"/><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-3b2ee56845a2804489cef62bfa10a819" data-id="3b2ee56845a2804489cef62bfa10a819"><span><div id="3b2ee56845a2804489cef62bfa10a819" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3b2ee56845a2804489cef62bfa10a819" title="问题：Word / Excel 打印内容不完整"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">问题：Word / Excel 打印内容不完整</span></span></h4><div class="notion-text notion-block-3b2ee56845a280a69045c8adcb9ae075"><b>原因</b>：前端转换库功能有限，复杂格式会丢失。</div><div class="notion-text notion-block-3b2ee56845a2809fb355ce224f36a609"><b>解决</b>：后端接入 LibreOffice / Aspose，上传时或打印时转换为 PDF。</div><hr class="notion-hr notion-block-3b2ee56845a2800197e2d53e5e0d9b86"/><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-3b2ee56845a280ce837ffbf9a730cb9d" data-id="3b2ee56845a280ce837ffbf9a730cb9d"><span><div id="3b2ee56845a280ce837ffbf9a730cb9d" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3b2ee56845a280ce837ffbf9a730cb9d" title="问题：PDF 打印对话框一直不关闭 loading"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">问题：PDF 打印对话框一直不关闭 loading</span></span></h4><div class="notion-text notion-block-3b2ee56845a280048778e7fc4c75ec7f"><b>原因</b>：<code class="notion-inline-code">print-js</code> 的 <code class="notion-inline-code">onPrintDialogClose</code> 回调在部分浏览器不触发。</div><div class="notion-text notion-block-3b2ee56845a2804d8adafbdbb78007c3"><b>解决</b>：代码中已加 8 秒超时兜底，自动关闭 loading。</div><hr class="notion-hr notion-block-3b2ee56845a280439f83e777465c5687"/><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-3b2ee56845a28014ab7cf63735d9f4c0" data-id="3b2ee56845a28014ab7cf63735d9f4c0"><span><div id="3b2ee56845a28014ab7cf63735d9f4c0" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3b2ee56845a28014ab7cf63735d9f4c0" title="问题：打印按钮没反应"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">问题：打印按钮没反应</span></span></h4><ol start="1" class="notion-list notion-list-numbered notion-block-3b2ee56845a2807790fdea4b88427fe7" style="list-style-type:decimal"><li>打开浏览器控制台，查看是否有报错</li></ol><ol start="2" class="notion-list notion-list-numbered notion-block-3b2ee56845a2807ab41dd43b8b9196af" style="list-style-type:decimal"><li>检查文件地址是否有效（<code class="notion-inline-code">proxyUrl</code> / <code class="notion-inline-code">filePath</code> / <code class="notion-inline-code">foreverUrl</code>）</li></ol><ol start="3" class="notion-list notion-list-numbered notion-block-3b2ee56845a280da98f0c8b910cdd191" style="list-style-type:decimal"><li>验证 CORS 是否配置正确（见上方验证方法）</li></ol><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-3b2ee56845a280e0ab3fd9a9dc1d0334" data-id="3b2ee56845a280e0ab3fd9a9dc1d0334"><span><div id="3b2ee56845a280e0ab3fd9a9dc1d0334" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3b2ee56845a280e0ab3fd9a9dc1d0334" title="扩展阅读"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">扩展阅读</span></span></h3><ul class="notion-list notion-list-disc notion-block-3b2ee56845a280bb86eef01dc54a6c7e"><li><a class="notion-link" href="https://github.com/mwilliamson/mammoth.js" target="_blank" rel="noopener noreferrer">mammoth.js 文档</a></li></ul><ul class="notion-list notion-list-disc notion-block-3b2ee56845a280e1af14f2678fa2689a"><li><a class="notion-link" href="https://docs.sheetjs.com/" target="_blank" rel="noopener noreferrer">SheetJS 文档</a></li></ul><ul class="notion-list notion-list-disc notion-block-3b2ee56845a280c188bef0b1acde6e5b"><li><a class="notion-link" href="https://printjs.crabbly.com/" target="_blank" rel="noopener noreferrer">Print.js 文档</a></li></ul><ul class="notion-list notion-list-disc notion-block-3b2ee56845a28078970cf16a135300bc"><li><a class="notion-link" href="https://help.aliyun.com/document_detail/31870.html" target="_blank" rel="noopener noreferrer">阿里云 OSS CORS 设置</a></li></ul><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-3b2ee56845a280499645f9881f0f2f55" data-id="3b2ee56845a280499645f9881f0f2f55"><span><div id="3b2ee56845a280499645f9881f0f2f55" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3b2ee56845a280499645f9881f0f2f55" title="总结"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">总结</span></span></h3><div class="notion-text notion-block-3b2ee56845a280a38bc6d82f940b523b">本方案通过 <code class="notion-inline-code">fetch</code> 绕过 OSS 的 <code class="notion-inline-code">attachment</code> 响应头，结合格式转换库将文件转为可渲染内容，最终通过同源 iframe 调用 <code class="notion-inline-code">print()</code> 实现打印。</div><div class="notion-text notion-block-3b2ee56845a280e89574db8b800571e7"><b>优点</b>：无需后端改造，纯前端实现，用户体验流畅。</div><div class="notion-text notion-block-3b2ee56845a2808fafa5c0c6184d7950"><b>缺点</b>：Office 格式转换有限制，不适合正式文档打印。</div><div class="notion-text notion-block-3b2ee56845a28063923be3b2b4dafd8f">根据业务场景选择：内容型文档用前端方案，正式文档让后端转 PDF。</div></main></div>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[博客导流微信公众号]]></title>
            <link>https://blog.lmyself.top/article/11cee568-45a2-803e-8e5b-e34f7c297dc1</link>
            <guid>https://blog.lmyself.top/article/11cee568-45a2-803e-8e5b-e34f7c297dc1</guid>
            <pubDate>Fri, 11 Oct 2024 00:00:00 GMT</pubDate>
            <description><![CDATA[博客导流微信公众号]]></description>
            <content:encoded><![CDATA[<div id="notion-article" class="mx-auto overflow-hidden "><main class="notion light-mode notion-page notion-block-11cee56845a2803e8e5be34f7c297dc1"><div class="notion-viewport"></div><div class="notion-collection-page-properties"></div><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-11cee56845a28095bc2ef616f32ec8c7" data-id="11cee56845a28095bc2ef616f32ec8c7"><span><div id="11cee56845a28095bc2ef616f32ec8c7" class="notion-header-anchor"></div><a class="notion-hash-link" href="#11cee56845a28095bc2ef616f32ec8c7" title="博客导流公众号"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>博客导流公众号</b></span></span></h3><div class="notion-text notion-block-11cee56845a280d68b4ff8ead7e8f2ea">如何进入 工具 页面：</div><ul class="notion-list notion-list-disc notion-block-11cee56845a2807882aae09162521db3"><li>注册：<a class="notion-link" href="https://open.techgrow.cn/" target="_blank" rel="noopener noreferrer">https://open.techgrow.cn/open in new window</a></li></ul><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-11cee56845a280d99077ccb1d58796bc" data-id="11cee56845a280d99077ccb1d58796bc"><span><div id="11cee56845a280d99077ccb1d58796bc" class="notion-header-anchor"></div><a class="notion-hash-link" href="#11cee56845a280d99077ccb1d58796bc" title="如何使用？"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>如何使用？</b></span></span></h3><div class="notion-text notion-block-11cee56845a2805993aacbecb3616e7b">登录：「博客引流公众号」-&gt;「博客注册」</div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-36dee56845a280fcb950e23a9502b9b2"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:100%"><img style="object-fit:cover" src="https://www.notion.so/image/attachment%3Aa886f7fe-db0a-4f8f-b033-f812a575df81%3Aimage.png?table=block&amp;id=36dee568-45a2-80fc-b950-e23a9502b9b2&amp;t=36dee568-45a2-80fc-b950-e23a9502b9b2" alt="notion image" loading="lazy" decoding="async"/></div></figure><div class="notion-text notion-block-11cee56845a280a48c96f7c79daa69fa">根据提示填写你的信息，之后就会生成整合方案</div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-36dee56845a280aa8785cca7dae3ea2f"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:100%"><img style="object-fit:cover" src="https://www.notion.so/image/attachment%3A8660dc19-3b8c-4c93-957c-67001153e28c%3Aimage.png?table=block&amp;id=36dee568-45a2-80aa-8785-cca7dae3ea2f&amp;t=36dee568-45a2-80aa-8785-cca7dae3ea2f" alt="notion image" loading="lazy" decoding="async"/></div></figure><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-11cee56845a280e4b625fff53524131c" data-id="11cee56845a280e4b625fff53524131c"><span><div id="11cee56845a280e4b625fff53524131c" class="notion-header-anchor"></div><a class="notion-hash-link" href="#11cee56845a280e4b625fff53524131c" title="NotionNext配置说明"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>NotionNext配置说明</b></span></span></h3><div class="notion-text notion-block-11cee56845a280388fb1d14c5b4ac2d9">在您的Notion配置中心添加以下配置，即可在网页上激活文章验证码解锁功能</div><table class="notion-simple-table notion-block-11cee56845a280a29d1cce6336eba57a"><tbody><tr class="notion-simple-table-row notion-block-11cee56845a280e1b12adf4ebb62f350"><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>配置名</b></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>配置值（示例）</b></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>说明</b></div></td></tr><tr class="notion-simple-table-row notion-block-11cee56845a280c883e7e7974e96fa27"><td class="" style="width:120px"><div class="notion-simple-table-cell">TECH_GROW_BLOG_ID</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">3xxxx-1xxxxxxxxxx0-xx4</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">techgrow后台配置的博客ID[<code class="notion-inline-code"><b>blogId</b></code>]</div></td></tr><tr class="notion-simple-table-row notion-block-11cee56845a280168a53cf4037872645"><td class="" style="width:120px"><div class="notion-simple-table-cell">TECH_GROW_QRCODE</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><a class="notion-link" href="https://open.weixin.qq.com/qr/code?username=gh_29d5e8d7d648" target="_blank" rel="noopener noreferrer">https://open.weixin.qq.com/qr/code?username=gh_29d5e8d7d648</a></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">公众号二维码图片</div></td></tr><tr class="notion-simple-table-row notion-block-11cee56845a28094ba00f5a603d25e86"><td class="" style="width:120px"><div class="notion-simple-table-cell">TECH_GROW_NAME</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">IMyself</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">公众号名字，可用于搜索关注</div></td></tr><tr class="notion-simple-table-row notion-block-11cee56845a280028b84f6b77e265667"><td class="" style="width:120px"><div class="notion-simple-table-cell">TECH_GROW_KEYWORD</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">验证码</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">在公众号设置的自动关键词</div></td></tr><tr class="notion-simple-table-row notion-block-11cee56845a28027b971f9017332834b"><td class="" style="width:120px"><div class="notion-simple-table-cell"><code class="notion-inline-code">TECH_GROW_BTN_TEXT</code></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">原创不易，完成人机检测，阅读全文</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">【非必填】按钮提示词</div></td></tr><tr class="notion-simple-table-row notion-block-11cee56845a28009bae3cef7f02fb5af"><td class="" style="width:120px"><div class="notion-simple-table-cell">TECH_GROW_WHITE_LIST</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">about,example,test</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">【非必填】白名单，不需要加密的文章slug，英文逗号隔开。其余全站文章都需要验证码。</div></td></tr><tr class="notion-simple-table-row notion-block-11cee56845a280b2b11de680252592ff"><td class="" style="width:120px"><div class="notion-simple-table-cell">TECH_GROW_VALIDITY_DURATION</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">1</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">【非必填】验证一次后，阅读权限的持续时长，单位是“小时”，默认是1小时</div></td></tr><tr class="notion-simple-table-row notion-block-36dee56845a280c793e1fb8989e5cbd5"><td class="" style="width:120px"><div class="notion-simple-table-cell">TECH_GROW_YELLOW_LIST</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">ㅤ</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">仅这些路径启用拦截（优先级高于白名单）</div></td></tr></tbody></table><div class="notion-text notion-block-11cee56845a2807da1cee2a2903dea81">要实现这个配置，你需要先注册techgrow平台，获取blogId，并且设置一个用于回复的关键词绑定。</div><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-11cee56845a2804a937ccf0c34170837" data-id="11cee56845a2804a937ccf0c34170837"><span><div id="11cee56845a2804a937ccf0c34170837" class="notion-header-anchor"></div><a class="notion-hash-link" href="#11cee56845a2804a937ccf0c34170837" title="关键步骤"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>关键步骤</b></span></span></h4><ol start="1" class="notion-list notion-list-numbered notion-block-11cee56845a28072b0addef1eb050d32" style="list-style-type:decimal"><li>我们需要记录这里的<code class="notion-inline-code">blogId</code>这个参数，即上图中<code class="notion-inline-code">blogId</code>后面<code class="notion-inline-code">打马赛克</code>的部分。</li></ol><ol start="2" class="notion-list notion-list-numbered notion-block-11cee56845a28014ae04cd2ef6c02b89" style="list-style-type:decimal"><li>按照提示需要在公众号后台设置<b>关键词回复</b>。</li></ol><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-11cee56845a2809fb9a9ca7ddd3d8538" data-id="11cee56845a2809fb9a9ca7ddd3d8538"><span><div id="11cee56845a2809fb9a9ca7ddd3d8538" class="notion-header-anchor"></div><a class="notion-hash-link" href="#11cee56845a2809fb9a9ca7ddd3d8538" title="公众号二维码图片哪里来？"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>公众号二维码图片哪里来？</b></span></span></h3><ol start="1" class="notion-list notion-list-numbered notion-block-11cee56845a28071bfc6c94aa26fcb0d" style="list-style-type:decimal"><li>在<b>公众号</b>管理中心，找到并点击“设置”，找到“账号信息”</li></ol><ol start="2" class="notion-list notion-list-numbered notion-block-11cee56845a280349512dd444592dfe4" style="list-style-type:decimal"><li>在账号信息页面，找到“<b>二维码</b>”，然后点击“更多尺寸”</li></ol><ol start="3" class="notion-list notion-list-numbered notion-block-11cee56845a2805da5cbf6e6585244d8" style="list-style-type:decimal"><li>进入更多尺寸的页面，会呈现出常用的<b>二维码</b>尺寸，和建议扫描的距离，根据需要，选择下载，即可获得相应的<b>公众号二维码</b>。</li></ol><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-11cee56845a280408fd2f7217694c929" data-id="11cee56845a280408fd2f7217694c929"><span><div id="11cee56845a280408fd2f7217694c929" class="notion-header-anchor"></div><a class="notion-hash-link" href="#11cee56845a280408fd2f7217694c929" title="公众号关键词回复如何设置？"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>公众号关键词回复如何设置？</b></span></span></h3><div class="notion-text notion-block-11cee56845a280d9afd8f558793fd44c">公众号后台找到 ： 自动回复→关键词回复→添加回复</div></main></div>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[关于CPA、CC-Switch]]></title>
            <link>https://blog.lmyself.top/article/31bee568-45a2-8083-8f81-e4e17e6719bc</link>
            <guid>https://blog.lmyself.top/article/31bee568-45a2-8083-8f81-e4e17e6719bc</guid>
            <pubDate>Fri, 06 Mar 2026 00:00:00 GMT</pubDate>
            <description><![CDATA[关于CPA、CC-Switch]]></description>
            <content:encoded><![CDATA[<div id="notion-article" class="mx-auto overflow-hidden "><main class="notion light-mode notion-page notion-block-31bee56845a280838f81e4e17e6719bc"><div class="notion-viewport"></div><div class="notion-collection-page-properties"></div><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-31bee56845a280b3ab45e25e98445f86" data-id="31bee56845a280b3ab45e25e98445f86"><span><div id="31bee56845a280b3ab45e25e98445f86" class="notion-header-anchor"></div><a class="notion-hash-link" href="#31bee56845a280b3ab45e25e98445f86" title="CPA（CLIProxyAPI）"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">CPA（CLIProxyAPI）</span></span></h3><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-31bee56845a280d387fef2abceae2a2d" data-id="31bee56845a280d387fef2abceae2a2d"><span><div id="31bee56845a280d387fef2abceae2a2d" class="notion-header-anchor"></div><a class="notion-hash-link" href="#31bee56845a280d387fef2abceae2a2d" title="项目地址"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">项目地址</span></span></h4><div class="notion-row"><a class="notion-bookmark notion-block-31bee56845a2809489ece717592a00d4" href="https://github.com/router-for-me/CLIProxyAPI" target="_blank" rel="noopener noreferrer"><div><div class="notion-bookmark-title">GitHub - router-for-me/CLIProxyAPI: Wrap Gemini CLI, Antigravity, ChatGPT Codex, Claude Code, Qwen Code, iFlow as an OpenAI/Gemini/Claude/Codex compatible API service, allowing you to enjoy the free Gemini 2.5 Pro, GPT 5, Claude, Qwen model through API</div><div class="notion-bookmark-description">Wrap Gemini CLI, Antigravity, ChatGPT Codex, Claude Code, Qwen Code, iFlow as an OpenAI/Gemini/Claude/Codex compatible API service, allowing you to enjoy the free Gemini 2.5 Pro, GPT 5, Claude, Qwe...</div><div class="notion-bookmark-link"><div class="notion-bookmark-link-icon"><img src="https://www.notion.so/image/https%3A%2F%2Fgithub.com%2Ffluidicon.png?table=block&amp;id=31bee568-45a2-8094-89ec-e717592a00d4&amp;t=31bee568-45a2-8094-89ec-e717592a00d4" alt="GitHub - router-for-me/CLIProxyAPI: Wrap Gemini CLI, Antigravity, ChatGPT Codex, Claude Code, Qwen Code, iFlow as an OpenAI/Gemini/Claude/Codex compatible API service, allowing you to enjoy the free Gemini 2.5 Pro, GPT 5, Claude, Qwen model through API" loading="lazy" decoding="async"/></div><div class="notion-bookmark-link-text">https://github.com/router-for-me/CLIProxyAPI</div></div></div><div class="notion-bookmark-image"><img style="object-fit:cover" src="https://www.notion.so/image/https%3A%2F%2Fopengraph.githubassets.com%2F32c0c7b6e691520aba762f2afbc5625f9ec632b4b8b549707cedd13170893fcc%2Frouter-for-me%2FCLIProxyAPI?table=block&amp;id=31bee568-45a2-8094-89ec-e717592a00d4&amp;t=31bee568-45a2-8094-89ec-e717592a00d4" alt="GitHub - router-for-me/CLIProxyAPI: Wrap Gemini CLI, Antigravity, ChatGPT Codex, Claude Code, Qwen Code, iFlow as an OpenAI/Gemini/Claude/Codex compatible API service, allowing you to enjoy the free Gemini 2.5 Pro, GPT 5, Claude, Qwen model through API" loading="lazy" decoding="async"/></div></a></div><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-31bee56845a2805d86dfd9667d08393b" data-id="31bee56845a2805d86dfd9667d08393b"><span><div id="31bee56845a2805d86dfd9667d08393b" class="notion-header-anchor"></div><a class="notion-hash-link" href="#31bee56845a2805d86dfd9667d08393b" title="只介绍windows下的使用（因为没有MAC）"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">只介绍windows下的使用（因为没有MAC）</span></span></h4><ol start="1" class="notion-list notion-list-numbered notion-block-31bee56845a280109241d00ce7880773" style="list-style-type:decimal"><li>点击<code class="notion-inline-code"><a class="notion-link" href="https://github.com/router-for-me/CLIProxyAPI/releases" target="_blank" rel="noopener noreferrer">releases</a></code>前往下载</li><ol class="notion-list notion-list-numbered notion-block-31bee56845a280109241d00ce7880773" style="list-style-type:lower-alpha"><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-31bee56845a280b5a9ecdd4bb0d0c432"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:100%"><img style="object-fit:cover" src="https://www.notion.so/image/attachment%3Ae9750a48-afa6-4f1c-b08d-4e90ac8704e4%3Aimage.png?table=block&amp;id=31bee568-45a2-80b5-a9ec-dd4bb0d0c432&amp;t=31bee568-45a2-80b5-a9ec-dd4bb0d0c432" alt="notion image" loading="lazy" decoding="async"/></div></figure></ol></ol><ol start="2" class="notion-list notion-list-numbered notion-block-31bee56845a2805ab493f948d7db79af" style="list-style-type:decimal"><li>下载后对文件进行解压，复制<code class="notion-inline-code">config.example.yaml</code> 将新文件的文件名修改成<code class="notion-inline-code">config.yaml</code> 编辑文件中的<code class="notion-inline-code">secret-key</code> （后面登录会用到）</li></ol><ol start="3" class="notion-list notion-list-numbered notion-block-31bee56845a28002ba5aeac950d44cb2" style="list-style-type:decimal"><li>双击<code class="notion-inline-code">cli-proxy-api.exe</code> 即可运行</li></ol><ol start="4" class="notion-list notion-list-numbered notion-block-31bee56845a280f39b7fd98c76466d8d" style="list-style-type:decimal"><li>运行成功后浏览器打开<code class="notion-inline-code">http://localhost:8317/management.html</code> 输入当时设置的<code class="notion-inline-code">secret-key</code> 就会进入到管理界面了。下面只介绍Codex的配置</li></ol><ol start="5" class="notion-list notion-list-numbered notion-block-31bee56845a2801fac69e2b5ef67cd21" style="list-style-type:decimal"><li>如果你有Codex的认证文件 那你可以点击认证文件菜单然后点击上传文件把所有的文件进行上传后你会得到下图</li><ol class="notion-list notion-list-numbered notion-block-31bee56845a2801fac69e2b5ef67cd21" style="list-style-type:lower-alpha"><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-31bee56845a280628e91f8a40eb8fd59"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:100%"><img style="object-fit:cover" src="https://www.notion.so/image/attachment%3Ac7778e49-f80f-417c-81c9-4f30bb848f04%3Aimage.png?table=block&amp;id=31bee568-45a2-8062-8e91-f8a40eb8fd59&amp;t=31bee568-45a2-8062-8e91-f8a40eb8fd59" alt="notion image" loading="lazy" decoding="async"/></div></figure></ol></ol><ol start="6" class="notion-list notion-list-numbered notion-block-334ee56845a280fbb0dff76376814f09" style="list-style-type:decimal"><li>配置<code class="notion-inline-code">AI</code>提供商（这里以中转站为例）添加<code class="notion-inline-code">Codex API</code>配置 <code class="notion-inline-code"><b>Base URL</b></code><b>需要跟上</b><span class="notion-red"><code class="notion-inline-code"><b>/v1</b></code></span></li></ol><ol start="7" class="notion-list notion-list-numbered notion-block-31bee56845a280088226f885c157e030" style="list-style-type:decimal"><li>然后点击配置面板菜单找到<code class="notion-inline-code"><b>API</b></code><b> 密钥列表点击添加</b><code class="notion-inline-code"><b>API</b></code><b>密钥，</b>保留好密钥后面调用的时候会用到</li></ol><ol start="8" class="notion-list notion-list-numbered notion-block-31bee56845a28081bb6ffa2b35050fe2" style="list-style-type:decimal"><li>如果你是本地启动的魔法不是全局也就是TUN模式的话需要对<code class="notion-inline-code">代理进行配置</code>，使用Socket还是http模式都可以 具体自己尝试</li></ol><div class="notion-text notion-red notion-block-31bee56845a28037aa35dab42fe99a03"><b><a class="notion-link" href="https://help.router-for.me/cn/" target="_blank" rel="noopener noreferrer">官方参考文档</a></b></div><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-31bee56845a28080a272e3527b49b6cc" data-id="31bee56845a28080a272e3527b49b6cc"><span><div id="31bee56845a28080a272e3527b49b6cc" class="notion-header-anchor"></div><a class="notion-hash-link" href="#31bee56845a28080a272e3527b49b6cc" title="CC-Switch"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">CC-Switch</span></span></h3><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-31bee56845a280b68bf5e6f0f87381e6" data-id="31bee56845a280b68bf5e6f0f87381e6"><span><div id="31bee56845a280b68bf5e6f0f87381e6" class="notion-header-anchor"></div><a class="notion-hash-link" href="#31bee56845a280b68bf5e6f0f87381e6" title="项目地址"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">项目地址</span></span></h4><div class="notion-row"><a class="notion-bookmark notion-block-31bee56845a2803b9195e5c0761c5945" href="https://github.com/farion1231/cc-switch" target="_blank" rel="noopener noreferrer"><div><div class="notion-bookmark-title">GitHub - farion1231/cc-switch: A cross-platform desktop All-in-One assistant tool for Claude Code, Codex, OpenCode, openclaw &amp; Gemini CLI.</div><div class="notion-bookmark-description">A cross-platform desktop All-in-One assistant tool for Claude Code, Codex, OpenCode, openclaw &amp; Gemini CLI. - farion1231/cc-switch</div><div class="notion-bookmark-link"><div class="notion-bookmark-link-icon"><img src="https://www.notion.so/image/https%3A%2F%2Fgithub.com%2Ffluidicon.png?table=block&amp;id=31bee568-45a2-803b-9195-e5c0761c5945&amp;t=31bee568-45a2-803b-9195-e5c0761c5945" alt="GitHub - farion1231/cc-switch: A cross-platform desktop All-in-One assistant tool for Claude Code, Codex, OpenCode, openclaw &amp; Gemini CLI." loading="lazy" decoding="async"/></div><div class="notion-bookmark-link-text">https://github.com/farion1231/cc-switch</div></div></div><div class="notion-bookmark-image"><img style="object-fit:cover" src="https://www.notion.so/image/https%3A%2F%2Fopengraph.githubassets.com%2F95175828c0a5815e8446926c9924882ddb693da9f709f069b8981d251b87033a%2Ffarion1231%2Fcc-switch?table=block&amp;id=31bee568-45a2-803b-9195-e5c0761c5945&amp;t=31bee568-45a2-803b-9195-e5c0761c5945" alt="GitHub - farion1231/cc-switch: A cross-platform desktop All-in-One assistant tool for Claude Code, Codex, OpenCode, openclaw &amp; Gemini CLI." loading="lazy" decoding="async"/></div></a></div><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-31bee56845a28023ba4bd9ed3d3c3057" data-id="31bee56845a28023ba4bd9ed3d3c3057"><span><div id="31bee56845a28023ba4bd9ed3d3c3057" class="notion-header-anchor"></div><a class="notion-hash-link" href="#31bee56845a28023ba4bd9ed3d3c3057" title="同样只介绍windows下的使用（因为没有MAC）"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">同样只介绍windows下的使用（因为没有MAC）</span></span></h4><ol start="1" class="notion-list notion-list-numbered notion-block-31bee56845a2800588b6ccec086fe6f2" style="list-style-type:decimal"><li>点击<code class="notion-inline-code"><a class="notion-link" href="https://github.com/farion1231/cc-switch/releases" target="_blank" rel="noopener noreferrer">releases</a></code>前往下载（两个都可以 <code class="notion-inline-code">Portable</code>是便携版 无需安装）</li><ol class="notion-list notion-list-numbered notion-block-31bee56845a2800588b6ccec086fe6f2" style="list-style-type:lower-alpha"><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-31bee56845a28040a3b7de011ee20892"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:100%"><img style="object-fit:cover" src="https://www.notion.so/image/attachment%3A4228eff0-efe5-422e-bad5-fdf7ac270922%3Aimage.png?table=block&amp;id=31bee568-45a2-8040-a3b7-de011ee20892&amp;t=31bee568-45a2-8040-a3b7-de011ee20892" alt="notion image" loading="lazy" decoding="async"/></div></figure></ol></ol><ol start="2" class="notion-list notion-list-numbered notion-block-31bee56845a280bf992fc739f5777391" style="list-style-type:decimal"><li>下载解压完以后直接双击运行<code class="notion-inline-code">.exe</code>文件即可</li></ol><ol start="3" class="notion-list notion-list-numbered notion-block-31bee56845a280b89c46c69b68bcc181" style="list-style-type:decimal"><li>下面介绍Codex的配置</li><ol class="notion-list notion-list-numbered notion-block-31bee56845a280b89c46c69b68bcc181" style="list-style-type:lower-alpha"><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-31bee56845a28033b499ea5c0ff4b607"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:100%"><img style="object-fit:cover" src="https://www.notion.so/image/attachment%3A9a9abe6b-9727-4440-9913-02ddcc6b6f6e%3Aimage.png?table=block&amp;id=31bee568-45a2-8033-b499-ea5c0ff4b607&amp;t=31bee568-45a2-8033-b499-ea5c0ff4b607" alt="notion image" loading="lazy" decoding="async"/></div></figure></ol></ol><ol start="4" class="notion-list notion-list-numbered notion-block-31bee56845a2801d9dd1d24f9b0b07eb" style="list-style-type:decimal"><li>配置<code class="notion-inline-code">Claude</code>的时候请求地址后面无需跟<code class="notion-inline-code">v1</code></li></ol><ol start="5" class="notion-list notion-list-numbered notion-block-31bee56845a2808cbfe7ddb6174443dd" style="list-style-type:decimal"><li>配置完成后如果你的VsCode安装了<code class="notion-inline-code">Codex</code>和<code class="notion-inline-code">Claude Code</code>插件的话 重启编辑器就可以开始爽用了</li></ol><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-31bee56845a2804eb832f64cc31b17d4" data-id="31bee56845a2804eb832f64cc31b17d4"><span><div id="31bee56845a2804eb832f64cc31b17d4" class="notion-header-anchor"></div><a class="notion-hash-link" href="#31bee56845a2804eb832f64cc31b17d4" title="CPA-clean"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">CPA-clean</span></span></h3><div class="notion-text notion-block-31bee56845a2802b985ac285cfe4b203">清理CPA中过期或者无法使用的账号 可以自行网上搜索</div></main></div>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Git操作汇总]]></title>
            <link>https://blog.lmyself.top/article/gitbash</link>
            <guid>https://blog.lmyself.top/article/gitbash</guid>
            <pubDate>Wed, 11 Sep 2024 00:00:00 GMT</pubDate>
            <description><![CDATA[Git操作汇总]]></description>
            <content:encoded><![CDATA[<div id="notion-article" class="mx-auto overflow-hidden "><main class="notion light-mode notion-page notion-block-cc358a2e94df40548887947cb7055627"><div class="notion-viewport"></div><div class="notion-collection-page-properties"></div><blockquote class="notion-quote notion-block-2aaee56845a280ce89a8f96412a929df"><div>默认情况下，Git 会尝试缓存你的凭据（用户名和密码），但你可以通过以下方式禁用这个功能</div></blockquote><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-2aaee56845a280aeb3f9db1734517671" data-id="2aaee56845a280aeb3f9db1734517671"><span><div id="2aaee56845a280aeb3f9db1734517671" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2aaee56845a280aeb3f9db1734517671" title="全局禁用"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">全局禁用</span></span></h3><blockquote class="notion-quote notion-block-3fe309cd59e344c89d3bc0fc16f2cef5"><div>公开仓库有时候可能<code class="notion-inline-code">push</code>了隐私内容 删除之前的<code class="notion-inline-code">commit</code>记录</div></blockquote><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-5928db0a72494f938a87173f86e30b5e" data-id="5928db0a72494f938a87173f86e30b5e"><span><div id="5928db0a72494f938a87173f86e30b5e" class="notion-header-anchor"></div><a class="notion-hash-link" href="#5928db0a72494f938a87173f86e30b5e" title="删除前一条或者指定的提交记录"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">删除前一条或者指定的提交记录</span></span></h3><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-cab1fd72cf96430ca1473a8fc7bc4b2f" data-id="cab1fd72cf96430ca1473a8fc7bc4b2f"><span><div id="cab1fd72cf96430ca1473a8fc7bc4b2f" class="notion-header-anchor"></div><a class="notion-hash-link" href="#cab1fd72cf96430ca1473a8fc7bc4b2f" title="删除所有提交记录"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">删除所有提交记录</span></span></h3><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-fae6e483be344e12ba5456450de6eb46" data-id="fae6e483be344e12ba5456450de6eb46"><span><div id="fae6e483be344e12ba5456450de6eb46" class="notion-header-anchor"></div><a class="notion-hash-link" href="#fae6e483be344e12ba5456450de6eb46" title="强制覆盖本地代码（与Git远程仓库保持一致）"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">强制覆盖本地代码（与Git远程仓库保持一致）</span></span></h3><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-122ee56845a280c9920ed59023cef2ba" data-id="122ee56845a280c9920ed59023cef2ba"><span><div id="122ee56845a280c9920ed59023cef2ba" class="notion-header-anchor"></div><a class="notion-hash-link" href="#122ee56845a280c9920ed59023cef2ba" title="github只fork了master分支 想同步仓库源的所有分支"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">github只fork了master分支 想同步仓库源的所有分支</span></span></h3><ol start="1" class="notion-list notion-list-numbered notion-block-122ee56845a280889e54fc9fe000f5b2" style="list-style-type:decimal"><li><b>从 upstream 拉取所有分支：</b></li><ol class="notion-list notion-list-numbered notion-block-122ee56845a280889e54fc9fe000f5b2" style="list-style-type:lower-alpha"></ol></ol><ol start="2" class="notion-list notion-list-numbered notion-block-122ee56845a28033a162fbd3c174b6d9" style="list-style-type:decimal"><li><b>查看所有分支：</b></li><ol class="notion-list notion-list-numbered notion-block-122ee56845a28033a162fbd3c174b6d9" style="list-style-type:lower-alpha"><div class="notion-text notion-block-122ee56845a280f3a407ddbf1cc452fd">你会看到类似：</div></ol></ol><ol start="3" class="notion-list notion-list-numbered notion-block-122ee56845a28069920bcd41b71bc8c9" style="list-style-type:decimal"><li><b>创建并切换到某个分支（例如 </b><code class="notion-inline-code"><b>branch1</b></code><b>）：</b>
如果你想同步 <code class="notion-inline-code">branch1</code>：</li><ol class="notion-list notion-list-numbered notion-block-122ee56845a28069920bcd41b71bc8c9" style="list-style-type:lower-alpha"></ol></ol><ol start="4" class="notion-list notion-list-numbered notion-block-122ee56845a28001b7dfdd47bf682fee" style="list-style-type:decimal"><li><b>将新分支推送到你的 Fork 仓库：</b></li><ol class="notion-list notion-list-numbered notion-block-122ee56845a28001b7dfdd47bf682fee" style="list-style-type:lower-alpha"></ol></ol><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-122ee56845a280b6b330da767a06d93d" data-id="122ee56845a280b6b330da767a06d93d"><span><div id="122ee56845a280b6b330da767a06d93d" class="notion-header-anchor"></div><a class="notion-hash-link" href="#122ee56845a280b6b330da767a06d93d" title="git同步上游分支"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">git同步上游分支</span></span></h3><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-167ee56845a28055ab31c60ae13db61c" data-id="167ee56845a28055ab31c60ae13db61c"><span><div id="167ee56845a28055ab31c60ae13db61c" class="notion-header-anchor"></div><a class="notion-hash-link" href="#167ee56845a28055ab31c60ae13db61c" title="git推送当前代码到新分支"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">git推送当前代码到新分支</span></span></h3></main></div>]]></content:encoded>
        </item>
    </channel>
</rss>