<?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>Leeson's Space</title>
        <link>https://looseli.top//</link>
        <description>🎄</description>
        <lastBuildDate>Wed, 04 Mar 2026 06:15:53 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, Leeson</copyright>
        <item>
            <title><![CDATA[技巧便利签]]></title>
            <link>https://looseli.top//article/note-1</link>
            <guid>https://looseli.top//article/note-1</guid>
            <pubDate>Thu, 17 Aug 2023 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-2011578febe580e1989ad6cb3a832a8d"><div class="notion-viewport"></div><div class="notion-collection-page-properties"></div><h4 class="notion-h notion-h3 notion-h-indent-0 notion-block-2011578febe580709733c41052503011" data-id="2011578febe580709733c41052503011"><span><div id="2011578febe580709733c41052503011" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2011578febe580709733c41052503011" title="13位时间戳精确到毫秒，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">13位时间戳精确到毫秒，10位时间戳精确到秒</span></span></h4><h4 class="notion-h notion-h3 notion-h-indent-0 notion-block-2011578febe5804ea0bcd0d142c81dcb" data-id="2011578febe5804ea0bcd0d142c81dcb"><span><div id="2011578febe5804ea0bcd0d142c81dcb" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2011578febe5804ea0bcd0d142c81dcb" 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-0 notion-block-2011578febe580928860ffa167a8cc9c" data-id="2011578febe580928860ffa167a8cc9c"><span><div id="2011578febe580928860ffa167a8cc9c" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2011578febe580928860ffa167a8cc9c" title="在iOS中，当日期格式为yyyy-mm-dd时，页面会显示NAN。h5需要兼容该日期格式"><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">在iOS中，当日期格式为yyyy-mm-dd时，页面会显示NAN。h5需要兼容该日期格式</span></span></h4><h4 class="notion-h notion-h3 notion-h-indent-0 notion-block-2011578febe580dc8dfcfcda569a6bac" data-id="2011578febe580dc8dfcfcda569a6bac"><span><div id="2011578febe580dc8dfcfcda569a6bac" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2011578febe580dc8dfcfcda569a6bac" 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-0 notion-block-2011578febe580e994abe657bf9f7a99" data-id="2011578febe580e994abe657bf9f7a99"><span><div id="2011578febe580e994abe657bf9f7a99" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2011578febe580e994abe657bf9f7a99" 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-2011578febe580138e4df5a249a4a4f4"><li><b>遮罩层内无需滑动时</b>，只需要在遮罩层元素上添加<code class="notion-inline-code">@touchmove.prevent</code>来阻止事件冒泡</li><ul class="notion-list notion-list-disc notion-block-2011578febe580138e4df5a249a4a4f4"><li>Tips: 当元素添加<code class="notion-inline-code">@touchmove.prevent</code>时，遮罩层内和下方页面都将无法滑动！</li></ul></ul><ul class="notion-list notion-list-disc notion-block-2011578febe580669b1acb6f80d85b95"><li><b>遮罩层内需要滚动时</b>，只需要给下方页面的body元素添加<code class="notion-inline-code">overflow: hidden;</code>当弹窗遮罩层关闭后，将样式还原</li></ul><h4 class="notion-h notion-h3 notion-h-indent-0 notion-block-2011578febe580458c04d379ec90e211" data-id="2011578febe580458c04d379ec90e211"><span><div id="2011578febe580458c04d379ec90e211" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2011578febe580458c04d379ec90e211" 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-0 notion-block-2011578febe5802f97c8c7a707205132" data-id="2011578febe5802f97c8c7a707205132"><span><div id="2011578febe5802f97c8c7a707205132" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2011578febe5802f97c8c7a707205132" title="补0小技巧(比如时间补0)"><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">补0小技巧(比如时间补0)</span></span></h4><h4 class="notion-h notion-h3 notion-h-indent-0 notion-block-2011578febe580b8b334d3c9a34097f3" data-id="2011578febe580b8b334d3c9a34097f3"><span><div id="2011578febe580b8b334d3c9a34097f3" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2011578febe580b8b334d3c9a34097f3" title="Map函数"><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">Map函数</span></span></h4><h4 class="notion-h notion-h3 notion-h-indent-0 notion-block-2011578febe58054a113d58b7470662a" data-id="2011578febe58054a113d58b7470662a"><span><div id="2011578febe58054a113d58b7470662a" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2011578febe58054a113d58b7470662a" title="findIndex"><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">findIndex</span></span></h4><h4 class="notion-h notion-h3 notion-h-indent-0 notion-block-2011578febe58072b940ee866d05c44c" data-id="2011578febe58072b940ee866d05c44c"><span><div id="2011578febe58072b940ee866d05c44c" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2011578febe58072b940ee866d05c44c" 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></h4><h4 class="notion-h notion-h3 notion-h-indent-0 notion-block-2011578febe580989388d08197006607" data-id="2011578febe580989388d08197006607"><span><div id="2011578febe580989388d08197006607" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2011578febe580989388d08197006607" title="通过css控制文字一行展示，并在超出部分用省略号表示"><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">css</code>控制文字一行展示，并在超出部分用省略号表示</span></span></h4><h4 class="notion-h notion-h3 notion-h-indent-0 notion-block-2011578febe5800da293fc8785e1e028" data-id="2011578febe5800da293fc8785e1e028"><span><div id="2011578febe5800da293fc8785e1e028" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2011578febe5800da293fc8785e1e028" title="通过css控制文字最多展示指定行，并在超出部分使用省略号表示(推荐)"><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">css</code>控制文字最多展示指定行，并在超出部分使用省略号表示(推荐)</span></span></h4><h4 class="notion-h notion-h3 notion-h-indent-0 notion-block-2011578febe580a0aee2c31d19fe30a5" data-id="2011578febe580a0aee2c31d19fe30a5"><span><div id="2011578febe580a0aee2c31d19fe30a5" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2011578febe580a0aee2c31d19fe30a5" title="p标签中，文本过长时自动换行"><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">p标签中，文本过长时自动换行</span></span></h4><h4 class="notion-h notion-h3 notion-h-indent-0 notion-block-2011578febe580b1b700ef069cc58f00" data-id="2011578febe580b1b700ef069cc58f00"><span><div id="2011578febe580b1b700ef069cc58f00" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2011578febe580b1b700ef069cc58f00" title="ios overflow:hidden无效解决方案"><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>ios overflow:hidden无效解决方案</b></span></span></h4><h4 class="notion-h notion-h3 notion-h-indent-0 notion-block-2011578febe580b894d2c9b737f11867" data-id="2011578febe580b894d2c9b737f11867"><span><div id="2011578febe580b894d2c9b737f11867" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2011578febe580b894d2c9b737f11867" title="利用vue3设置不同页面body颜色不同，避免样式污染"><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>利用vue3设置不同页面body颜色不同，避免样式污染</b></span></span></h4><h4 class="notion-h notion-h3 notion-h-indent-0 notion-block-2011578febe5800191a5e0b5d8c8a051" data-id="2011578febe5800191a5e0b5d8c8a051"><span><div id="2011578febe5800191a5e0b5d8c8a051" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2011578febe5800191a5e0b5d8c8a051" title="通过ADB安装apk，并查看相关日志"><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">通过ADB安装apk，并查看相关日志</span></span></h4><details class="notion-toggle notion-block-2011578febe580f98ec9f658c744b4ba"><summary><h4 class="notion-h notion-h3 notion-h-indent-0 notion-block-2011578febe580f98ec9f658c744b4ba" data-id="2011578febe580f98ec9f658c744b4ba"><span><div id="2011578febe580f98ec9f658c744b4ba" class="notion-header-anchor"></div><span class="notion-h-title">下载 adb 及环境配置</span></span></h4></summary><div><ol start="1" class="notion-list notion-list-numbered notion-block-2011578febe5801ab1f5fb898518db85" style="list-style-type:decimal"><li>下载 Android SDK Platform Tools。
