<?xml version="1.0" encoding="UTF-8"?><feed xmlns="http://www.w3.org/2005/Atom">
  <title>wilsons 的博客</title>
  <id>https://pipe.b3log.org/blogs/wilsons</id>
  <updated></updated>
  <subtitle>记录精彩的程序人生</subtitle>
  <link href="https://pipe.b3log.org/blogs/wilsons"></link>
  <entry>
    <title>HTML代码块和数据库联动</title>
    <updated>2025-05-29T16:29:39+08:00</updated>
    <id>tag:pipe.b3log.org,2025-05-29:/blogs/wilsons/思源/HTML代码块和数据库联动</id>
    <link href="https://pipe.b3log.org/blogs/wilsons/思源/HTML代码块和数据库联动" rel="alternate"></link>
    <summary type="html">seehttps://ld246.com/article/1748432027805&amp;lt;div&amp;gt;&amp;lt;style&amp;gt;/*根容器*/.container{display:flex;justify-content:space-between;margin:20px;max-width:830px;}/*卡片样式*/.card{width:200px;height:200px;border-radius:10px</summary>
    <author>
      <name>wilsons</name>
    </author>
  </entry>
  <entry>
    <title>工具即工具，不神化也不贬低 —— 一个使用者的理性思考</title>
    <updated>2025-05-20T19:29:30+08:00</updated>
    <id>tag:pipe.b3log.org,2025-05-20:/blogs/wilsons/思源/链滴社区/工具即工具，不神化也不贬低 —— 一个使用者的理性思考</id>
    <link href="https://pipe.b3log.org/blogs/wilsons/思源/链滴社区/工具即工具，不神化也不贬低 —— 一个使用者的理性思考" rel="alternate"></link>
    <summary type="html">最近看到一则关于工具体验的讨论，虽然不完全与原帖相关，但我想借这个机会，谈谈我对工具的一些看法和使用哲学。一、工具就是工具，关键在于人我一直认为：工具本身就是中立的，它就在那里，不增不减。你觉得一个工具“顺手”或“难用”，其实更多取决于你自己是否熟悉、是否懂得如何使用它。正如同样是 DeepSeek，有人觉得它惊艳，有人却觉得不过如此。原因不在工具，而在使用者。以 DeepSeek 为例，在它出现之前，我</summary>
    <author>
      <name>wilsons</name>
    </author>
  </entry>
  <entry>
    <title>如何将外部 CSS 样式应用到 Shadow DOM 元素内部</title>
    <updated>2025-05-20T16:16:18+08:00</updated>
    <id>tag:pipe.b3log.org,2025-05-20:/blogs/wilsons/技术文章/css/如何将外部 CSS 样式应用到 Shadow DOM 元素内部</id>
    <link href="https://pipe.b3log.org/blogs/wilsons/技术文章/css/如何将外部 CSS 样式应用到 Shadow DOM 元素内部" rel="alternate"></link>
    <summary type="html">外部的 CSS 不能直接应用到 ShadowDOM 内部的元素。ShadowDOM 是 WebComponents 技术的一部分，它的设计目的之一就是提供样式封装（styleencapsulation），这意味着：外部页面的 CSS 不会影响 ShadowDOM 内部的样式。ShadowDOM 内部定义的样式不会“泄露”到外部页面中。示例说明假设你有一个自定义元素 &amp;lt;my-element&amp;gt;​，它内部有 ShadowDOM：&amp;lt;m</summary>
    <author>
      <name>wilsons</name>
    </author>
  </entry>
  <entry>
    <title>实时获取光标位置优化思路</title>
    <updated>2025-05-19T23:42:48+08:00</updated>
    <id>tag:pipe.b3log.org,2025-05-19:/blogs/wilsons/思源/实时获取光标位置优化思路</id>
    <link href="https://pipe.b3log.org/blogs/wilsons/思源/实时获取光标位置优化思路" rel="alternate"></link>
    <summary type="html">真正能在滚动时拿到光标“位置更新”同时又最轻量的做法，其实是不每次都去测 Selection→getClientRects()或插入 marker，而是直接把上一次的坐标做“增量”调整。核心思路：基于滚动偏移的增量更新缓存上一次的绝对坐标 letlastPos={x:/*上次 computedx*/,y:/*上次 computedy*/};letlastScroll=newMap();//key:scroll</summary>
    <author>
      <name>wilsons</name>
    </author>
  </entry>
  <entry>
    <title>实时获取光标位置</title>
    <updated>2025-05-19T20:53:29+08:00</updated>
    <id>tag:pipe.b3log.org,2025-05-19:/blogs/wilsons/思源/插件开发/实时获取光标位置</id>
    <link href="https://pipe.b3log.org/blogs/wilsons/思源/插件开发/实时获取光标位置" rel="alternate"></link>
    <summary type="html">//创建全局唯一 markerconstglobalMarker=(()=&amp;gt;{constmarker=document.createElement(&#39;span&#39;);marker.textContent=&#39;\u200b&#39;;marker.style.cssText=&#39;position:absolute;visibility:hidden;pointer-events:none;&#39;;returnmarker</summary>
    <author>
      <name>wilsons</name>
    </author>
  </entry>
  <entry>
    <title>css实现光标闪烁效果</title>
    <updated>2025-05-14T21:28:17+08:00</updated>
    <id>tag:pipe.b3log.org,2025-05-14:/blogs/wilsons/技术文章/css/css实现光标闪烁效果</id>
    <link href="https://pipe.b3log.org/blogs/wilsons/技术文章/css/css实现光标闪烁效果" rel="alternate"></link>
    <summary type="html">要实现无过渡的硬切换闪烁效果，需要使用 steps()​时间函数。代码如下：#custom-cursor{animation:ablink1ssteps(1)infinite;/*关键修改在这里*/}@keyframesablink{0%{opacity:1;}50%{opacity:0;}/*添加中间关键帧*/100%{opacity:1;}}原理说明：​steps(1)​表示把动画分成 1 个跳跃步骤</summary>
    <author>
      <name>wilsons</name>
    </author>
  </entry>
  <entry>
    <title>全屏菜单（Esc退出全屏）</title>
    <updated>2025-05-13T09:34:42+08:00</updated>
    <id>tag:pipe.b3log.org,2025-05-13:/blogs/wilsons/思源/代码片段/全屏菜单（Esc退出全屏）</id>
    <link href="https://pipe.b3log.org/blogs/wilsons/思源/代码片段/全屏菜单（Esc退出全屏）" rel="alternate"></link>
    <summary type="html">seehttps://ld246.com/article/1746079460404//全屏菜单（Esc 退出全屏）//seehttps://ld246.com/article/1746079460404(()=&amp;gt;{//判断是否全屏状态 if(localStorage.getItem(&#39;isFullscreen&#39;)===&#39;true&#39;){constcomfirmHtml=`&amp;lt;divdata-key=&#34;di</summary>
    <author>
      <name>wilsons</name>
    </author>
  </entry>
  <entry>
    <title>添加文档或块到指定数据库（支持绑定块和不绑定块）</title>
    <updated>2025-05-13T09:34:17+08:00</updated>
    <id>tag:pipe.b3log.org,2025-05-13:/blogs/wilsons/思源/代码片段/添加文档或块到指定数据库（支持绑定块和不绑定块）</id>
    <link href="https://pipe.b3log.org/blogs/wilsons/思源/代码片段/添加文档或块到指定数据库（支持绑定块和不绑定块）" rel="alternate"></link>
    <summary type="html">seehttps://ld246.com/article/1746153210116//添加块到指定数据库（支持绑定块和不绑定块，支持文档块和普通块）//seehttps://ld246.com/article/1746153210116//注意：只能在块菜单中操作（你的右键可能不是块菜单）//version0.0.3//0.0.2（已废弃）//0.0.3 修改参数配置方式(()=&amp;gt;{//块菜单配置 c</summary>
    <author>
      <name>wilsons</name>
    </author>
  </entry>
  <entry>
    <title>js代码片段自动更新协议1.0</title>
    <updated>2025-05-13T09:34:07+08:00</updated>
    <id>tag:pipe.b3log.org,2025-05-13:/blogs/wilsons/思源/代码片段/js代码片段自动更新协议1.0</id>
    <link href="https://pipe.b3log.org/blogs/wilsons/思源/代码片段/js代码片段自动更新协议1.0" rel="alternate"></link>
    <summary type="html">鉴于代码片段无法检查更新，写了个自动检查更新的代码片段。只要用户安装了该代码片段，且开发者代码片段中遵循以下协议即可。协议内容要让你的代码片段能自动检查更新，需遵循以下协议：代码片段的注释中必须有 name，version，updateUrl 三个标记比如//name 代码名称//version 版本号//updateUrl 更新地址//updateDesc 更新描述或/***name 代码名称*version 版</summary>
    <author>
      <name>wilsons</name>
    </author>
  </entry>
  <entry>
    <title>创建文档时根据模板自动创建的插件</title>
    <updated>2025-05-13T09:33:04+08:00</updated>
    <id>tag:pipe.b3log.org,2025-05-13:/blogs/wilsons/思源/创建文档时根据模板自动创建的插件</id>
    <link href="https://pipe.b3log.org/blogs/wilsons/思源/创建文档时根据模板自动创建的插件" rel="alternate"></link>
    <summary type="html">https://ld246.com/article/1746898886972‍</summary>
    <author>
      <name>wilsons</name>
    </author>
  </entry>
  <entry>
    <title>不用插件：绑定思源事件总线（eventBus）</title>
    <updated>2025-05-13T09:32:53+08:00</updated>
    <id>tag:pipe.b3log.org,2025-05-13:/blogs/wilsons/思源/插件开发/不用插件：绑定思源事件总线（eventBus）</id>
    <link href="https://pipe.b3log.org/blogs/wilsons/思源/插件开发/不用插件：绑定思源事件总线（eventBus）" rel="alternate"></link>
    <summary type="html">简洁版（不推荐，有风险）优点：代码简洁。缺点：要求用户至少安装一个插件。⚠️ 风险警告：当用户关闭第一个插件时，之前的绑定会失效。functioneventBusOn(eventName,callback){constplugin=window.siyuan.ws.app.plugins[0];if(!plugin){console.log(&#39;绑定事件&#39;+eventName+&#39;失败，请至少安装一个插件</summary>
    <author>
      <name>wilsons</name>
    </author>
  </entry>
  <entry>
    <title>css抽屉式显示隐藏效果</title>
    <updated>2025-05-12T16:57:27+08:00</updated>
    <id>tag:pipe.b3log.org,2025-05-12:/blogs/wilsons/技术文章/css/css抽屉式显示隐藏效果</id>
    <link href="https://pipe.b3log.org/blogs/wilsons/技术文章/css/css抽屉式显示隐藏效果" rel="alternate"></link>
    <summary type="html">参考思源移动端主菜单效果 element.style{transform:translateX(0px);}#menu{z-index:7;transform:translateX(100vw);top:0;}</summary>
    <author>
      <name>wilsons</name>
    </author>
  </entry>
  <entry>
    <title>可通过 URL 关键词搜索的 ai</title>
    <updated>2025-05-12T03:16:22+08:00</updated>
    <id>tag:pipe.b3log.org,2025-05-12:/blogs/wilsons/articles/2025/05/12/1747019783657</id>
    <link href="https://pipe.b3log.org/blogs/wilsons/articles/2025/05/12/1747019783657" rel="alternate"></link>
    <summary type="html">百度 deepseekhttps://chat.baidu.com/search?word=%s%ChatGPT(#AI#)|https://chatgpt.com/?q=%s% 文心一言(#AI#)|https://yiyan.baidu.com/?q=%s%Kimi(#AI#)|https://kimi.moonshot.cn/_prefill_chat?send_immediately=true&amp;</summary>
    <author>
      <name>wilsons</name>
    </author>
  </entry>
  <entry>
    <title>读取关联数据表的数据并汇总</title>
    <updated>2025-05-12T02:10:45+08:00</updated>
    <id>tag:pipe.b3log.org,2025-05-12:/blogs/wilsons/思源/读取关联数据表的数据并汇总</id>
    <link href="https://pipe.b3log.org/blogs/wilsons/思源/读取关联数据表的数据并汇总" rel="alternate"></link>
    <summary type="html">seehttps://ld246.com/article/1746316072165 需求：有两个数据表，A 为任务表，B 为工时记录表，A 中有一列为任务名称，B 关联 A 的任务名称。一个任务可能需要多次工作完成，每次工作都会在 B 中记录一次使用的工时。A 的任务表中有一列为总共花费的工时，会读取 B 中所有任务名相同的行，并将每行的工时汇总，写到 A 对应的总共花费的工时中。请问这样的模板列该怎么实现呢？我不知道如何从</summary>
    <author>
      <name>wilsons</name>
    </author>
  </entry>
  <entry>
    <title>文档整体往左缩进</title>
    <updated>2025-05-12T02:10:36+08:00</updated>
    <id>tag:pipe.b3log.org,2025-05-12:/blogs/wilsons/思源/插件开发/文档整体往左缩进</id>
    <link href="https://pipe.b3log.org/blogs/wilsons/思源/插件开发/文档整体往左缩进" rel="alternate"></link>
    <summary type="html">/*通过给 ul 背景色添加固定宽度实现*//*背景线适配需配合下面的 js 代码实现*//*https://ld246.com/article/1724305128590#%E5%B7%A6%E4%BE%A7%E6%96%87%E6%A1%A3%E6%A0%91%E6%98%BE%E7%A4%BA%E5%B1%82%E7%BA%A7%E5%85%B3%E7%B3%BB%E8%83%8C%E6%99%AF%</summary>
    <author>
      <name>wilsons</name>
    </author>
  </entry>
  <entry>
    <title>通过数据库块ID获取数据库ID</title>
    <updated>2025-05-12T02:09:00+08:00</updated>
    <id>tag:pipe.b3log.org,2025-05-12:/blogs/wilsons/思源/插件开发/通过数据库块ID获取数据库ID</id>
    <link href="https://pipe.b3log.org/blogs/wilsons/思源/插件开发/通过数据库块ID获取数据库ID" rel="alternate"></link>
    <summary type="html">方法一、通过数据库里的 html 代码获取//通过块 id 获取数据库 idasyncfunctiongetAvIdByAvBlockId(blockId){constav=awaitgetAvBySql(`SELECT*FROMblockswheretype=&#39;av&#39;andid=&#39;${blockId}&#39;`);if(av.length===0)returnerror(&#34;未找到数据库文档块，请检查数据库文档块 i</summary>
    <author>
      <name>wilsons</name>
    </author>
  </entry>
  <entry>
    <title>代码片段自动更新checkNewVersion</title>
    <updated>2025-05-12T02:08:36+08:00</updated>
    <id>tag:pipe.b3log.org,2025-05-12:/blogs/wilsons/思源/代码片段/代码片段自动更新checkNewVersion</id>
    <link href="https://pipe.b3log.org/blogs/wilsons/思源/代码片段/代码片段自动更新checkNewVersion" rel="alternate"></link>
    <summary type="html">鉴于代码片段无法检查更新，写了个自动更新的函数，只要在代码加载时调用 checkNewVersion();​即可。格式内容使用这个函数需遵循以下格式即可。代码片段的注释中必须有 name，version，updateUrl 三个标记比如//name 代码名称//version 版本号//updateUrl 更新地址//updateDesc 更新描述或/***name 代码名称*version 版本号*updateUr</summary>
    <author>
      <name>wilsons</name>
    </author>
  </entry>
  <entry>
    <title>如何通过使用CSS或JavaScript的xlink:href属性选择元素？</title>
    <updated>2025-05-11T22:34:36+08:00</updated>
    <id>tag:pipe.b3log.org,2025-05-11:/blogs/wilsons/技术文章/css/如何通过使用CSS或JavaScript的xlink:href属性选择元素？</id>
    <link href="https://pipe.b3log.org/blogs/wilsons/技术文章/css/如何通过使用CSS或JavaScript的xlink:href属性选择元素？" rel="alternate"></link>
    <summary type="html">*如何通过使用 CSS 的 xlink:href 属性选择 XML 元素？-腾讯云开发者社区-腾讯云*[https://cloud.tencent.com/developer/ask/sof/110624837](https://cloud.tencent.com/developer/ask/sof/110624837)*有人知道如何使用 xlink:href 属性选择 XML 元素吗？有关使用情况，请参见，但是它并不</summary>
    <author>
      <name>wilsons</name>
    </author>
  </entry>
  <entry>
    <title>元素使用 align-items center 和 overflow auto 之后，部分内容显示不全</title>
    <updated>2025-05-11T21:19:28+08:00</updated>
    <id>tag:pipe.b3log.org,2025-05-11:/blogs/wilsons/articles/2025/05/12/1746998369263</id>
    <link href="https://pipe.b3log.org/blogs/wilsons/articles/2025/05/12/1746998369263" rel="alternate"></link>
    <summary type="html">*元素使用 align-itemscenter 和 overflowauto 之后，部分内容显示不全_align-items:center;-CSDN 博客*[https://blog.csdn.net/weixin_42335036/article/details/125515255](https://blog.csdn.net/weixin_42335036/article/details/1255152</summary>
    <author>
      <name>wilsons</name>
    </author>
  </entry>
  <entry>
    <title>css居中居左居右</title>
    <updated>2025-05-11T21:19:19+08:00</updated>
    <id>tag:pipe.b3log.org,2025-05-11:/blogs/wilsons/技术文章/css/css居中居左居右</id>
    <link href="https://pipe.b3log.org/blogs/wilsons/技术文章/css/css居中居左居右" rel="alternate"></link>
    <summary type="html">在 CSS 中，margin:0auto;​是通过设置左右外边距为 auto​来实现块级元素的水平居中。如果你需要实现居左或居右的效果，可以通过以下方式实现：1.居左默认情况下，块级元素（如 div​）会自动靠左对齐。如果需要显式设置，可以使用以下方法：方法 1：直接设置 margin-left​为 0​div{margin-left:0;/*左边距为 0*/}方法 2：使用 float​（浮动）div{float:l</summary>
    <author>
      <name>wilsons</name>
    </author>
  </entry>
</feed>