<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:media="http://search.yahoo.com/mrss/" version="2.0"><channel><title>作者：Yzzzed - Yzzzed's Blog</title><link>https://www.hyzed.cn/authors/yzzzed</link><atom:link href="https://www.hyzed.cn/authors/yzzzed/feed/authors/yzzzed.xml" rel="self" type="application/rss+xml"/><description>A new frontend developer.</description><generator>Halo v2.20.17</generator><language>zh-cn</language><image><url>https://image.hyzed.cn/blog/14633f6fd789803fdf2b218ba1abc0d1.jpg</url><title>作者：Yzzzed - Yzzzed's Blog</title><link>https://www.hyzed.cn/authors/yzzzed</link></image><lastBuildDate>Sat, 5 Dec 2026 10:05:43 GMT</lastBuildDate><item><title><![CDATA[🍌Banana Fantasy: nano banana试玩站更新🧐]]></title><link>https://www.hyzed.cn/archives/banana-fantasy-update</link><description><![CDATA[<img src="https://www.hyzed.cn/plugins/feed/assets/telemetry.gif?title=%F0%9F%8D%8CBanana%20Fantasy%3A%20nano%20banana%E8%AF%95%E7%8E%A9%E7%AB%99%E6%9B%B4%E6%96%B0%F0%9F%A7%90&amp;url=/archives/banana-fantasy-update" width="1" height="1" alt="" style="opacity:0;">使用v0生成了更好看的UI。 预设提示词也增加了一些～ 增加了多图模式，最多支持上传5张图。 多图合成也有不少预设，有更好玩的预设欢迎分享🤩 网站：]]></description><guid isPermaLink="false">/archives/banana-fantasy-update</guid><dc:creator>Yzzzed</dc:creator><pubDate>Mon, 22 Sep 2025 03:51:54 GMT</pubDate></item><item><title><![CDATA[React Native实现模仿web端通过id获取input DOM]]></title><link>https://www.hyzed.cn/archives/a64c7654-f87a-4228-a9c6-21a37a26a899</link><description><![CDATA[<img src="https://www.hyzed.cn/plugins/feed/assets/telemetry.gif?title=React%20Native%E5%AE%9E%E7%8E%B0%E6%A8%A1%E4%BB%BFweb%E7%AB%AF%E9%80%9A%E8%BF%87id%E8%8E%B7%E5%8F%96input%20DOM&amp;url=/archives/a64c7654-f87a-4228-a9c6-21a37a26a899" width="1" height="1" alt="" style="opacity:0;">你所描述的是React Native环境中管理焦点（focus）问题的一个解决方案。在React Native中，由于没有像Web中的DOM API那样的直接方式来获取和操作DOM元素，因此需要采取一些不同的策略来实现这样的需求。在你的实现中，使用了React的上下文（Context）和引用（Refs）来模拟类似的功能。这是一个很好的解决方案，因为它允许你在组件树中的任何位置管理焦点，同时还能处理嵌套组件中的焦点问题。以下是关于你的解决方案的一些简要解释： 1. **InputRefsContext**: 创建了一个上下文来存储所有注册的输入元素的引用。这使得你可以在任何子组件中访问这个上下文并获取或设置焦点。 2. **CIdInput组件**: 这个组件使用`forwardRef`来接受一个引用，并在内部将其与ID一起注册到上下文中。此外，它还提供了`focus`方法，可以在外部被调用以设置焦点。 3. **InputRefsContextProvider**: 这是一个组件，它提供了一个上下文提供者（Provider），在其中可以注册新的输入元素并聚焦特定的输入元素。通过使用React的`useRef`和`useMemoizedFn` hooks，可以存储和调用相关的函数来管理焦点。 4. **DeepNestedInputs和ParentComponent**: 在这两个组件中，使用了`CIdInput`组件并使用了按钮来触发焦点的设置。通过按钮的`onPress`事件，可以调用通过上下文提供的`focusInput`函数来设置焦点。 这种方法适用于React Native环境，因为它充分利用了React的特性，如上下文和引用，而没有依赖于Web特有的DOM API。通过这种方式，你可以有效地管理跨多层嵌套的组件的焦点问题。]]></description><guid isPermaLink="false">/archives/a64c7654-f87a-4228-a9c6-21a37a26a899</guid><dc:creator>Yzzzed</dc:creator><pubDate>Thu, 26 Sep 2024 09:09:16 GMT</pubDate></item><item><title><![CDATA[vite项目初始化实践]]></title><link>https://www.hyzed.cn/archives/vite-xiang-mu-chu-shi-hua-shi-jian</link><description><![CDATA[<img src="https://www.hyzed.cn/plugins/feed/assets/telemetry.gif?title=vite%E9%A1%B9%E7%9B%AE%E5%88%9D%E5%A7%8B%E5%8C%96%E5%AE%9E%E8%B7%B5&amp;url=/archives/vite-xiang-mu-chu-shi-hua-shi-jian" width="1" height="1" alt="" style="opacity:0;">vite项目初始化 使用官方vite模板初始化 pnpm create vite my-app --template react-swc-ts 配置.vscode { "prettier.enable": false, "editor.formatOnSave": false, "ed]]></description><guid isPermaLink="false">/archives/vite-xiang-mu-chu-shi-hua-shi-jian</guid><dc:creator>Yzzzed</dc:creator><pubDate>Tue, 12 Dec 2023 08:27:39 GMT</pubDate></item><item><title><![CDATA[Antd-FormList嵌套Table实践]]></title><link>https://www.hyzed.cn/archives/antd-formlist%E5%B5%8C%E5%A5%97table%E5%AE%9E%E8%B7%B5md</link><description><![CDATA[<img src="https://www.hyzed.cn/plugins/feed/assets/telemetry.gif?title=Antd-FormList%E5%B5%8C%E5%A5%97Table%E5%AE%9E%E8%B7%B5&amp;url=/archives/antd-formlist%E5%B5%8C%E5%A5%97table%E5%AE%9E%E8%B7%B5md" width="1" height="1" alt="" style="opacity:0;">需求说明使用Antd，实现一个Table，有两种状态，纯展示状态和可编辑状态。纯展示状态下所有内容直接取值，不可变。可编辑状态下table某些列为Input输入框，并且input中的值改变时，需要实时收集改变后的状态。Table行支持勾选，并且在可编辑状态下，点击提交表单时，只校验已勾选行的值。实现]]></description><guid isPermaLink="false">/archives/antd-formlist%E5%B5%8C%E5%A5%97table%E5%AE%9E%E8%B7%B5md</guid><dc:creator>Yzzzed</dc:creator><enclosure url="https://www.hyzed.cn/apis/api.storage.halo.run/v1alpha1/thumbnails/-/via-uri?uri=https%3A%2F%2Fimage.hyzed.cn%2Fblog%2F854228c4042b6b3c8e980fe36c4826fc.jpg&amp;size=m" type="image/jpeg" length="645586"/><pubDate>Mon, 25 Sep 2023 05:54:57 GMT</pubDate></item><item><title><![CDATA[[常用算法整理]javascript algorithm]]></title><link>https://www.hyzed.cn/archives/javascriptalgorithm</link><description><![CDATA[<img src="https://www.hyzed.cn/plugins/feed/assets/telemetry.gif?title=%5B%E5%B8%B8%E7%94%A8%E7%AE%97%E6%B3%95%E6%95%B4%E7%90%86%5Djavascript%20algorithm&amp;url=/archives/javascriptalgorithm" width="1" height="1" alt="" style="opacity:0;">排序算法: 冒泡排序，插入排序，选择排序，快速排序，归并排序，桶排序，堆排序。其他常用算法：洗牌算法，最小公约数，最大公因数，获取所有匹配字符串的下标。]]></description><guid isPermaLink="false">/archives/javascriptalgorithm</guid><dc:creator>Yzzzed</dc:creator><enclosure url="https://www.hyzed.cn/apis/api.storage.halo.run/v1alpha1/thumbnails/-/via-uri?uri=https%3A%2F%2Fimage.hyzed.cn%2Fblog%2F484bcf1ca4d77859e911dc5c6e3a78c7.jpg&amp;size=m" type="image/jpeg" length="0"/><pubDate>Wed, 26 Oct 2022 03:31:16 GMT</pubDate></item><item><title><![CDATA[[学习笔记整理] 浏览器缓存策略]]></title><link>https://www.hyzed.cn/archives/%E6%B5%8F%E8%A7%88%E5%99%A8%E7%BC%93%E5%AD%98%E7%AD%96%E7%95%A5</link><description><![CDATA[<img src="https://www.hyzed.cn/plugins/feed/assets/telemetry.gif?title=%5B%E5%AD%A6%E4%B9%A0%E7%AC%94%E8%AE%B0%E6%95%B4%E7%90%86%5D%20%E6%B5%8F%E8%A7%88%E5%99%A8%E7%BC%93%E5%AD%98%E7%AD%96%E7%95%A5&amp;url=/archives/%E6%B5%8F%E8%A7%88%E5%99%A8%E7%BC%93%E5%AD%98%E7%AD%96%E7%95%A5" width="1" height="1" alt="" style="opacity:0;">浏览器缓存策略两类缓存强缓存（本地缓存）协商缓存（弱缓存）浏览器缓存分为两个阶段，本地缓存阶段与协商缓存阶段，也就是以上两个顺序为先判断强缓存再判断协商缓存。]]></description><guid isPermaLink="false">/archives/%E6%B5%8F%E8%A7%88%E5%99%A8%E7%BC%93%E5%AD%98%E7%AD%96%E7%95%A5</guid><dc:creator>Yzzzed</dc:creator><enclosure url="https://www.hyzed.cn/apis/api.storage.halo.run/v1alpha1/thumbnails/-/via-uri?uri=https%3A%2F%2Fimage.hyzed.cn%2Fblog%2Fdc438af7e1c489186d0d5f68ad8e5811.jpg&amp;size=m" type="image/jpeg" length="0"/><pubDate>Thu, 20 Oct 2022 08:44:31 GMT</pubDate></item><item><title><![CDATA[[20210422] js截取字符串 - slice(), substring(), substr() 区别]]></title><link>https://www.hyzed.cn/archives/2021422md</link><description><![CDATA[<img src="https://www.hyzed.cn/plugins/feed/assets/telemetry.gif?title=%5B20210422%5D%20js%E6%88%AA%E5%8F%96%E5%AD%97%E7%AC%A6%E4%B8%B2%20-%20slice%28%29%2C%20substring%28%29%2C%20substr%28%29%20%E5%8C%BA%E5%88%AB&amp;url=/archives/2021422md" width="1" height="1" alt="" style="opacity:0;">2021.4.22 js截取字符串 slice() string.slice(start, end) 参数描述 start必需。要截取的字符串的起始下标。如果是负数，则数值为string.length + start。例如，-1指的是最后一个字符，-3指的是倒数第三个字符。]]></description><guid isPermaLink="false">/archives/2021422md</guid><dc:creator>Yzzzed</dc:creator><enclosure url="https://www.hyzed.cn/apis/api.storage.halo.run/v1alpha1/thumbnails/-/via-uri?uri=https%3A%2F%2Fimage.hyzed.cn%2Fblog%2Fe351f31c1206b637d789b3b1441de6fd.jpg&amp;size=m" type="image/jpeg" length="0"/><pubDate>Mon, 26 Apr 2021 08:40:14 GMT</pubDate></item><item><title><![CDATA[观察者模式 -- 鼠标拖拽div]]></title><link>https://www.hyzed.cn/archives/%E8%A7%82%E5%AF%9F%E8%80%85%E6%A8%A1%E5%BC%8F--%E9%BC%A0%E6%A0%87%E6%8B%96%E6%8B%BDdiv</link><description><![CDATA[<img src="https://www.hyzed.cn/plugins/feed/assets/telemetry.gif?title=%E8%A7%82%E5%AF%9F%E8%80%85%E6%A8%A1%E5%BC%8F%20--%20%E9%BC%A0%E6%A0%87%E6%8B%96%E6%8B%BDdiv&amp;url=/archives/%E8%A7%82%E5%AF%9F%E8%80%85%E6%A8%A1%E5%BC%8F--%E9%BC%A0%E6%A0%87%E6%8B%96%E6%8B%BDdiv" width="1" height="1" alt="" style="opacity:0;">观察者模式：定义了对象间一种一对多的依赖关系，当目标对象 Subject 的状态发生改变时，所有依赖它的对象 Observer 都会得到通知。以观察者模式的形式去实现鼠标拖拽div。注：此处的实现是一对一的依赖关系。代码实现基本html&amp;lt;!DOCTYPE html&amp;gt;&amp;lt;html&amp;gt]]></description><guid isPermaLink="false">/archives/%E8%A7%82%E5%AF%9F%E8%80%85%E6%A8%A1%E5%BC%8F--%E9%BC%A0%E6%A0%87%E6%8B%96%E6%8B%BDdiv</guid><dc:creator>Yzzzed</dc:creator><enclosure url="https://www.hyzed.cn/apis/api.storage.halo.run/v1alpha1/thumbnails/-/via-uri?uri=https%3A%2F%2Fimage.hyzed.cn%2Fblog%2Fd2158376b341f44674dce876eac958cf.jpg&amp;size=m" type="image/jpeg" length="555522"/><pubDate>Tue, 21 Jul 2020 09:16:43 GMT</pubDate></item><item><title><![CDATA[js数据结构与算法  -- 快速排序（quickSort） 简单算法与高级算法]]></title><link>https://www.hyzed.cn/archives/quicksort</link><description><![CDATA[<img src="https://www.hyzed.cn/plugins/feed/assets/telemetry.gif?title=js%E6%95%B0%E6%8D%AE%E7%BB%93%E6%9E%84%E4%B8%8E%E7%AE%97%E6%B3%95%20%20--%20%E5%BF%AB%E9%80%9F%E6%8E%92%E5%BA%8F%EF%BC%88quickSort%EF%BC%89%20%E7%AE%80%E5%8D%95%E7%AE%97%E6%B3%95%E4%B8%8E%E9%AB%98%E7%BA%A7%E7%AE%97%E6%B3%95&amp;url=/archives/quicksort" width="1" height="1" alt="" style="opacity:0;">快速排序 (quickSort) 快速排序是对冒泡排序的一种改进, 第一趟排序先分成两份, 然后递归调用，继续二分。 快排属于分治法的一种，先把大问题分成各个小问题，再把小问题分成更小的问题。 简单算法实现 const quickSort = (arr) =&amp;gt; { const len =]]></description><guid isPermaLink="false">/archives/quicksort</guid><dc:creator>Yzzzed</dc:creator><enclosure url="https://www.hyzed.cn/apis/api.storage.halo.run/v1alpha1/thumbnails/-/via-uri?uri=https%3A%2F%2Fimage.hyzed.cn%2Fblog%2Fce7b449cc55b96e90c36abf0b8b20869.png&amp;size=m" type="image/jpeg" length="6678078"/><pubDate>Thu, 2 Apr 2020 11:09:01 GMT</pubDate></item><item><title><![CDATA[leetcode-125 验证回文串 js解法]]></title><link>https://www.hyzed.cn/archives/leetcode-125</link><description><![CDATA[<img src="https://www.hyzed.cn/plugins/feed/assets/telemetry.gif?title=leetcode-125%20%E9%AA%8C%E8%AF%81%E5%9B%9E%E6%96%87%E4%B8%B2%20js%E8%A7%A3%E6%B3%95&amp;url=/archives/leetcode-125" width="1" height="1" alt="" style="opacity:0;">]]></description><guid isPermaLink="false">/archives/leetcode-125</guid><dc:creator>Yzzzed</dc:creator><enclosure url="https://www.hyzed.cn/apis/api.storage.halo.run/v1alpha1/thumbnails/-/via-uri?uri=https%3A%2F%2Fimage.hyzed.cn%2Fblog%2Fcd353e71c6358457d890d61f644ce96c.jpg&amp;size=m" type="image/jpeg" length="583682"/><pubDate>Sat, 21 Dec 2019 01:54:23 GMT</pubDate></item><item><title><![CDATA[Leetcode - 70 爬楼梯 js解法]]></title><link>https://www.hyzed.cn/archives/leetcode-70</link><description><![CDATA[<img src="https://www.hyzed.cn/plugins/feed/assets/telemetry.gif?title=Leetcode%20-%2070%20%E7%88%AC%E6%A5%BC%E6%A2%AF%20js%E8%A7%A3%E6%B3%95&amp;url=/archives/leetcode-70" width="1" height="1" alt="" style="opacity:0;">Leetcode - 70 爬楼梯 js解法 题目 假设你正在爬楼梯。需要 n 阶你才能到达楼顶。 每次你可以爬 1 或 2 个台阶。你有多少种不同的方法可以爬到楼顶呢？ 注意： 给定 n 是一个正整数。 示例一 输入： 2 输出： 2 解释： 有两种方法可以爬到楼顶。 1. 1 阶 + 1 阶]]></description><guid isPermaLink="false">/archives/leetcode-70</guid><dc:creator>Yzzzed</dc:creator><enclosure url="https://www.hyzed.cn/apis/api.storage.halo.run/v1alpha1/thumbnails/-/via-uri?uri=https%3A%2F%2Fimage.hyzed.cn%2Fblog%2F22c0ffa38e72420452759edc8d35ae9c.png&amp;size=m" type="image/jpeg" length="3004484"/><pubDate>Fri, 13 Dec 2019 02:48:47 GMT</pubDate></item></channel></rss>