下载链接：<a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://developer.android.com/tools/releases/platform-tools?hl=zh-cn">https://developer.android.com/tools/releases/platform-tools?hl=zh-cn</a></li></ol><ol start="2" class="notion-list notion-list-numbered notion-block-2011578febe580da88c3d4e713041502" style="list-style-type:decimal"><li>下载完成后，解压文件(platform-tools)到一个方便访问的目录，比如笔者直接放在了桌面</li></ol><ol start="3" class="notion-list notion-list-numbered notion-block-2011578febe580d9ab63e0269c583189" style="list-style-type:decimal"><li>打开终端(将 ADB 添加到系统 PATH，以便在终端中直接运行 adb 命令)，编辑 zsh 配置文件，命令如下：<code class="notion-inline-code">nano ~/.zshrc</code></li></ol><ol start="4" class="notion-list notion-list-numbered notion-block-2011578febe58093b2d4ff0c44603170" style="list-style-type:decimal"><li>在文件末尾添加以下行，替换路径为你解压的 platform-tools 目录：
<code class="notion-inline-code">export PATH=&quot;/Users/用户名/Desktop/android-sdk/platform-tools&quot;</code> </li></ol><ol start="5" class="notion-list notion-list-numbered notion-block-2011578febe5801f9567dae1ecd20579" style="list-style-type:decimal"><li>保存并退出（按 Ctrl + X，然后 Y，再按 Enter）</li></ol><ol start="6" class="notion-list notion-list-numbered notion-block-2011578febe5800ab14bd8c790d04a06" style="list-style-type:decimal"><li>应用更改：<code class="notion-inline-code">source ~/.zshrc</code></li></ol><ol start="7" class="notion-list notion-list-numbered notion-block-2011578febe5801f84e7e401c01f2f64" style="list-style-type:decimal"><li>验证安装。若显示版本信息则说明安装成功：<code class="notion-inline-code">adb version</code></li></ol></div></details><details class="notion-toggle notion-block-2011578febe580bdb009d4b024d4a944"><summary><h4 class="notion-h notion-h3 notion-h-indent-0 notion-block-2011578febe580bdb009d4b024d4a944" data-id="2011578febe580bdb009d4b024d4a944"><span><div id="2011578febe580bdb009d4b024d4a944" class="notion-header-anchor"></div><span class="notion-h-title">用 adb 安装 apk</span></span></h4></summary><div><ol start="1" class="notion-list notion-list-numbered notion-block-2011578febe580869ac5db74d8530103" style="list-style-type:decimal"><li>准备 Android 设备并开启“USB 调试”</li></ol><ol start="2" class="notion-list notion-list-numbered notion-block-2011578febe580e3aad4da89564be090" style="list-style-type:decimal"><li>用 USB 线连接 Android 设备到 Mac，在终端运行该命令：<code class="notion-inline-code">adb devices</code>
如果设备显示为“unauthorized”，在设备上同意“允许 USB 调试”提示</li></ol><ol start="3" class="notion-list notion-list-numbered notion-block-2011578febe5809c9698f1f50b4b81df" style="list-style-type:decimal"><li>先下载客户端提供的apk，然后在终端输入该命令后并将下载好的apk拖进命令行中获得 apk路径，回车等待成功即可：<code class="notion-inline-code">adb install apk路径</code></li></ol></div></details><details class="notion-toggle notion-block-2011578febe580709922ee6e1d4c1890"><summary><h4 class="notion-h notion-h3 notion-h-indent-0 notion-block-2011578febe580709922ee6e1d4c1890" data-id="2011578febe580709922ee6e1d4c1890"><span><div id="2011578febe580709922ee6e1d4c1890" class="notion-header-anchor"></div><span class="notion-h-title">adb 查看日志</span></span></h4></summary><div><ol start="1" class="notion-list notion-list-numbered notion-block-2011578febe580378fb0f20d5b305e72" style="list-style-type:decimal"><li><b>查看 WebView 日志</b>：<code class="notion-inline-code">adb logcat | /usr/bin/grep WebView</code></li></ol><ol start="2" class="notion-list notion-list-numbered notion-block-2011578febe58098bea5e508b3572c48" style="list-style-type:decimal"><li><b>过滤特定关键字</b>：<code class="notion-inline-code">adb logcat | /usr/bin/grep &quot;get_local_price&quot;</code></li></ol></div></details><h4 class="notion-h notion-h3 notion-h-indent-0 notion-block-24c1578febe58069b76ec7d67800f58c" data-id="24c1578febe58069b76ec7d67800f58c"><span><div id="24c1578febe58069b76ec7d67800f58c" class="notion-header-anchor"></div><a class="notion-hash-link" href="#24c1578febe58069b76ec7d67800f58c" title="pyftsubset子集化字体"><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">pyftsubset子集化字体</span></span></h4><ol start="1" class="notion-list notion-list-numbered notion-block-24c1578febe580a996dfd69043515138" style="list-style-type:decimal"><li>安装 python 环境、pip 等</li></ol><ol start="2" class="notion-list notion-list-numbered notion-block-24c1578febe58036a5c0d2cf69e3091e" style="list-style-type:decimal"><li>安装 pyftsubset 字体子集化工具</li></ol><ol start="3" class="notion-list notion-list-numbered notion-block-24c1578febe580fb8f96dd24de8cae32" style="list-style-type:decimal"><li>准备好源字体包和对应的文案</li></ol><details class="notion-toggle notion-block-2f11578febe580b78c71d943a2ff2be1"><summary><h4 class="notion-h notion-h3 notion-h-indent-0 notion-block-2f11578febe580b78c71d943a2ff2be1" data-id="2f11578febe580b78c71d943a2ff2be1"><span><div id="2f11578febe580b78c71d943a2ff2be1" class="notion-header-anchor"></div><span class="notion-h-title">flutter跨端开发app</span></span></h4></summary><div></div></details><div class="notion-blank notion-block-2f11578febe5806b8d3ceaabfbca98cd"> </div></main></div>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ssh密钥生成及公钥复制]]></title>
            <link>https://looseli.top//article/ssh-1</link>
            <guid>https://looseli.top//article/ssh-1</guid>
            <pubDate>Wed, 24 May 2023 00:00:00 GMT</pubDate>
            <description><![CDATA[ssh密钥生成及公钥复制]]></description>
            <content:encoded><![CDATA[<div id="notion-article" class="mx-auto overflow-hidden "><main class="notion light-mode notion-page notion-block-2561a6ca06154ab98e6ac78cc362454f"><div class="notion-viewport"></div><div class="notion-collection-page-properties"></div><div class="notion-text notion-block-94bd81330b59453fbe007c9dbdb4f422">由于我司最近更换了代码托管平台，导致远程仓库地址发生变化，所以需要我们重新在新的平台填入ssh公钥以便正常推拉代码。简单在此记录一下ssh密钥的生成以及将公钥填入阿里云、github等平台，方便日后查阅</div><div class="notion-text notion-block-f075ef5f2e1343f898c0efc4ce1b935a"><b>先简单说明一下https和ssh两种方式的差异：</b></div><ul class="notion-list notion-list-disc notion-block-92dc19d4af8a460192df93f9f4c4a4da"><li>https: 适合开源项目。无需验证即可clone和读取项目，但没有push权限</li></ul><ul class="notion-list notion-list-disc notion-block-8e2a9474181e4a58a85bc1b3b5fa0e93"><li>ssh: 适合内部项目。需要先将ssh密钥对中的公钥上传至服务器，上传成功后即可自由使用clone、push等操作</li></ul><h4 class="notion-h notion-h3 notion-h-indent-0 notion-block-d7d831a818ff4976868146bf6ef9bfbe" data-id="d7d831a818ff4976868146bf6ef9bfbe"><span><div id="d7d831a818ff4976868146bf6ef9bfbe" class="notion-header-anchor"></div><a class="notion-hash-link" href="#d7d831a818ff4976868146bf6ef9bfbe" title="生成ssh密钥"><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">生成ssh密钥</span></span></h4><ul class="notion-list notion-list-disc notion-block-6a9474d3e2d44cfcb46bf0a0773df079"><li>设置全局git账号和邮箱</li></ul><div class="notion-text notion-block-5781bb2fa3c541dea65e00584af072ff">Tips: 如果之前已经设置过git账号和邮箱的，可省略第一步，直接从第二步开始。查询git账号邮箱的命令如下</div><ul class="notion-list notion-list-disc notion-block-f16a41924e5e4d308c2010e7fb6cf650"><li>在.ssh目录下，生成ssh密钥</li></ul><div class="notion-text notion-block-c19d88271e2c45c0bada442f1836d175">输入以下命令并一路回车即可生成默认文件名的ssh密钥对，即<code class="notion-inline-code">id_rsa</code>和<code class="notion-inline-code">id_rsa.pub</code>两个文件</div><ul class="notion-list notion-list-disc notion-block-adc97ac0b5b84760b11678fa65906574"><li>将<code class="notion-inline-code">id_rsa.pub</code>文件中的内容全部复制并上传至对应的服务器</li></ul><div class="notion-text notion-block-32e9ff3903f8433692d8ad3f7404bdac">在此只记录阿里云效代码管理平台和github两个平台中公钥存放位置</div><div class="notion-text notion-block-f091afc921c2410ebf7c532c52d2ddaa"><b>结语</b></div><div class="notion-text notion-block-140b50ce633646cda0dfb444b8ddb9cd">在此只记录阿里云效代码管理平台和github两个平台中公钥存放位置</div><ol start="1" class="notion-list notion-list-numbered notion-block-11529b93315346cb80858c539dc52fb7" style="list-style-type:decimal"><li>阿里云效代码管理平台：个人设置 -&gt; SSH公钥</li></ol><ol start="2" class="notion-list notion-list-numbered notion-block-e4d211b3d7e94c8698c4c01661afe1b8" style="list-style-type:decimal"><li>github: Settings -&gt; SSH and GPG keys -&gt; New SSH key</li></ol><div class="notion-blank notion-block-9be4068b2c74450c91f1f416b16508a2"> </div></main></div>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[JavaScript ES(6-11)]]></title>
            <link>https://looseli.top//article/ES6</link>
            <guid>https://looseli.top//article/ES6</guid>
            <pubDate>Mon, 04 Mar 2024 00:00:00 GMT</pubDate>
            <description><![CDATA[JavaScript ES新特性]]></description>
            <content:encoded><![CDATA[JavaScript ES新特性]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Vue3 新特性]]></title>
            <link>https://looseli.top//article/vue-1</link>
            <guid>https://looseli.top//article/vue-1</guid>
            <pubDate>Thu, 02 Sep 2021 00:00:00 GMT</pubDate>
            <description><![CDATA[一些vue3的基础api]]></description>
            <content:encoded><![CDATA[<div id="notion-article" class="mx-auto overflow-hidden "><main class="notion light-mode notion-page notion-block-657e1e1ac95947aeb28831651bfc3db7"><div class="notion-viewport"></div><div class="notion-collection-page-properties"></div><div class="notion-text notion-block-a02e41d443ef4e739c29d54c3e351f28"><code class="notion-inline-code">Vue3</code>的发布已经差不多快一年了，笔者也是在中途跟了波热潮，学习了一下<code class="notion-inline-code">Vue3</code>的新特性，但一直没有用于工作开发。好在这家公司比较鼓励新技术的使用，笔者也是在不久前将<code class="notion-inline-code">Vue3</code>投入到工作中，发现还是很丝滑的😎 在此记录一下笔者的所学所用，持续更新吧...</div><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-421c98991e044bbba1ab30e8a8196dfa" data-id="421c98991e044bbba1ab30e8a8196dfa"><span><div id="421c98991e044bbba1ab30e8a8196dfa" class="notion-header-anchor"></div><a class="notion-hash-link" href="#421c98991e044bbba1ab30e8a8196dfa" title="Vue3 与 Vue2"><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>Vue3 与 Vue2</b></span></span></h3><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-54e276e6ff12422fabdb4f97b2cce6ab" data-id="54e276e6ff12422fabdb4f97b2cce6ab"><span><div id="54e276e6ff12422fabdb4f97b2cce6ab" class="notion-header-anchor"></div><a class="notion-hash-link" href="#54e276e6ff12422fabdb4f97b2cce6ab" title="Vue2 结构"><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>Vue2 结构</b></span></span></h4><div class="notion-text notion-block-d4d9b2209747447bb2b34ac699e2ce65"><b>熟悉</b><code class="notion-inline-code"><b>Vue2</b></code><b>的读者应该知道，我们一般会在</b><code class="notion-inline-code"><b>data</b></code><b>中定义数据，在</b><code class="notion-inline-code"><b>methods</b></code><b>中声明方法，通过</b><code class="notion-inline-code"><b>this</b></code><b>调用需要的数据和方法。</b></div><div class="notion-text notion-block-8dcc2405a5e342bc9b2698f944d1ff38">想必大家和笔者一样也感受到了，当<code class="notion-inline-code">.vue</code>文件中功能复杂、代码过长时，我们需要在<code class="notion-inline-code">template</code>、<code class="notion-inline-code">data</code>、<code class="notion-inline-code">methods</code>之间来回切换，甚是烦躁 😤</div><div class="notion-text notion-block-8cd77ea8fede415c959604ffafa89a00">当然，还不止于此！不知大家是否在工作中用过<code class="notion-inline-code">mixins</code>。不可否认，<code class="notion-inline-code">mixins</code>有它的优点和好处，但不足也很明显：</div><ul class="notion-list notion-list-disc notion-block-a1c3fc014ece428d859a14c7953a4975"><li>命名易冲突</li></ul><ul class="notion-list notion-list-disc notion-block-e3194dfc1daa4f2a94d51bfaecdeda80"><li>未知的数据来源，调试起来很酸爽 😵</li></ul><ul class="notion-list notion-list-disc notion-block-b8d8a68c68804fe29d6724a12fc5a8b4"><li>……</li></ul><div class="notion-text notion-block-6f98019ccdb84229ad163b1e81844b68">大概是基于以上的问题，<code class="notion-inline-code">Vue3</code>诞生了 👏 推出了<code class="notion-inline-code">Composition API</code></div><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-dbf9a824491644e98c22c3ae3b8c6be4" data-id="dbf9a824491644e98c22c3ae3b8c6be4"><span><div id="dbf9a824491644e98c22c3ae3b8c6be4" class="notion-header-anchor"></div><a class="notion-hash-link" href="#dbf9a824491644e98c22c3ae3b8c6be4" title="Vue3 诞生"><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>Vue3 诞生</b></span></span></h4><div class="notion-text notion-block-39b8170076054fac80ace86f2baf0fbd"><code class="notion-inline-code">Vue3</code>推出的<code class="notion-inline-code">Composition API</code>，不仅可以把零散的逻辑组合在一起，还能将独立的功能逻辑拆分成单独的文件。下面，我就来隆重的介绍它</div><div class="notion-text notion-block-f72e0836870f43b2b763dfae813182d1"><b>setup</b></div><div class="notion-text notion-block-5e3be596e04e4b5e926e8f41c209a20f">这是<code class="notion-inline-code">Vue3</code>新增的一个特性，是作为<code class="notion-inline-code">Composition API</code>的入口。结构如下：</div><div class="notion-text notion-block-c3584041d6674ef083a962c5ed2a3581"><code class="notion-inline-code">setup</code>执行的时机，网上说法不一。不过通过笔者的测试发现，<code class="notion-inline-code"><b>setup</b></code><b>执行的时机在</b><code class="notion-inline-code"><b>beforeCreate生命周期</b></code><b>之前</b>，读者也可通过下方代码进行自测：🤔</div><div class="notion-text notion-block-33b8a341652340d2b5346c8ac317bbda"><code class="notion-inline-code">setup</code>可以接收两个参数<code class="notion-inline-code">props</code>和<code class="notion-inline-code">context</code>，如上方代码。我们简单来说说这两个属性：</div><ul class="notion-list notion-list-disc notion-block-8d64785862fd4e77ae6c4a8b7ef05d84"><li><code class="notion-inline-code">props</code>：父子组件之间通过<code class="notion-inline-code">prop</code>所传的值。直接上代码：</li></ul><div class="notion-text notion-block-1e98f4baac384ec5b537943df4553082">那么，通过<code class="notion-inline-code">setup</code>中的<code class="notion-inline-code">props</code>参数就可以拿到上面传入的<code class="notion-inline-code">num</code>和<code class="notion-inline-code">obj</code>属性，从而进行相关的逻辑操作</div><div class="notion-text notion-block-df4b6b13ae6842fbb22c3b348656badb">Tips：<code class="notion-inline-code">props</code><b>不能使用 ES6 解构</b>，这样解构出的数据会失去响应式。如果我们<b>既想要解构，又想要其保持响应式</b>，怎么办？别怕，<code class="notion-inline-code">Vue3</code>提出了<code class="notion-inline-code">toRefs</code>函数，我们会在后面学习它</div><div class="notion-row notion-block-9fac47d2ba8d452d919f4f3c90962ad5"><div class="notion-column notion-block-bf1b86581db646e6804382fd561c5ade" style="width:calc((100% - (1 * min(32px, 4vw))) * 0.5)"><ul class="notion-list notion-list-disc notion-block-3f6c4ca6b3cb49e2a8c7d1db38274ba4"><li><code class="notion-inline-code">context</code>：可替代<code class="notion-inline-code">Vue2</code>中的<code class="notion-inline-code">this</code></li></ul></div><div class="notion-spacer"></div><div class="notion-column notion-block-1b49478ef5ce4bb4a9d34d326d547e43" style="width:calc((100% - (1 * min(32px, 4vw))) * 0.5)"><div class="notion-blank notion-block-7361ae3388e344e58d19bca51e6946fe"> </div></div><div class="notion-spacer"></div></div><div class="notion-text notion-block-7177d6d020764bbd80795fae9da14e1d">我们在<code class="notion-inline-code">Vue2</code>中，会频繁使用到<code class="notion-inline-code">this</code>。但是，在<code class="notion-inline-code">Vue3</code>中，不能使用<code class="notion-inline-code">this</code>。所以，<code class="notion-inline-code">context</code>中提供了最常用的几个属性：<code class="notion-inline-code">emit</code>、<code class="notion-inline-code">slot</code>，使用如下：</div><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-a8e09cf59381426a97f37dcf9ba39090" data-id="a8e09cf59381426a97f37dcf9ba39090"><span><div id="a8e09cf59381426a97f37dcf9ba39090" class="notion-header-anchor"></div><a class="notion-hash-link" href="#a8e09cf59381426a97f37dcf9ba39090" title="ref、reactive、toRefs"><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>ref、reactive、toRefs</b></span></span></h4><div class="notion-text notion-block-6b4680b7aa6543f0b160259a08c7974c">在<code class="notion-inline-code">Vue2</code>中，我们通常把数据定义在<code class="notion-inline-code">data</code>中，而且我们知道，定义在<code class="notion-inline-code">data</code>中的数据通常是响应式的。那么，我们在<code class="notion-inline-code">Vue3</code>中该怎么定义数据呢？<code class="notion-inline-code">ref</code>、<code class="notion-inline-code">reactive</code>由此而生。一般来说，<code class="notion-inline-code">ref</code>定义js基础类型的双向绑定；而<code class="notion-inline-code">reactive</code>则定义对象类型的双向绑定。用法如下：</div><div class="notion-text notion-block-fee9cd4f4b96498faf73d7596ac21a25">相信读者们也发现了，当我们用<code class="notion-inline-code">reactive</code>定义了对象类型，同时需要在模版中使用时，都需要<code class="notion-inline-code">data.某个属性</code>，数据量大的时候还是蛮繁琐的。同上文提到的<code class="notion-inline-code">props</code>一样，我们不能直接解构，不然会失去响应式。因此，<code class="notion-inline-code">Vue3</code>提出了<code class="notion-inline-code">toRefs</code>函数。通过<code class="notion-inline-code">toRefs</code>将<code class="notion-inline-code">reactive</code>定义的对象类型里的属性全部转为<code class="notion-inline-code">ref</code>定义的基础类型。上述代码可做如下修改：</div><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-b42be534fb1f498d912b3a3aa458ff1f" data-id="b42be534fb1f498d912b3a3aa458ff1f"><span><div id="b42be534fb1f498d912b3a3aa458ff1f" class="notion-header-anchor"></div><a class="notion-hash-link" href="#b42be534fb1f498d912b3a3aa458ff1f" title="computed"><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>computed</b></span></span></h4><div class="notion-text notion-block-159918fbe7ab4bd7ae70dfeb69518258">直接上代码，感受一下<code class="notion-inline-code">Vue3</code>中的<code class="notion-inline-code">computed</code></div><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-fc1ae2410d0c4c3bb2a84b43a4960c96" data-id="fc1ae2410d0c4c3bb2a84b43a4960c96"><span><div id="fc1ae2410d0c4c3bb2a84b43a4960c96" class="notion-header-anchor"></div><a class="notion-hash-link" href="#fc1ae2410d0c4c3bb2a84b43a4960c96" title="filters"><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">filters</span></span></h4><div class="notion-text notion-block-c09cb1581d874424aaf98d85d4480075">在<code class="notion-inline-code">vue2</code>中有过滤器<code class="notion-inline-code">filters</code>，可以很方便的对一些数据进行简单的二次操作，如时间格式化等。<b>但在</b><code class="notion-inline-code"><b>vue3</b></code><b>中，vue团队移除了过滤器的概念</b>，并用<code class="notion-inline-code">computed</code>去代替过滤器<code class="notion-inline-code">filters</code>的功能</div><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-b1c5ead2f97041bcb2481f704f6d6fc5" data-id="b1c5ead2f97041bcb2481f704f6d6fc5"><span><div id="b1c5ead2f97041bcb2481f704f6d6fc5" class="notion-header-anchor"></div><a class="notion-hash-link" href="#b1c5ead2f97041bcb2481f704f6d6fc5" title="watch"><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>watch</b></span></span></h4><ul class="notion-list notion-list-disc notion-block-bf118d74187d4906bef719367c80cf61"><li>监听<code class="notion-inline-code">ref</code>定义的数据</li></ul><ul class="notion-list notion-list-disc notion-block-b66d4968f5214adf98fc6cb4a12c7692"><li>监听<code class="notion-inline-code">reactive</code>定义的数据</li></ul><div class="notion-text notion-block-792bbc504aaf4ab2afd6d03a0731757e"><code class="notion-inline-code">Vue3</code>中依旧保留了<code class="notion-inline-code">deep</code>、<code class="notion-inline-code">immediate</code>关键字，如下代码</div><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-8fc4dc9deac744fa9dfe1ccfcaf9d398" data-id="8fc4dc9deac744fa9dfe1ccfcaf9d398"><span><div id="8fc4dc9deac744fa9dfe1ccfcaf9d398" class="notion-header-anchor"></div><a class="notion-hash-link" href="#8fc4dc9deac744fa9dfe1ccfcaf9d398" 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><div class="notion-text notion-block-ba0452b3c8234f49bf80107d141cde24"><code class="notion-inline-code">Vue2</code>和<code class="notion-inline-code">Vue3</code>的生命周期还是有点区别的，直接将官网的说明拿过来 🤲</div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-aec235a2cb4540ef9f6354c0014da2c2"><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/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2F473f7782-1890-453e-b978-d4ffce4e4314%2FUntitled.png?table=block&amp;id=aec235a2-cb45-40ef-9f63-54c0014da2c2&amp;t=aec235a2-cb45-40ef-9f63-54c0014da2c2&amp;width=709.9921875&amp;cache=v2" alt="notion image" loading="lazy" decoding="async"/></div></figure><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-c5dbd58982ce455eb43aa4be1ffea679" data-id="c5dbd58982ce455eb43aa4be1ffea679"><span><div id="c5dbd58982ce455eb43aa4be1ffea679" class="notion-header-anchor"></div><a class="notion-hash-link" href="#c5dbd58982ce455eb43aa4be1ffea679" 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-4dc99bf0728e4def9347413c78ed1aa2"><code class="notion-inline-code">Vue3</code>中的特性就先介绍到这边。除了上述介绍的特性外，<code class="notion-inline-code">Vue3</code>中还有很多的新特性，如<code class="notion-inline-code">watchEffect</code>、<code class="notion-inline-code">自定义Hooks</code>、<code class="notion-inline-code">Teleport</code>等。由于笔者未频繁使用到这些特性，就先不做记录，之后使用到了或是学习了在陆续更新吧～</div><div class="notion-blank notion-block-5cf75ead6838408c8b14b6ca2a5966ac"> </div></main></div>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[MCP协议]]></title>
            <link>https://looseli.top//article/mcp</link>
            <guid>https://looseli.top//article/mcp</guid>
            <pubDate>Wed, 23 Apr 2025 00:00:00 GMT</pubDate>
            <description><![CDATA[MCP，让AI更智能！]]></description>
            <content:encoded><![CDATA[<div id="notion-article" class="mx-auto overflow-hidden "><main class="notion light-mode notion-page notion-block-1a71578febe580cd9055dc48d0c6da00"><div class="notion-viewport"></div><div class="notion-collection-page-properties"></div><h4 class="notion-h notion-h3 notion-h-indent-0 notion-block-1a71578febe5815e836fe2a7c5af3e58" data-id="1a71578febe5815e836fe2a7c5af3e58"><span><div id="1a71578febe5815e836fe2a7c5af3e58" class="notion-header-anchor"></div><a class="notion-hash-link" href="#1a71578febe5815e836fe2a7c5af3e58" 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-1de1578febe5809da90ceb5f4549aefa">随着 AI 的快速发展，大语言模型(<code class="notion-inline-code">Claude</code>、<code class="notion-inline-code">ChatGPT</code>)等在各个领域所展现出的能力令我们惊叹！不过在其工作时与外界无法产生联系，且无法有效地对模型进行指令控制、状态管理以及多轮上下文的组织。所以，一个高效、灵活的通信协议是不可或缺的。</div><h4 class="notion-h notion-h3 notion-h-indent-0 notion-block-1de1578febe5806f9e21da6a971a18e5" data-id="1de1578febe5806f9e21da6a971a18e5"><span><div id="1de1578febe5806f9e21da6a971a18e5" class="notion-header-anchor"></div><a class="notion-hash-link" href="#1de1578febe5806f9e21da6a971a18e5" 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-1de1578febe58005a18bdb946bc7527f"><b>MCP（Model Context Protocol）</b>就是在这样的背景下被提出的。它并不是一种新模型或框架，而是一种协议规范，旨在为大型语言模型的上下文输入提供结构化、可扩展的接口设计。没错！你可以把它理解为「<b>USB接口</b>」。</div><div class="notion-text notion-block-1e01578febe580068382de4b7f8ed311">Agent 和 MCP 的结合，可以让 AI 拥有读取和写入文件、操作命令行、数据库交互、三方 api 对接等强大能力。</div><h4 class="notion-h notion-h3 notion-h-indent-0 notion-block-1de1578febe58020a5a0df9cab231485" data-id="1de1578febe58020a5a0df9cab231485"><span><div id="1de1578febe58020a5a0df9cab231485" class="notion-header-anchor"></div><a class="notion-hash-link" href="#1de1578febe58020a5a0df9cab231485" 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-1de1578febe580a8bd68d32dc9c30938">现在，市面上已经出现了很多 <code class="notion-inline-code">MCP servers</code>。可以去这个<a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://smithery.ai/">网址</a>搜索想要的 <code class="notion-inline-code">MCP server</code>。接下来，我会用<code class="notion-inline-code">高德 mcp server</code>来说明 mcp 该怎么玩～</div><div class="notion-text notion-block-1de1578febe5800cbeacebb0da5d66d1"><b>成为高德开发者并创建key</b></div><div class="notion-text notion-block-1e01578febe580f1be17dc62fe631780">1.登录「<a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://console.amap.com/dev/index">高德控制台</a>」，若没有开发者账号，则需要先注册成为开发者</div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-1e01578febe580a9b73ac268790c4d6c"><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%3A177145c3-536b-4b30-80f4-211860be19dc%3Aimage.png?table=block&amp;id=1e01578f-ebe5-80a9-b73a-c268790c4d6c&amp;t=1e01578f-ebe5-80a9-b73a-c268790c4d6c" alt="notion image" loading="lazy" decoding="async"/></div></figure><div class="notion-text notion-block-1e01578febe58083a83bdd2ea5ff7171">2.进入「应用管理」→「我的应用」，点击右上角「创建新应用」</div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-1e01578febe580f8b368cc36016bbb98"><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%3Ad1a2981f-6b89-45b3-8c39-794c7a9181a1%3Aimage.png?table=block&amp;id=1e01578f-ebe5-80f8-b368-cc36016bbb98&amp;t=1e01578f-ebe5-80f8-b368-cc36016bbb98" alt="notion image" loading="lazy" decoding="async"/></div></figure><div class="notion-text notion-block-1e01578febe5806ba4e9d70fcd97a5a3">3.找到刚才创建的应用，点击「添加 Key」，服务平台选择「Web 服务」</div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-1e01578febe580f8bef2f3368cfef693"><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%3Ac8a8f204-5b6f-42b0-9ff5-1d3054e6324e%3Aimage.png?table=block&amp;id=1e01578f-ebe5-80f8-bef2-f3368cfef693&amp;t=1e01578f-ebe5-80f8-bef2-f3368cfef693" alt="notion image" loading="lazy" decoding="async"/></div></figure><div class="notion-text notion-block-1e01578febe580fda5dae8d3ee35e8f4">4.提交后即可获取 <b>Key</b> 和<b>密钥</b></div><div class="notion-text notion-block-1e01578febe580d28922cab45b88eba3"><b>在 Cursor 中配置 MCP Server</b></div><div class="notion-text notion-block-1e01578febe58098910df99233a6de1e">1.打开 Cursor 设置界面并找到 MCP</div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-1e01578febe580ab80a7ecd2f2d58f5f"><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%3A39ef4b3f-9d4a-4578-8985-6f8096f12542%3Aimage.png?table=block&amp;id=1e01578f-ebe5-80ab-80a7-ecd2f2d58f5f&amp;t=1e01578f-ebe5-80ab-80a7-ecd2f2d58f5f" alt="notion image" loading="lazy" decoding="async"/></div></figure><div class="notion-text notion-block-1e01578febe5804785f0f089619e0ec5">2.点击「Add new global MCP server」添加一个高德 MCP Server <b>并填入刚才获取的 Key</b>。配置代码如下：</div><div class="notion-text notion-block-1e01578febe58017964fce077af47972">3.返回 Cursor 设置界面查看 MCP 服务工具状态，绿点则说明 MCP 服务正常工作。</div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-1e01578febe58030aeccf81090f703ee"><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%3A222ebace-b25e-4b5e-834b-22cc085b1e17%3Aimage.png?table=block&amp;id=1e01578f-ebe5-8030-aecc-f81090f703ee&amp;t=1e01578f-ebe5-8030-aecc-f81090f703ee" alt="notion image" loading="lazy" decoding="async"/></div></figure><div class="notion-text notion-block-1e01578febe5806685b7cf0b192d3440">4.将模型交互模式改为「Agent」</div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-1e01578febe580a2b29aee535f7466dd"><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%3Aea548a58-4f62-442f-82ca-7f52e01a1c91%3Aimage.png?table=block&amp;id=1e01578f-ebe5-80a2-b29a-ee535f7466dd&amp;t=1e01578f-ebe5-80a2-b29a-ee535f7466dd" alt="notion image" loading="lazy" decoding="async"/></div></figure><div class="notion-text notion-block-1e01578febe580bd9dcacbbcacad5086">5.全部准备完成！接下来就可以尽情玩耍了！👏 甩一份大连一日游攻略～</div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-1e01578febe5804c86a3fcbec5024c8a"><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%3A128fb237-0678-425e-9bcc-916e17bf9aae%3Aimage.png?table=block&amp;id=1e01578f-ebe5-804c-86a3-fcbec5024c8a&amp;t=1e01578f-ebe5-804c-86a3-fcbec5024c8a" alt="notion image" loading="lazy" decoding="async"/></div></figure><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-1e01578febe5807286b2ce102435f2f6"><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%3A86bbd42e-5513-4f70-aa91-a7b965475c2d%3Aimage.png?table=block&amp;id=1e01578f-ebe5-8072-86b2-ce102435f2f6&amp;t=1e01578f-ebe5-8072-86b2-ce102435f2f6" alt="notion image" loading="lazy" decoding="async"/></div></figure><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-1e01578febe580c3b400f5935ae8c750"><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%3Aed38a755-8ae1-4dac-bf03-a66fec49aed2%3Aimage.png?table=block&amp;id=1e01578f-ebe5-80c3-b400-f5935ae8c750&amp;t=1e01578f-ebe5-80c3-b400-f5935ae8c750" alt="notion image" loading="lazy" decoding="async"/></div></figure><div class="notion-blank notion-block-1e01578febe580dca5a7f78dfe5c89ac"> </div></main></div>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[谷歌插件开发流程]]></title>
            <link>https://looseli.top//article/chrome-extension</link>
            <guid>https://looseli.top//article/chrome-extension</guid>
            <pubDate>Wed, 11 Sep 2024 00:00:00 GMT</pubDate>
            <description><![CDATA[谷歌插件的开发流程以及v2转v3标准]]></description>
            <content:encoded><![CDATA[<div id="notion-article" class="mx-auto overflow-hidden "><main class="notion light-mode notion-page notion-block-1de1578febe5809991a7c818a14d061a"><div class="notion-viewport"></div><div class="notion-collection-page-properties"></div><h4 class="notion-h notion-h3 notion-h-indent-0 notion-block-1de1578febe5814799f7d2849049a959" data-id="1de1578febe5814799f7d2849049a959"><span><div id="1de1578febe5814799f7d2849049a959" class="notion-header-anchor"></div><a class="notion-hash-link" href="#1de1578febe5814799f7d2849049a959" title="Chrome插件介绍及工作原理"><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">Chrome插件介绍及工作原理</span></span></h4><div class="notion-text notion-block-1de1578febe581a7b2f8d5d84944e840">chrome插件是一个用Web技术开发，用来增强浏览器功能的软件。它其实就是一个由html、css、js、图片等资源组成的.crx后缀压缩包。chrome插件运行在独立的沙箱执行环境中，并与chrome浏览器进行交互。</div><h4 class="notion-h notion-h3 notion-h-indent-0 notion-block-1de1578febe581b38198e18b37d48931" data-id="1de1578febe581b38198e18b37d48931"><span><div id="1de1578febe581b38198e18b37d48931" class="notion-header-anchor"></div><a class="notion-hash-link" href="#1de1578febe581b38198e18b37d48931" 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-1de1578febe58196a401fffe5c91a58f"><li>创建文件夹并在<b><span class="notion-inline-underscore">根目录</span></b>下新建manifest.json配置文件(必须)，并写入以下几行代码：</li></ul><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-1de1578febe5810dbae6d423cd4930f4"><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/https%3A%2F%2Fprod-files-secure.s3.us-west-2.amazonaws.com%2Fee968665-38dc-4608-9c49-cee2aadd64d9%2F7d185200-1267-4126-b05d-c066835a0d8e%2Fimage.png?table=block&amp;id=1de1578f-ebe5-810d-bae6-d423cd4930f4&amp;t=1de1578f-ebe5-810d-bae6-d423cd4930f4&amp;width=2492&amp;cache=v2" alt="notion image" loading="lazy" decoding="async"/></div></figure><ul class="notion-list notion-list-disc notion-block-1de1578febe581428f35d9269395a3c8"><li>在谷歌浏览器中输入<code class="notion-inline-code">chrome://extensions/</code> 打开扩展程序页面并开启开发者模式，加载已解压的扩展程序，选择刚才创建的文件夹即可成功加载该插件了</li></ul><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-1de1578febe581efbf47ebe947604844"><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/https%3A%2F%2Fprod-files-secure.s3.us-west-2.amazonaws.com%2Fee968665-38dc-4608-9c49-cee2aadd64d9%2F61e2f194-cfcd-4a00-b278-2d275ebaf97b%2Fimage.png?table=block&amp;id=1de1578f-ebe5-81ef-bf47-ebe947604844&amp;t=1de1578f-ebe5-81ef-bf47-ebe947604844&amp;width=3024&amp;cache=v2" alt="notion image" loading="lazy" decoding="async"/></div></figure><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-1de1578febe581e89b0bfdcc98e8690f"><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/https%3A%2F%2Fprod-files-secure.s3.us-west-2.amazonaws.com%2Fee968665-38dc-4608-9c49-cee2aadd64d9%2F8a0422a0-949d-4343-981e-bef941f4b030%2Fimage.png?table=block&amp;id=1de1578f-ebe5-81e8-9b0b-fdcc98e8690f&amp;t=1de1578f-ebe5-81e8-9b0b-fdcc98e8690f&amp;width=708&amp;cache=v2" alt="notion image" loading="lazy" decoding="async"/></div></figure><div class="notion-blank notion-block-1de1578febe581a2b03fe9184852f42c"> </div></main></div>]]></content:encoded>
        </item>
    </channel>
</rss>