github https://www.e-learn.cn/tag/github zh-hans YOLOv5来了 https://www.e-learn.cn/topic/4120843 <span>YOLOv5来了</span> <span><span lang="" about="/user/101" typeof="schema:Person" property="schema:name" datatype="">老子叫甜甜</span></span> <span>2021-02-20 19:41:03</span> <div class="field field--name-body field--type-text-with-summary field--label-hidden field--item"> <div class="rich_media_content" id="js_content"> <section data-tool="mdnice编辑器" data-website="https://www.mdnice.com" style="font-size: 16px;color: black;padding-right: 10px;padding-left: 10px;line-height: 1.6;letter-spacing: 0px;word-break: break-word;overflow-wrap: break-word;text-align: left;font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &quot;PingFang SC&quot;, Cambria, Cochin, Georgia, Times, &quot;Times New Roman&quot;, serif;margin-top: -10px;"><span id="OSC_h3_1"></span> <h3 data-tool="mdnice编辑器" style="margin-top: 30px;margin-bottom: 15px;font-weight: bold;font-size: 20px;"><span style="display: none;"></span><span>软硬件环境</span><span style="display: none;"></span></h3> <ul data-tool="mdnice编辑器" style="margin-top: 8px;margin-bottom: 8px;padding-left: 25px;" class="list-paddingleft-2"><li> <section style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);"> ubuntu 18.04 64bit </section></li> <li> <section style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);"> anaconda with 3.7 </section></li> <li> <section style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);"> nvidia gtx 1070Ti </section></li> <li> <section style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);"> cuda 10.1 </section></li> <li> <section style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);"> pytorch 1.5 </section></li> <li> <section style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);"> YOLOv5 </section></li> </ul><span id="OSC_h3_2"></span> <h3 data-tool="mdnice编辑器" style="margin-top: 30px;margin-bottom: 15px;font-weight: bold;font-size: 20px;"><span style="display: none;"></span><span>前言</span><span style="display: none;"></span></h3> <p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;line-height: 26px;"><code style="font-size: 14px;overflow-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">YOLOv4</code>还没有退热,<code style="font-size: 14px;overflow-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">YOLOv5</code>就已经来了!</p> <p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;line-height: 26px;">6月9日,<code style="font-size: 14px;overflow-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">Ultralytics</code>公司开源了<code style="font-size: 14px;overflow-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">YOLOv5</code>,离上一次<code style="font-size: 14px;overflow-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">YOLOv4</code>发布不到50天,不过这一次的<code style="font-size: 14px;overflow-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">YOLOv5</code>是基于<code style="font-size: 14px;overflow-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">PyTorch</code>实现的,而不是之前版本的<code style="font-size: 14px;overflow-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">darknet</code>!</p> <p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;line-height: 26px;">根据官方给出的数字,<code style="font-size: 14px;overflow-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">YOLOv5</code>的速度最快可以达到每秒140帧(<code style="font-size: 14px;overflow-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">FPS</code>),但是权重文件只有<code style="font-size: 14px;overflow-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">YOLOv4</code>的1/9,而且准确度更高。本次的发布的<code style="font-size: 14px;overflow-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">YOLOv5</code>并不是一个单独的模型,而是一个模型家族,包括了<code style="font-size: 14px;overflow-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">YOLOv5s</code>、<code style="font-size: 14px;overflow-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">YOLOv5m</code>、<code style="font-size: 14px;overflow-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">YOLOv5l</code>、<code style="font-size: 14px;overflow-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">YOLOv5x</code>,要求<code style="font-size: 14px;overflow-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">Python</code> 3.7和<code style="font-size: 14px;overflow-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">PyTorch</code> 1.5以上版本。</p> <p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;line-height: 26px;">关于<code style="font-size: 14px;overflow-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">YOLOv5</code>这个版本,大家可以看看知乎中的讨论,链接放在文末的参考资料中</p> <span id="OSC_h3_3"></span> <h3 data-tool="mdnice编辑器" style="margin-top: 30px;margin-bottom: 15px;font-weight: bold;font-size: 20px;"><span style="display: none;"></span><span>安装GPU环境</span><span style="display: none;"></span></h3> <p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;line-height: 26px;">请参考之前的文章</p> <ul data-tool="mdnice编辑器" style="margin-top: 8px;margin-bottom: 8px;padding-left: 25px;" class="list-paddingleft-2"><li> <section style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);"> ubuntu安装cuda </section></li> <li> <section style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);"> windows 10安装cuda和cudnn </section></li> </ul><span id="OSC_h3_4"></span> <h3 data-tool="mdnice编辑器" style="margin-top: 30px;margin-bottom: 15px;font-weight: bold;font-size: 20px;"><span style="display: none;"></span><span>安装pytorch的GPU版本</span><span style="display: none;"></span></h3> <p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;line-height: 26px;">来到官网 https://pytorch.org/get-started/locally/,根据自己的环境,进行选择,网站会给出相应的安装命令。我这里的环境是<code style="font-size: 14px;overflow-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">linux</code>、<code style="font-size: 14px;overflow-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">pip</code>、<code style="font-size: 14px;overflow-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">cuda 10.1</code></p> <p style="text-align: center;"><img class="rich_pages js_insertlocalimg b-lazy" data-ratio="0.4234375" data-s="300,640" data-type="png" data-w="1280" style="" data-src="https://oscimg.oschina.net/oscnet/e2b726cd-95c3-44d9-959f-0e9290a41b98.png" data-original="https://oscimg.oschina.net/oscnet/e2b726cd-95c3-44d9-959f-0e9290a41b98.png" src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" /></p> <section class="code-snippet__fix code-snippet__js"><pre class="code-snippet__js" data-lang=""><code style=" white-space:pre-wrap;border-radius: 0px;display: flex; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; "><span class="code-snippet_outer" style="line-height: 26px;">conda create -n pytorch python=3.7</span></code><code style=" white-space:pre-wrap;border-radius: 0px;display: flex; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; "><span class="code-snippet_outer" style="line-height: 26px;">conda activate pytorch</span></code><code style=" white-space:pre-wrap;border-radius: 0px;display: flex; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; "><span class="code-snippet_outer" style="line-height: 26px;">pip install torch==1.5.0+cu101 torchvision==0.6.0+cu101 -f https://download.pytorch.org/whl/torch_stable.html</span></code><code style=" white-space:pre-wrap;border-radius: 0px;display: flex; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; "><span class="code-snippet_outer" style="line-height: 26px;">pip install ipython</span></code></pre> </section><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;line-height: 26px;">安装完<code style="font-size: 14px;overflow-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">pytorch</code>后,我们在<code style="font-size: 14px;overflow-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">ipython</code>中查看安装的结果</p> <section class="code-snippet__fix code-snippet__js"><pre class="code-snippet__js" data-lang=""><code style=" white-space:pre-wrap;border-radius: 0px;display: flex; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; "><span class="code-snippet_outer" style="line-height: 26px;">(pytorch) xugaoxiang@1070Ti:~/Works/github/yolov5$ ipython</span></code><code style=" white-space:pre-wrap;border-radius: 0px;display: flex; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; "><span class="code-snippet_outer" style="line-height: 26px;">Python 3.7.7 (default, May 7 2020, 21:25:33)</span></code><code style=" white-space:pre-wrap;border-radius: 0px;display: flex; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; "><span class="code-snippet_outer" style="line-height: 26px;">Type 'copyright', 'credits' or 'license' for more information</span></code><code style=" white-space:pre-wrap;border-radius: 0px;display: flex; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; "><span class="code-snippet_outer" style="line-height: 26px;">IPython 7.15.0 -- An enhanced Interactive Python. Type '?' for help.</span></code><code style=" white-space:pre-wrap;border-radius: 0px;display: flex; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; "><span class="code-snippet_outer"><br /></span></code><code style=" white-space:pre-wrap;border-radius: 0px;display: flex; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; "><span class="code-snippet_outer" style="line-height: 26px;">In [1]: import torch</span></code><code style=" white-space:pre-wrap;border-radius: 0px;display: flex; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; "><span class="code-snippet_outer"><br /></span></code><code style=" white-space:pre-wrap;border-radius: 0px;display: flex; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; "><span class="code-snippet_outer" style="line-height: 26px;">In [2]: torch.cuda.is_available()</span></code><code style=" white-space:pre-wrap;border-radius: 0px;display: flex; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; "><span class="code-snippet_outer" style="line-height: 26px;">Out[2]: True</span></code></pre> </section><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;line-height: 26px;">说明<code style="font-size: 14px;overflow-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">GPU</code>版本的<code style="font-size: 14px;overflow-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">pytorch</code>安装成功</p> <span id="OSC_h3_5"></span> <h3 data-tool="mdnice编辑器" style="margin-top: 30px;margin-bottom: 15px;font-weight: bold;font-size: 20px;"><span style="display: none;"></span><span>YOLOv5测试</span><span style="display: none;"></span></h3> <p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;line-height: 26px;">首先还是把源码<code style="font-size: 14px;overflow-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">clone</code>到本地</p> <section class="code-snippet__fix code-snippet__js"><pre class="code-snippet__js" data-lang=""><code style=" white-space:pre-wrap;border-radius: 0px;display: flex; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; "><span class="code-snippet_outer" style="line-height: 26px;">git clone https://github.com/ultralytics/yolov5.git</span></code><code style=" white-space:pre-wrap;border-radius: 0px;display: flex; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; "><span class="code-snippet_outer" style="line-height: 26px;">pip install -U -r requirements.txt</span></code></pre> </section><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;line-height: 26px;">接下来到站点https://drive.google.com/drive/folders/1Drs_Aiu7xx6S-ix95f9kNsA6ueKRpN2J或者CSDN下载频道下载权重文件,权重文件保存在<code style="font-size: 14px;overflow-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">weights</code>文件夹下</p> <p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;line-height: 26px;">下面就可以开始测试了</p> <p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;line-height: 26px;">首先使用项目中自带的测试图片看看效果,命令是</p> <section class="code-snippet__fix code-snippet__js"><pre class="code-snippet__js" data-lang=""><code style=" white-space:pre-wrap;border-radius: 0px;display: flex; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; "><span class="code-snippet_outer" style="line-height: 26px;">python detect.py</span></code></pre> </section><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;line-height: 26px;">默认情况下,脚本会去读取<code style="font-size: 14px;overflow-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">inference/images</code>下的所有图片并进行目标检测,带有目标框的结果图片保存在<code style="font-size: 14px;overflow-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">inference/out</code>下。如果是只检测某一张图片的话,可以执行命令<code style="font-size: 14px;overflow-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">python detect.py --source test.jpg</code></p> <p style="text-align: center;"><img class="rich_pages js_insertlocalimg b-lazy" data-ratio="1.3333333333333333" data-s="300,640" data-type="jpeg" data-w="810" style="" data-src="https://oscimg.oschina.net/oscnet/696f6c85-8bd1-4def-b361-587df8165f18.jpg" data-original="https://oscimg.oschina.net/oscnet/696f6c85-8bd1-4def-b361-587df8165f18.jpg" src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" /></p> <p style="text-align: center;"><img class="rich_pages js_insertlocalimg b-lazy" data-ratio="0.5625" data-s="300,640" data-type="jpeg" data-w="1280" style="" data-src="https://oscimg.oschina.net/oscnet/6470a21f-bfda-46c1-b145-4d56fc6e5c72.jpg" data-original="https://oscimg.oschina.net/oscnet/6470a21f-bfda-46c1-b145-4d56fc6e5c72.jpg" src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" /></p> <p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;line-height: 26px;">为了对比测试,我们把<code style="font-size: 14px;overflow-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">YOLO</code>之前版本的测试图片也跑了一遍</p> <p style="text-align: center;"><img class="rich_pages js_insertlocalimg b-lazy" data-ratio="0.6623544631306598" data-s="300,640" data-type="jpeg" data-w="773" style="" data-src="https://oscimg.oschina.net/oscnet/18aba203-6a11-4f73-8c81-07bb4a8ea9c9.jpg" data-original="https://oscimg.oschina.net/oscnet/18aba203-6a11-4f73-8c81-07bb4a8ea9c9.jpg" src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" /></p> <p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;line-height: 26px;">上图中马匹的检出率跟<code style="font-size: 14px;overflow-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">YOLOv4</code>是一样的,满意</p> <p style="text-align: center;"><img class="rich_pages js_insertlocalimg b-lazy" data-ratio="0.75" data-s="300,640" data-type="jpeg" data-w="768" style="" data-src="https://oscimg.oschina.net/oscnet/be1cadb7-056c-4225-b98c-348dbefeeaa5.jpg" data-original="https://oscimg.oschina.net/oscnet/be1cadb7-056c-4225-b98c-348dbefeeaa5.jpg" src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" /></p> <p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;line-height: 26px;">上图中右上角的垃圾桶没有被检出,这点不及<code style="font-size: 14px;overflow-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">YOLOv4</code></p> <p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;line-height: 26px;"><code style="font-size: 14px;overflow-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">detect.py</code>脚本同样支持视频的检测,包括本地摄像头、本地视频文件、<code style="font-size: 14px;overflow-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">m3u8</code>播放地址和<code style="font-size: 14px;overflow-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">rtsp</code>实时流,地址都是跟在参数<code style="font-size: 14px;overflow-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">--source</code>后面</p> <p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;line-height: 26px;">本地摄像头使用下面的命令</p> <section class="code-snippet__fix code-snippet__js"><pre class="code-snippet__js" data-lang=""><code style=" white-space:pre-wrap;border-radius: 0px;display: flex; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; "><span class="code-snippet_outer" style="line-height: 26px;">python detect.py --source 0</span></code></pre> </section><p style="text-align: center;"><img class="rich_pages js_insertlocalimg b-lazy" data-ratio="0.5625" data-s="300,640" data-type="png" data-w="1152" style="" data-src="https://oscimg.oschina.net/oscnet/5ab4a0df-b525-4728-965b-f58c0359dda6.png" data-original="https://oscimg.oschina.net/oscnet/5ab4a0df-b525-4728-965b-f58c0359dda6.png" src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" /></p> <section class="code-snippet__fix code-snippet__js"><pre class="code-snippet__js" data-lang=""><code style=" white-space:pre-wrap;border-radius: 0px;display: flex; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; "><span class="code-snippet_outer" style="line-height: 26px;">python detect.py --source "rtsp://user:password@192.168.1.100:554/cam/realmonitor?channel=1&amp;subtype=1"</span></code></pre> </section><p style="text-align: center;"><img class="rich_pages js_insertlocalimg b-lazy" data-ratio="0.5605504587155963" data-s="300,640" data-type="png" data-w="1090" style="" data-src="https://oscimg.oschina.net/oscnet/f3f90f49-584b-4ee0-b4ac-ebe4fc72851c.png" data-original="https://oscimg.oschina.net/oscnet/f3f90f49-584b-4ee0-b4ac-ebe4fc72851c.png" src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" /></p> <p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;line-height: 26px;">可以看到,使用<code style="font-size: 14px;overflow-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">1070Ti</code>显卡,<code style="font-size: 14px;overflow-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">fps</code>在80左右</p> <p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;line-height: 26px;">如果你有多块显卡,可以选择具体使用哪块显示进行检测,0表示第一块,1表示第二块,<code style="font-size: 14px;overflow-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">cpu</code>表示不使用<code style="font-size: 14px;overflow-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">gpu</code></p> <section class="code-snippet__fix code-snippet__js"><pre class="code-snippet__js" data-lang=""><code style=" white-space:pre-wrap;border-radius: 0px;display: flex; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; "><span class="code-snippet_outer" style="line-height: 26px;">python detect.py --device 0</span></code></pre> </section><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;line-height: 26px;"><code style="font-size: 14px;overflow-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">detect.py</code>中的参数很多,可以使用<code style="font-size: 14px;overflow-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">python detect.py -h</code>进行查看</p> <section class="code-snippet__fix code-snippet__js"><pre class="code-snippet__js" data-lang=""><code style=" white-space:pre-wrap;border-radius: 0px;display: flex; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; "><span class="code-snippet_outer" style="line-height: 26px;">(base) xugaoxiang@1070Ti:~/Works/github/yolov5$ python detect.py -h</span></code><code style=" white-space:pre-wrap;border-radius: 0px;display: flex; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; "><span class="code-snippet_outer" style="line-height: 26px;">usage: detect.py [-h] [--weights WEIGHTS] [--source SOURCE] [--output OUTPUT]</span></code><code style=" white-space:pre-wrap;border-radius: 0px;display: flex; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; "><span class="code-snippet_outer" style="line-height: 26px;"> [--img-size IMG_SIZE] [--conf-thres CONF_THRES]</span></code><code style=" white-space:pre-wrap;border-radius: 0px;display: flex; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; "><span class="code-snippet_outer" style="line-height: 26px;"> [--iou-thres IOU_THRES] [--fourcc FOURCC] [--device DEVICE]</span></code><code style=" white-space:pre-wrap;border-radius: 0px;display: flex; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; "><span class="code-snippet_outer" style="line-height: 26px;"> [--view-img] [--save-txt] [--classes CLASSES [CLASSES ...]]</span></code><code style=" white-space:pre-wrap;border-radius: 0px;display: flex; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; "><span class="code-snippet_outer" style="line-height: 26px;"> [--agnostic-nms] [--augment]</span></code><code style=" white-space:pre-wrap;border-radius: 0px;display: flex; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; "><span class="code-snippet_outer"><br /></span></code><code style=" white-space:pre-wrap;border-radius: 0px;display: flex; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; "><span class="code-snippet_outer" style="line-height: 26px;">optional arguments:</span></code><code style=" white-space:pre-wrap;border-radius: 0px;display: flex; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; "><span class="code-snippet_outer" style="line-height: 26px;"> -h, --help show this help message and exit</span></code><code style=" white-space:pre-wrap;border-radius: 0px;display: flex; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; "><span class="code-snippet_outer" style="line-height: 26px;"> --weights WEIGHTS model.pt path</span></code><code style=" white-space:pre-wrap;border-radius: 0px;display: flex; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; "><span class="code-snippet_outer" style="line-height: 26px;"> --source SOURCE source</span></code><code style=" white-space:pre-wrap;border-radius: 0px;display: flex; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; "><span class="code-snippet_outer" style="line-height: 26px;"> --output OUTPUT output folder</span></code><code style=" white-space:pre-wrap;border-radius: 0px;display: flex; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; "><span class="code-snippet_outer" style="line-height: 26px;"> --img-size IMG_SIZE inference size (pixels)</span></code><code style=" white-space:pre-wrap;border-radius: 0px;display: flex; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; "><span class="code-snippet_outer" style="line-height: 26px;"> --conf-thres CONF_THRES</span></code><code style=" white-space:pre-wrap;border-radius: 0px;display: flex; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; "><span class="code-snippet_outer" style="line-height: 26px;"> object confidence threshold</span></code><code style=" white-space:pre-wrap;border-radius: 0px;display: flex; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; "><span class="code-snippet_outer" style="line-height: 26px;"> --iou-thres IOU_THRES</span></code><code style=" white-space:pre-wrap;border-radius: 0px;display: flex; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; "><span class="code-snippet_outer" style="line-height: 26px;"> IOU threshold for NMS</span></code><code style=" white-space:pre-wrap;border-radius: 0px;display: flex; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; "><span class="code-snippet_outer" style="line-height: 26px;"> --fourcc FOURCC output video codec (verify ffmpeg support)</span></code><code style=" white-space:pre-wrap;border-radius: 0px;display: flex; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; "><span class="code-snippet_outer" style="line-height: 26px;"> --device DEVICE cuda device, i.e. 0 or 0,1,2,3 or cpu</span></code><code style=" white-space:pre-wrap;border-radius: 0px;display: flex; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; "><span class="code-snippet_outer" style="line-height: 26px;"> --view-img display results</span></code><code style=" white-space:pre-wrap;border-radius: 0px;display: flex; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; "><span class="code-snippet_outer" style="line-height: 26px;"> --save-txt save results to *.txt</span></code><code style=" white-space:pre-wrap;border-radius: 0px;display: flex; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; "><span class="code-snippet_outer" style="line-height: 26px;"> --classes CLASSES [CLASSES ...]</span></code><code style=" white-space:pre-wrap;border-radius: 0px;display: flex; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; "><span class="code-snippet_outer" style="line-height: 26px;"> filter by class</span></code><code style=" white-space:pre-wrap;border-radius: 0px;display: flex; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; "><span class="code-snippet_outer" style="line-height: 26px;"> --agnostic-nms class-agnostic NMS</span></code><code style=" white-space:pre-wrap;border-radius: 0px;display: flex; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; "><span class="code-snippet_outer" style="line-height: 26px;"> --augment augmented inference</span></code><code style=" white-space:pre-wrap;border-radius: 0px;display: flex; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; "><span class="code-snippet_outer"><br /></span></code></pre> </section><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;line-height: 26px;">以上测试都是基于<code style="font-size: 14px;overflow-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">yolov5s.pt</code>权重文件,其它的权重请自行测试,指定<code style="font-size: 14px;overflow-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">--weights</code>参数</p> <span id="OSC_h3_6"></span> <h3 data-tool="mdnice编辑器" style="margin-top: 30px;margin-bottom: 15px;font-weight: bold;font-size: 20px;"><span style="display: none;"></span><span>参考资料</span><span style="display: none;"></span></h3> <ul data-tool="mdnice编辑器" style="margin-top: 8px;margin-bottom: 8px;padding-left: 25px;" class="list-paddingleft-2"><li> <section style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);"> https://github.com/ultralytics/yolov5 </section></li> <li> <section style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);"> https://github.com/AlexeyAB/darknet </section></li> <li> <section style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);"> https://www.zhihu.com/question/399884529 </section></li> </ul></section><p><br /></p> </div> <p style="color: #858585; font-size: 13px;">本文分享自微信公众号 - 迷途小书童的Note(Dev_Club)。<br />如有侵权,请联系 support@oschina.cn 删除。<br />本文参与“<a href="https://www.oschina.net/sharing-plan" target="_blank" rel="nofollow">OSC源创计划</a>”,欢迎正在阅读的你也加入,一起分享。</p> <div class="alert alert-success" role="alert"><p>来源:<code>oschina</code></p><p>链接:<code>https://my.oschina.net/u/4883419/blog/4832222</code></p></div></div> <div class="field field--name-field-tags field--type-entity-reference field--label-above"> <div class="field--label">标签</div> <div class="field--items"> <div class="field--item"><a href="/tag/cuda" hreflang="zh-hans">cuda</a></div> <div class="field--item"><a href="/tag/pytorch" hreflang="zh-hans">pytorch</a></div> <div class="field--item"><a href="/tag/github" hreflang="zh-hans">github</a></div> <div class="field--item"><a href="/tag/ubuntu" hreflang="zh-hans">Ubuntu</a></div> <div class="field--item"><a href="/tag/anaconda" hreflang="zh-hans">Anaconda</a></div> <div class="field--item"><a href="/tag/darknet" hreflang="zh-hans">darknet</a></div> </div> </div> Sat, 20 Feb 2021 11:41:03 +0000 老子叫甜甜 4120843 at https://www.e-learn.cn How to remove “too large” file from git history? https://www.e-learn.cn/topic/4120657 <span>How to remove “too large” file from git history?</span> <span><span lang="" about="/user/54" typeof="schema:Person" property="schema:name" datatype="">↘锁芯ラ</span></span> <span>2021-02-20 18:50:09</span> <div class="field field--name-body field--type-text-with-summary field--label-hidden field--item"><h3>问题</h3><br /><p>I added a 212MB file to my folder and committed it and tried to push it. Git told me that the file size was too big so I can't push it. I deleted the file, but it is still shown when I try to push my code. </p> <p>My actual steps were:</p> <ol><li><p>I did <code>git add .</code></p></li> <li><p>Then <code>git commit -m "New css"</code></p></li> <li><p>Then <code>git push origin development</code></p></li> <li><p>Then it took a long time to run the above command. It ended with saying "path/to/file/file.mp4 is 212MB which is too big. Failed to push".</p></li> <li><p>Then I deleted that file manually.</p></li> <li><p>Tried pushing again, same problem.</p></li> </ol><p>I was told by other stackoverflow answers to use <code>git filter-branch --tree-filter 'rm -rf path/to/your/file' HEAD</code></p> <p>I'm just trying to understand what this means. Will this affect my whole repo or just the above mentioned file? What happens if I manually deleted the file already? So the file path doesn't exist. </p> <p>For example, since I tried pushing to the development branch, I did <code>git push origin development</code>. This failed, so assuming the file I'm trying to delete is named Testing.mp4, should this be the code:</p> <p><code>git filter-branch --tree-filter 'rm -rf public/uploads/videos/testing.mp4' HEAD</code></p> <p>Am I right? Again, this will ONLY delete the video and nothing else?</p> <p><strong>Thanks a lot for the help</strong></p> <br /><h3>回答1:</h3><br /><p>deleting the file from filesystem won't necessary mean removing it from git if it was previously added to the index (git add path/to/file), but just record a delete operation.</p> <p>Depending on what you did previousy, git may be trying to push your various actions in order : add the file first (which fail due to file size) then delete it.</p> <p>To actually stop tracking this file you could try to remove it from index : git rm --cached path/to/file</p> <p>Remember later to always "git rm" a problematic file rather than simply deleting it, git rm will delete the file AND remove it from index at the same time.</p> <p>A good expanation from manojlds lies here : "git rm --cached x" vs "git reset head -- x"?</p> <p>Greetings</p> <br /><br /><br /><h3>回答2:</h3><br /><p>your project contain files with size larger than 100MB, you can remove these large files using BFG Repo-Cleaner before putting to github.</p> <p>There is a tutorial about How to solve Github import error: "We found an error during import". Remember to backup your project source code and git database.</p> <p>Dowload BFG, clone your repository with <code>--mirror</code> flag and just run:</p> <pre><code>java -jar bfg-1.13.0.jar --no-blob-protection --strip-blobs-bigger-than 100M your-repo.git cd your-repo.git git reflog expire --expire=now --all &amp;&amp; git gc --prune=now --aggressive git push </code></pre> <br /><br /><p>来源:<code>https://stackoverflow.com/questions/45135185/how-to-remove-too-large-file-from-git-history</code></p></div> <div class="field field--name-field-tags field--type-entity-reference field--label-above"> <div class="field--label">标签</div> <div class="field--items"> <div class="field--item"><a href="/tag/git" hreflang="zh-hans">git</a></div> <div class="field--item"><a href="/tag/github" hreflang="zh-hans">github</a></div> </div> </div> Sat, 20 Feb 2021 10:50:09 +0000 ↘锁芯ラ 4120657 at https://www.e-learn.cn .gitattributes merge strategy not working https://www.e-learn.cn/topic/4120620 <span>.gitattributes merge strategy not working</span> <span><span lang="" about="/user/211" typeof="schema:Person" property="schema:name" datatype="">夙愿已清</span></span> <span>2021-02-20 18:23:50</span> <div class="field field--name-body field--type-text-with-summary field--label-hidden field--item"><h3>问题</h3><br /><p>I'm using a merge strategy in .gitattributes to preserve files during merges. I also used <code>git config --global merge.ours.driver true;</code> to set the driver in my config (I checked the config for <code>[merge "ours"] driver = true</code> and it is there).</p> <p>My merge strategy is set correctly:</p> <pre><code>src/public/bundle.js merge=ours src/public/main.min.css merge=ours server/middlewares/https_redirect.js merge=ours </code></pre> <p>Yet when I merge, I am still getting the files from the branch being merged.</p> <p>What could I be doing wrong? </p> <br /><h3>回答1:</h3><br /><h3>What you need is a custom "merge strategy"</h3> <p>See git: How do I add a custom merge strategy? (Edit to add: writing a merge strategy handler is much harder than writing a custom merge driver. But it's the only way to get the behavior I believe you want.)</p> <h3>What you have is a custom merge driver</h3> <p>Your setup does seem correct (albeit a bit "cheat-y", using <code>/bin/true</code> or the shell built in equivalent to just leave the <code>%A</code> file alone and exit successfully :-) ). But I suspect you're running afoul of the usual problem, which is:</p> <p><strong>Git only invokes a three-way merge driver if there are <em>two diffs to combine.</em></strong></p> <p>That is, assume we're actually doing a three-way merge. This means there is a merge base version of some file, such as <code>src/public/bundle.js</code>, since there is a merge-base commit that differs from the two branch tip commits. We're on some branch, whose tip commit is <code>1111111</code>, and we're merging some other commit whose hash ID is <code>2222222</code> and <code>git merge-base 1111111 2222222</code> is <code>bbbbbbb</code>. Hence Git has done <code>git diff bbbbbbb 1111111</code> to get the change from base to ours, and <code>git diff bbbbbbb 2222222</code> to get the change from base to theirs.</p> <p>The base version of <code>src/public/bundle.js</code> is the one in commit <code>bbbbbbb</code>. But, maybe the diff from <code>bbbbbbb:src/public/bundle.js</code> to <code>1111111:src/public/bundle.js</code> is <em>empty</em>, while the diff from <code>bbbbbbb:src/public/bundle.js</code> to <code>2222222:src/public/bundle.js</code> is <em>non-empty</em>.</p> <p>In this case, Git <em>doesn't</em> do a three-way merge of the file. It doesn't have to, so it doesn't bother. It never invokes your custom merge driver at all; it just grabs the <code>2222222</code> version of the file and says "I'm done, all merged!"</p> <p>This is true whether you let Git use its own built-in merge code, or specify a custom driver: it never bothers <em>invoking</em> the merge code at all when it can—or thinks it can—get away without doing a merge at all. It just takes the one changed version and calls it good.</p> <p>(Personally, I think this is wrong / a bug, but Git has done it this way for many years, and the Git folks seem not inclined to change it.)</p> <br /><br /><p>来源:<code>https://stackoverflow.com/questions/41640602/gitattributes-merge-strategy-not-working</code></p></div> <div class="field field--name-field-tags field--type-entity-reference field--label-above"> <div class="field--label">标签</div> <div class="field--items"> <div class="field--item"><a href="/tag/git" hreflang="zh-hans">git</a></div> <div class="field--item"><a href="/tag/github" hreflang="zh-hans">github</a></div> <div class="field--item"><a href="/tag/git-merge" hreflang="zh-hans">git-merge</a></div> </div> </div> Sat, 20 Feb 2021 10:23:50 +0000 夙愿已清 4120620 at https://www.e-learn.cn .gitattributes merge strategy not working https://www.e-learn.cn/topic/4120619 <span>.gitattributes merge strategy not working</span> <span><span lang="" about="/user/114" typeof="schema:Person" property="schema:name" datatype="">﹥>﹥吖頭↗</span></span> <span>2021-02-20 18:22:47</span> <div class="field field--name-body field--type-text-with-summary field--label-hidden field--item"><h3>问题</h3><br /><p>I'm using a merge strategy in .gitattributes to preserve files during merges. I also used <code>git config --global merge.ours.driver true;</code> to set the driver in my config (I checked the config for <code>[merge "ours"] driver = true</code> and it is there).</p> <p>My merge strategy is set correctly:</p> <pre><code>src/public/bundle.js merge=ours src/public/main.min.css merge=ours server/middlewares/https_redirect.js merge=ours </code></pre> <p>Yet when I merge, I am still getting the files from the branch being merged.</p> <p>What could I be doing wrong? </p> <br /><h3>回答1:</h3><br /><h3>What you need is a custom "merge strategy"</h3> <p>See git: How do I add a custom merge strategy? (Edit to add: writing a merge strategy handler is much harder than writing a custom merge driver. But it's the only way to get the behavior I believe you want.)</p> <h3>What you have is a custom merge driver</h3> <p>Your setup does seem correct (albeit a bit "cheat-y", using <code>/bin/true</code> or the shell built in equivalent to just leave the <code>%A</code> file alone and exit successfully :-) ). But I suspect you're running afoul of the usual problem, which is:</p> <p><strong>Git only invokes a three-way merge driver if there are <em>two diffs to combine.</em></strong></p> <p>That is, assume we're actually doing a three-way merge. This means there is a merge base version of some file, such as <code>src/public/bundle.js</code>, since there is a merge-base commit that differs from the two branch tip commits. We're on some branch, whose tip commit is <code>1111111</code>, and we're merging some other commit whose hash ID is <code>2222222</code> and <code>git merge-base 1111111 2222222</code> is <code>bbbbbbb</code>. Hence Git has done <code>git diff bbbbbbb 1111111</code> to get the change from base to ours, and <code>git diff bbbbbbb 2222222</code> to get the change from base to theirs.</p> <p>The base version of <code>src/public/bundle.js</code> is the one in commit <code>bbbbbbb</code>. But, maybe the diff from <code>bbbbbbb:src/public/bundle.js</code> to <code>1111111:src/public/bundle.js</code> is <em>empty</em>, while the diff from <code>bbbbbbb:src/public/bundle.js</code> to <code>2222222:src/public/bundle.js</code> is <em>non-empty</em>.</p> <p>In this case, Git <em>doesn't</em> do a three-way merge of the file. It doesn't have to, so it doesn't bother. It never invokes your custom merge driver at all; it just grabs the <code>2222222</code> version of the file and says "I'm done, all merged!"</p> <p>This is true whether you let Git use its own built-in merge code, or specify a custom driver: it never bothers <em>invoking</em> the merge code at all when it can—or thinks it can—get away without doing a merge at all. It just takes the one changed version and calls it good.</p> <p>(Personally, I think this is wrong / a bug, but Git has done it this way for many years, and the Git folks seem not inclined to change it.)</p> <br /><br /><p>来源:<code>https://stackoverflow.com/questions/41640602/gitattributes-merge-strategy-not-working</code></p></div> <div class="field field--name-field-tags field--type-entity-reference field--label-above"> <div class="field--label">标签</div> <div class="field--items"> <div class="field--item"><a href="/tag/git" hreflang="zh-hans">git</a></div> <div class="field--item"><a href="/tag/github" hreflang="zh-hans">github</a></div> <div class="field--item"><a href="/tag/git-merge" hreflang="zh-hans">git-merge</a></div> </div> </div> Sat, 20 Feb 2021 10:22:47 +0000 ﹥>﹥吖頭↗ 4120619 at https://www.e-learn.cn .gitattributes merge strategy not working https://www.e-learn.cn/topic/4120617 <span>.gitattributes merge strategy not working</span> <span><span lang="" about="/user/56" typeof="schema:Person" property="schema:name" datatype="">杀马特。学长 韩版系。学妹</span></span> <span>2021-02-20 18:17:23</span> <div class="field field--name-body field--type-text-with-summary field--label-hidden field--item"><h3>问题</h3><br /><p>I'm using a merge strategy in .gitattributes to preserve files during merges. I also used <code>git config --global merge.ours.driver true;</code> to set the driver in my config (I checked the config for <code>[merge "ours"] driver = true</code> and it is there).</p> <p>My merge strategy is set correctly:</p> <pre><code>src/public/bundle.js merge=ours src/public/main.min.css merge=ours server/middlewares/https_redirect.js merge=ours </code></pre> <p>Yet when I merge, I am still getting the files from the branch being merged.</p> <p>What could I be doing wrong? </p> <br /><h3>回答1:</h3><br /><h3>What you need is a custom "merge strategy"</h3> <p>See git: How do I add a custom merge strategy? (Edit to add: writing a merge strategy handler is much harder than writing a custom merge driver. But it's the only way to get the behavior I believe you want.)</p> <h3>What you have is a custom merge driver</h3> <p>Your setup does seem correct (albeit a bit "cheat-y", using <code>/bin/true</code> or the shell built in equivalent to just leave the <code>%A</code> file alone and exit successfully :-) ). But I suspect you're running afoul of the usual problem, which is:</p> <p><strong>Git only invokes a three-way merge driver if there are <em>two diffs to combine.</em></strong></p> <p>That is, assume we're actually doing a three-way merge. This means there is a merge base version of some file, such as <code>src/public/bundle.js</code>, since there is a merge-base commit that differs from the two branch tip commits. We're on some branch, whose tip commit is <code>1111111</code>, and we're merging some other commit whose hash ID is <code>2222222</code> and <code>git merge-base 1111111 2222222</code> is <code>bbbbbbb</code>. Hence Git has done <code>git diff bbbbbbb 1111111</code> to get the change from base to ours, and <code>git diff bbbbbbb 2222222</code> to get the change from base to theirs.</p> <p>The base version of <code>src/public/bundle.js</code> is the one in commit <code>bbbbbbb</code>. But, maybe the diff from <code>bbbbbbb:src/public/bundle.js</code> to <code>1111111:src/public/bundle.js</code> is <em>empty</em>, while the diff from <code>bbbbbbb:src/public/bundle.js</code> to <code>2222222:src/public/bundle.js</code> is <em>non-empty</em>.</p> <p>In this case, Git <em>doesn't</em> do a three-way merge of the file. It doesn't have to, so it doesn't bother. It never invokes your custom merge driver at all; it just grabs the <code>2222222</code> version of the file and says "I'm done, all merged!"</p> <p>This is true whether you let Git use its own built-in merge code, or specify a custom driver: it never bothers <em>invoking</em> the merge code at all when it can—or thinks it can—get away without doing a merge at all. It just takes the one changed version and calls it good.</p> <p>(Personally, I think this is wrong / a bug, but Git has done it this way for many years, and the Git folks seem not inclined to change it.)</p> <br /><br /><p>来源:<code>https://stackoverflow.com/questions/41640602/gitattributes-merge-strategy-not-working</code></p></div> <div class="field field--name-field-tags field--type-entity-reference field--label-above"> <div class="field--label">标签</div> <div class="field--items"> <div class="field--item"><a href="/tag/git" hreflang="zh-hans">git</a></div> <div class="field--item"><a href="/tag/github" hreflang="zh-hans">github</a></div> <div class="field--item"><a href="/tag/git-merge" hreflang="zh-hans">git-merge</a></div> </div> </div> Sat, 20 Feb 2021 10:17:23 +0000 杀马特。学长 韩版系。学妹 4120617 at https://www.e-learn.cn .gitattributes merge strategy not working https://www.e-learn.cn/topic/4120616 <span>.gitattributes merge strategy not working</span> <span><span lang="" about="/user/237" typeof="schema:Person" property="schema:name" datatype="">北战南征</span></span> <span>2021-02-20 18:16:31</span> <div class="field field--name-body field--type-text-with-summary field--label-hidden field--item"><h3>问题</h3><br /><p>I'm using a merge strategy in .gitattributes to preserve files during merges. I also used <code>git config --global merge.ours.driver true;</code> to set the driver in my config (I checked the config for <code>[merge "ours"] driver = true</code> and it is there).</p> <p>My merge strategy is set correctly:</p> <pre><code>src/public/bundle.js merge=ours src/public/main.min.css merge=ours server/middlewares/https_redirect.js merge=ours </code></pre> <p>Yet when I merge, I am still getting the files from the branch being merged.</p> <p>What could I be doing wrong? </p> <br /><h3>回答1:</h3><br /><h3>What you need is a custom "merge strategy"</h3> <p>See git: How do I add a custom merge strategy? (Edit to add: writing a merge strategy handler is much harder than writing a custom merge driver. But it's the only way to get the behavior I believe you want.)</p> <h3>What you have is a custom merge driver</h3> <p>Your setup does seem correct (albeit a bit "cheat-y", using <code>/bin/true</code> or the shell built in equivalent to just leave the <code>%A</code> file alone and exit successfully :-) ). But I suspect you're running afoul of the usual problem, which is:</p> <p><strong>Git only invokes a three-way merge driver if there are <em>two diffs to combine.</em></strong></p> <p>That is, assume we're actually doing a three-way merge. This means there is a merge base version of some file, such as <code>src/public/bundle.js</code>, since there is a merge-base commit that differs from the two branch tip commits. We're on some branch, whose tip commit is <code>1111111</code>, and we're merging some other commit whose hash ID is <code>2222222</code> and <code>git merge-base 1111111 2222222</code> is <code>bbbbbbb</code>. Hence Git has done <code>git diff bbbbbbb 1111111</code> to get the change from base to ours, and <code>git diff bbbbbbb 2222222</code> to get the change from base to theirs.</p> <p>The base version of <code>src/public/bundle.js</code> is the one in commit <code>bbbbbbb</code>. But, maybe the diff from <code>bbbbbbb:src/public/bundle.js</code> to <code>1111111:src/public/bundle.js</code> is <em>empty</em>, while the diff from <code>bbbbbbb:src/public/bundle.js</code> to <code>2222222:src/public/bundle.js</code> is <em>non-empty</em>.</p> <p>In this case, Git <em>doesn't</em> do a three-way merge of the file. It doesn't have to, so it doesn't bother. It never invokes your custom merge driver at all; it just grabs the <code>2222222</code> version of the file and says "I'm done, all merged!"</p> <p>This is true whether you let Git use its own built-in merge code, or specify a custom driver: it never bothers <em>invoking</em> the merge code at all when it can—or thinks it can—get away without doing a merge at all. It just takes the one changed version and calls it good.</p> <p>(Personally, I think this is wrong / a bug, but Git has done it this way for many years, and the Git folks seem not inclined to change it.)</p> <br /><br /><p>来源:<code>https://stackoverflow.com/questions/41640602/gitattributes-merge-strategy-not-working</code></p></div> <div class="field field--name-field-tags field--type-entity-reference field--label-above"> <div class="field--label">标签</div> <div class="field--items"> <div class="field--item"><a href="/tag/git" hreflang="zh-hans">git</a></div> <div class="field--item"><a href="/tag/github" hreflang="zh-hans">github</a></div> <div class="field--item"><a href="/tag/git-merge" hreflang="zh-hans">git-merge</a></div> </div> </div> Sat, 20 Feb 2021 10:16:31 +0000 北战南征 4120616 at https://www.e-learn.cn #GTD,高效办公利器!帮你节省工作中的每分每秒! https://www.e-learn.cn/topic/4120534 <span>#GTD,高效办公利器!帮你节省工作中的每分每秒!</span> <span><span lang="" about="/user/207" typeof="schema:Person" property="schema:name" datatype="">流过昼夜</span></span> <span>2021-02-20 16:45:08</span> <div class="field field--name-body field--type-text-with-summary field--label-hidden field--item"> <div class="rich_media_content" id="js_content"> <p style="text-align: center;"><img class="rich_pages js_insertlocalimg b-lazy" data-ratio="0.5555555555555556" data-s="300,640" data-type="jpeg" data-w="900" style="" data-src="https://oscimg.oschina.net/oscnet/374899b7-d18a-44a5-8ed9-8ab514673475.jpg" data-original="https://oscimg.oschina.net/oscnet/374899b7-d18a-44a5-8ed9-8ab514673475.jpg" src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" /></p> <p><br /></p> <p><span style="font-size: 24px;"><strong>什么是GTD?</strong></span></p> <p><br /></p> <p>在最早听说GTD,是我在毕业后到深圳一家游戏公司工作,在职场上学到的第一个技能。事实证明,掌握GTD,对于个人办公,提升工作效率,是非常有帮助的。</p> <p><br /></p> <p>据百度百科记载,</p> <blockquote class="js_blockquote_wrap" data-type="2" data-url="" data-author-name="" data-content-utf8-length="55" data-source-title="百度百科"> <section class="js_blockquote_digest"><p>GTD就是Getting Things Done的缩写,意思是“把需要做的事情处理好”,是一个管理时间的方法。</p> </section><section class="blockquote_info js_blockquote_source" data-json="%7B%22type%22%3A%22out%22%2C%22source%22%3A%22url%22%2C%22digest%22%3A%22%3Cp%3EGTD%E5%B0%B1%E6%98%AFGetting%26nbsp%3BThings%26nbsp%3BDone%E7%9A%84%E7%BC%A9%E5%86%99%EF%BC%8C%E6%84%8F%E6%80%9D%E6%98%AF%E2%80%9C%E6%8A%8A%E9%9C%80%E8%A6%81%E5%81%9A%E7%9A%84%E4%BA%8B%E6%83%85%E5%A4%84%E7%90%86%E5%A5%BD%E2%80%9D%EF%BC%8C%E6%98%AF%E4%B8%80%E4%B8%AA%E7%AE%A1%E7%90%86%E6%97%B6%E9%97%B4%E7%9A%84%E6%96%B9%E6%B3%95%E3%80%82%3C%2Fp%3E%22%2C%22digestLen%22%3A55%2C%22text%22%3A%22%22%2C%22article%22%3A%7B%7D%2C%22hasReportOverSize%22%3Afalse%2C%22editorReportData%22%3A%5B%7B%22id%22%3A%22122333%22%2C%22key%22%3A%2276%22%2C%22len%22%3A1%7D%5D%2C%22from%22%3A%22%E7%99%BE%E5%BA%A6%E7%99%BE%E7%A7%91%22%7D"><span class="blockquote_other">百度百科</span> </section></blockquote> <p><br /></p> <p style="text-align: center;"><img class="rich_pages b-lazy" data-ratio="0.7510373443983402" data-s="300,640" data-type="png" data-w="723" style="" data-src="https://oscimg.oschina.net/oscnet/3aeb3e0e-35c2-4468-9582-4a96dd02679c.png" data-original="https://oscimg.oschina.net/oscnet/3aeb3e0e-35c2-4468-9582-4a96dd02679c.png" src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" /></p> <p style="text-align: center;"><span style="color: rgb(178, 178, 178);">图片来源网络</span></p> <p><br /></p> <p>但GTD是一种指导思想,如果在实际工作中,能有一款工具,可以切切实实地帮我们提升办公效率,节省10分钟,或半小时,那该多好。特别在团队多人一起办公时,面对复杂项目时,也能轻松搞定,那就是真的太棒了!!</p> <p><br /></p> <p><span style="font-size: 24px;"><strong>YesDev项目管理工具,提升办公效率的利器</strong></span></p> <p><br /></p> <p>YesDev项目管理,一款团队协作SaaS工具,可以在线管理你团队的工作、项目和任务。它能为你和你的团队,节省工作中的每一分每一秒。它里面有很多很棒的功能,例如:项目管理  /  工作排期  /  邮件生成  /  一键复制 。</p> <p><br /></p> <p>据个人主观感觉,YesDev可以在以下场景节省你的办公时间。<br /></p> <ul class="list-paddingleft-2" style="list-style-type: square;"><li><p>1、进行团队工作排期(每排期一次,就可以节省30分钟+)</p></li> <li><p>2、邮件生成(每写一封邮件,就能节省20分钟以上)</p></li> <li><p>3、一键复制项目功能(每汇总一次,就可以节省10分钟以上)</p></li> <li><p>4、一键复制需求功能(每次复制,节省5分钟以上)</p></li> <li><p>5、传送门,精确找到你要的参考资料(每次点击,节省3分钟)</p></li> <li><p>6、快速找到你的PRD(每次打开,节省2分钟)</p></li> <li><p>7、工作组(避免不必要的信息干扰,让工作更专注)</p></li> <li><p>8、其他更多节省时间的小功能</p></li> </ul><p><br /></p> <p>下面分别介绍。</p> <p><br /></p> <p style="white-space: normal;"><strong>1、进行团队工作排期(每排期一次,就可以节省30分钟+)</strong></p> <p style="white-space: normal;">在日常工作中,对于TeamLeader以及项目负责人,经常要做的一件事情就是向上汇总,以及进行工作安排。那么在工作安排,或者安排人员进行新的任务时,首先就是需要有现在团队成员的工作计划,才能更合理进行任务分配。</p> <p style="white-space: normal;"><br /></p> <p style="white-space: normal;">在以前,需要每次询问,多方确认,现在,使用YesDev,就能立即查看到你需要的信息。整个团队的工作情况,一目了解。<br /></p> <p style="white-space: normal;"><br /></p> <p style="white-space: normal;">此外,如果你是项目负责人,只是虚拟专项的负责人,而不是行政上的管理者,也可以使用工作排期功能,查看和你一起参与项目的其他部门人员的工作情况,从而快速了解整个项目的推进情况,灵活安排,及时调整。<br /></p> <p style="white-space: normal;"><br /></p> <p style="white-space: normal;text-align: center;"><img class="rich_pages b-lazy" data-ratio="0.4647099930118798" data-s="300,640" data-type="png" data-w="1431" data-src="https://oscimg.oschina.net/oscnet/128fbc7c-83b5-40c8-b170-6271272e9648.png" data-original="https://oscimg.oschina.net/oscnet/128fbc7c-83b5-40c8-b170-6271272e9648.png" src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" /></p> <p style="white-space: normal;"><br /></p> <p style="white-space: normal;">在上面工作排期,你还可以导出排期到Excel,方便在任何场合下进行传达。</p> <p><br /></p> <p><strong>2、邮件生成(每写一封邮件,就能节省20分钟以上)</strong></p> <p>其中,以邮件生成为例,它可以帮你生成你想要的项目进度邮件、个人周报邮件,团队周报等。如果你以前汇总或编写一次邮件需要30分钟,那么用这个工具,可以1秒钟就能生成你要的邮件内容,只需要稍微修改,就可以发给团队和领导。相比之前的方式,每写一封邮件,都可以节省10分钟以上。</p> <p><br /></p> <p>例如,生成项目进度邮件后,你可以立即获得类似如下的邮件(相当于有一位机器小助手,帮你悉心汇总好了)。</p> <p style="text-align: center;"><img class="rich_pages b-lazy" data-ratio="0.9715719063545151" data-s="300,640" data-type="png" data-w="598" style="" data-src="https://oscimg.oschina.net/oscnet/23941814-0e47-40ea-97ee-2b16bf94cd3c.png" data-original="https://oscimg.oschina.net/oscnet/23941814-0e47-40ea-97ee-2b16bf94cd3c.png" src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" /></p> <p><br /></p> <p><strong>3、一键复制项目功能(每汇总一次,就可以节省10分钟以上)</strong></p> <p>又如,一键复制功能。平时,在团队内,或者对外沟通,或者向老大汇报时,都要多方收集需要的进度、风险和排期。有了YesDev,它可以做到一键复制项目,还可以一键复制需求,然后把汇总后的内容,直接发送到微信、企业微信、钉钉、QQ、飞书等聊天工具。是不是很棒?</p> <p><br /></p> <p>在项目详情中,点击一键复制:</p> <p style="text-align: center;"><img class="rich_pages b-lazy" data-ratio="0.4616724738675958" data-s="300,640" data-type="png" data-w="1148" style="" data-src="https://oscimg.oschina.net/oscnet/7f2272f5-9152-4165-b1cc-0bb499e94a08.png" data-original="https://oscimg.oschina.net/oscnet/7f2272f5-9152-4165-b1cc-0bb499e94a08.png" src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" /></p> <p style="text-align: center;"><br /></p> <p style="text-align: left;">复制后的项目内容如下(大家可以对比图中的内容):<br /></p> <section class="code-snippet__fix code-snippet__js"><pre class="code-snippet__js" data-lang="ruby"><code><span class="code-snippet_outer">【YesDev V1.<span class="code-snippet__number">3</span> 版本】负责人:黄俊华, 工时:<span class="code-snippet__number">59</span> H/ <span class="code-snippet__number">78</span> H,进度:<span class="code-snippet__number">76</span>%</span></code><code><span class="code-snippet_outer"> </span></code><code><span class="code-snippet_outer"> <span class="code-snippet__number">1</span>、YesDev V1.<span class="code-snippet__number">3</span> 版本需求合集,黄禅宗,<span class="code-snippet__number">2021</span>-<span class="code-snippet__number">01</span>-<span class="code-snippet__number">15</span>,已完成</span></code><code><span class="code-snippet_outer"> <span class="code-snippet__number">2</span>、YesDev V1.<span class="code-snippet__number">3</span> 版本 TopThink自动注册,黄禅宗,<span class="code-snippet__number">2021</span>-<span class="code-snippet__number">02</span>-<span class="code-snippet__number">01</span>,已完成</span></code><code><span class="code-snippet_outer"> <span class="code-snippet__number">3</span>、YesDev v1.<span class="code-snippet__number">3</span> 微信登录,黄俊华,<span class="code-snippet__number">2021</span>-<span class="code-snippet__number">01</span>-<span class="code-snippet__number">20</span>,需求中</span></code><code><span class="code-snippet_outer"> <span class="code-snippet__number">4</span>、YesDev v1.<span class="code-snippet__number">3</span> 周报,黄禅宗,<span class="code-snippet__number">2021</span>-<span class="code-snippet__number">01</span>-<span class="code-snippet__number">22</span>,需求中</span></code><code><span class="code-snippet_outer"> <span class="code-snippet__number">5</span>、YesDev v1.<span class="code-snippet__number">3</span> 需求池完善筛选,黄俊华,<span class="code-snippet__number">2021</span>-<span class="code-snippet__number">01</span>-<span class="code-snippet__number">21</span>,已完成</span></code><code><span class="code-snippet_outer"> <span class="code-snippet__number">6</span>、YesDev v1.<span class="code-snippet__number">3</span> 一键复制,黄俊华,<span class="code-snippet__number">2021</span>-<span class="code-snippet__number">01</span>-<span class="code-snippet__number">22</span>,已完成</span></code><code><span class="code-snippet_outer"> <span class="code-snippet__number">7</span>、YesDev v1.<span class="code-snippet__number">3</span> 时间变更纪录,黄俊华,<span class="code-snippet__number">2021</span>-<span class="code-snippet__number">01</span>-<span class="code-snippet__number">22</span>,需求中</span></code><code><span class="code-snippet_outer"> </span></code><code><span class="code-snippet_outer"> <span class="code-snippet__symbol">http:</span>/<span class="code-snippet__regexp">/www.yesdev.cn/platform</span><span class="code-snippet__regexp">/project/projects</span>-detail?id=<span class="code-snippet__number">58</span></span></code></pre> </section><p style="text-align: left;">复制的内容中,包括了每个需求的进度情况,需求是什么,谁负责,什么时候完成,当前是什么进度,一目了解。<br /></p> <p style="text-align: left;"><br /></p> <p style="text-align: left;">粘贴并发送到微信群,PC版的效果是:</p> <p style="text-align: center;"><img class="rich_pages b-lazy" data-ratio="0.6725490196078432" data-s="300,640" data-type="png" data-w="510" style="" data-src="https://oscimg.oschina.net/oscnet/a68c2f5f-b37a-4fa0-9725-1575edf60701.png" data-original="https://oscimg.oschina.net/oscnet/a68c2f5f-b37a-4fa0-9725-1575edf60701.png" src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" /></p> <p>手机微信上看到的效果是:<br /></p> <p style="text-align: center;"><img class="rich_pages b-lazy" data-ratio="1.7786666666666666" data-s="300,640" data-type="png" data-w="750" style="width: 327px;height: 582px;" data-src="https://oscimg.oschina.net/oscnet/7a6e2184-498a-4b86-ad9b-9b6838103a09.png" data-original="https://oscimg.oschina.net/oscnet/7a6e2184-498a-4b86-ad9b-9b6838103a09.png" src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" /></p> <p>你也可以在发出前,再根据你的需要编辑下。<br /></p> <p><br /></p> <p><strong>4、一键复制需求功能(每次复制,节省5分钟以上)</strong></p> <p>如果你对某个需求特别关心,还可以一键复制需求。以便获取这个需求下,全部相关的任务,以及人员安排情况。</p> <p><br /></p> <p>例如:</p> <p style="text-align: center;"><img class="rich_pages b-lazy" data-ratio="0.4927536231884058" data-s="300,640" data-type="png" data-w="1173" style="" data-src="https://oscimg.oschina.net/oscnet/07cdbbfc-6c3f-4831-85f1-b9c8f51f087a.png" data-original="https://oscimg.oschina.net/oscnet/07cdbbfc-6c3f-4831-85f1-b9c8f51f087a.png" src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" /></p> <p><br /></p> <p>复制到的内容是:</p> <section class="code-snippet__fix code-snippet__js"><pre class="code-snippet__js" data-lang="ruby"><code><span class="code-snippet_outer">【YesDev v1.<span class="code-snippet__number">3</span> 周报】负责人:黄禅宗,计划上线:<span class="code-snippet__number">2021</span>-<span class="code-snippet__number">01</span>-<span class="code-snippet__number">22</span>,状态:需求中</span></code><code><span class="code-snippet_outer"> </span></code><code><span class="code-snippet_outer"> <span class="code-snippet__number">1</span>、周报,王敏杰,<span class="code-snippet__number">2021</span>-<span class="code-snippet__number">01</span>-<span class="code-snippet__number">26</span>,DOING</span></code><code><span class="code-snippet_outer"> <span class="code-snippet__number">2</span>、周报API,黄俊华,<span class="code-snippet__number">2021</span>-<span class="code-snippet__number">01</span>-<span class="code-snippet__number">27</span>,DOING</span></code><code><span class="code-snippet_outer"> </span></code><code><span class="code-snippet_outer"> <span class="code-snippet__symbol">http:</span>/<span class="code-snippet__regexp">/www.yesdev.cn/platform</span><span class="code-snippet__regexp">/requirements/reqm</span>-detail?id=<span class="code-snippet__number">47</span></span></code></pre> </section><p><br /></p> <p>粘贴到微信群,发送后效果是:<br /></p> <p style="text-align: center;"><img class="rich_pages b-lazy" data-ratio="0.4718162839248434" data-s="300,640" data-type="png" data-w="479" style="" data-src="https://oscimg.oschina.net/oscnet/c6f6b872-9e8c-4338-91a3-c10692bc70e7.png" data-original="https://oscimg.oschina.net/oscnet/c6f6b872-9e8c-4338-91a3-c10692bc70e7.png" src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" /></p> <p><br /></p> <p>用手机微信查看,效果是:</p> <p style="text-align: center;"><img class="rich_pages b-lazy" data-ratio="1.7786666666666666" data-s="300,640" data-type="png" data-w="750" style="width: 335px;height: 596px;" data-src="https://oscimg.oschina.net/oscnet/4f6956c4-702d-4442-a24f-8ea166f6b80c.png" data-original="https://oscimg.oschina.net/oscnet/4f6956c4-702d-4442-a24f-8ea166f6b80c.png" src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" /></p> <p style="text-align: center;"><br /></p> <p style="white-space: normal;"><strong>5、传送门,精确找到你要的参考资料(每次点击,节省3分钟)</strong></p> <p style="white-space: normal;">平时工作中,总会有很多重要的信息,例如XXX测试环境的体验账号、API接口文档、蓝湖的设计稿、某篇技术博客、Github代码仓库链接,等。同时,这时信息,都是和具体某个项目有关的,具有一定的时效性。<br /></p> <p style="white-space: normal;"><br /></p> <p style="white-space: normal;">在做项目过程中,你会频繁用到这些信息,并且 需要不断更新和维护。当项目完成后,你只有到回顾总结或有时才需要用到。因上,在项目详情中,YesDev提供了传送门,想去哪里就去哪里。</p> <p style="white-space: normal;"><br /></p> <p style="white-space: normal;">每次访问传送门,估计能节省3分钟,避免了翻查聊天纪录找历史资料,或者文档的时间。</p> <p style="white-space: normal;text-align: center;"><img class="rich_pages b-lazy" data-ratio="0.17805755395683454" data-s="300,640" data-type="png" data-w="1112" data-src="https://oscimg.oschina.net/oscnet/5174d787-db4d-441b-bbef-6dd750e9ce63.png" data-original="https://oscimg.oschina.net/oscnet/5174d787-db4d-441b-bbef-6dd750e9ce63.png" src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" /></p> <p><strong><br /></strong></p> <p><strong>6、快速找到你的PRD(每次打开,节省2分钟)</strong></p> <p>针对产品原型PRD,你可以把和你当前工作状态相关的PRD,拖拉到 TODO、DOING、DONE 这三个状态,这样每天都能快速找到你想要的PRD。</p> <p><br /></p> <p>相比以前存在记事本,每次打开,可以节省2分钟。</p> <p style="text-align: center;"><img class="rich_pages b-lazy" data-ratio="0.321830985915493" data-s="300,640" data-type="png" data-w="1420" style="" data-src="https://oscimg.oschina.net/oscnet/951b2b55-24d4-41af-8b24-2ab0f2a0d0a5.png" data-original="https://oscimg.oschina.net/oscnet/951b2b55-24d4-41af-8b24-2ab0f2a0d0a5.png" src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" /><strong style="font-family: mp-quote, -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;text-align: justify;"></strong></p> <p><br /></p> <p><strong>7、工作组(避免不必要的信息干扰,让工作更专注)</strong></p> <p>当企业团队规模越大时,事情就会越多,并且项目会日益庞大。如果什么项目都关注,或者都看一遍,一个人的时间是有限,每天工作8小时,项目如果没设置一道边界,很容易在工作中被信息淹没。<br /></p> <p><br /></p> <p>我以前的总结是,我们上班所接收到的信息量,就像自来水。</p> <p><br /></p> <p>一开始,是水龙头般速度的自来水冲击;当你的能力变强时,或者职级上升后,或者从基层转为管理者时,你要接收的信息量就会成倍增加,这时可能是类似消防水枪那样的信息量和压力冲击。任何一个人,大脑的承受能力和处理速度都是有限的。再往后,“能者多劳”,或者你还需要处理像洪水一般的信息量,其难度可想而知。</p> <p><br /></p> <p>因此,让每个团队的成员,避免不必要的信息干扰,是让团队高效办公的前提之一。就好比如,高速路旁边的隔音墙。</p> <p><br /></p> <p style="text-align: center;"><img class="rich_pages b-lazy" data-ratio="0.23191489361702128" data-s="300,640" data-type="png" data-w="1410" style="" data-src="https://oscimg.oschina.net/oscnet/62446167-c0ad-4f4d-bd41-1311c6f4ded9.png" data-original="https://oscimg.oschina.net/oscnet/62446167-c0ad-4f4d-bd41-1311c6f4ded9.png" src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" /></p> <p>YesDev的工作组,就像微信的群,只有进群的人,才能看到相应的项目信息。非常灵活。</p> <p><br /></p> <p><strong>8、其他更多节省时间的小功能</strong></p> <p>除上面介绍的功能外,YesDev还有关注项目,可以关心你想关心的项目、需求、和问题;YesDev还有项目置顶功能,把你最关心的项目放在最前面;YesDev还有最新消息,让你知道最新的工作安排和实时情况。当然,YesDev还有工作台,提供了精简的任务看板。<br /></p> <p><br /></p> <p><span style="font-size: 24px;"><strong>怎么在线使用YesDev工具?</strong></span><br /></p> <p><br /></p> <p>访问YesDev官网,http://www.yesdev.cn,你可以免费注册,或者用微信扫码登录。扫码后,你可以创建新的团队、组织或企业,也可以绑定已有的账号。</p> <p><br /></p> <p style="text-align: center;"><img class="rich_pages b-lazy" data-ratio="0.49325762952448543" data-s="300,640" data-type="png" data-w="1409" style="" data-src="https://oscimg.oschina.net/oscnet/3b09289d-ac64-4fd3-a39b-b2e8a5fa9f5f.png" data-original="https://oscimg.oschina.net/oscnet/3b09289d-ac64-4fd3-a39b-b2e8a5fa9f5f.png" src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" /></p> <p><br /></p> <p>创建团队后,你就是团队管理员,可以邀请团队一起使用,共同高效办公。还可以根据团队情况,灵活设置工作组,以及产品业务线。接下来,就是提需求、进行项目排期,安排团队一起参与,共同完成。最后,进行质量验收,发布上线,上市投产使用。</p> </div> <p style="color: #858585; font-size: 13px;">本文分享自微信公众号 - 小白开放平台(yesapi)。<br />如有侵权,请联系 support@oschina.cn 删除。<br />本文参与“<a href="https://www.oschina.net/sharing-plan" target="_blank" rel="nofollow">OSC源创计划</a>”,欢迎正在阅读的你也加入,一起分享。</p> <div class="alert alert-success" role="alert"><p>来源:<code>oschina</code></p><p>链接:<code>https://my.oschina.net/dogstar/blog/4957598</code></p></div></div> <div class="field field--name-field-tags field--type-entity-reference field--label-above"> <div class="field--label">标签</div> <div class="field--items"> <div class="field--item"><a href="/tag/github" hreflang="zh-hans">github</a></div> </div> </div> Sat, 20 Feb 2021 08:45:08 +0000 流过昼夜 4120534 at https://www.e-learn.cn 新一代工作流调度-Apache DolphinScheduler 1.3.5 Docker镜像发布 https://www.e-learn.cn/topic/4120511 <span>新一代工作流调度-Apache DolphinScheduler 1.3.5 Docker镜像发布</span> <span><span lang="" about="/user/80" typeof="schema:Person" property="schema:name" datatype="">我是研究僧i</span></span> <span>2021-02-20 16:17:38</span> <div class="field field--name-body field--type-text-with-summary field--label-hidden field--item"> <div class="rich_media_content" id="js_content"> <p style="color: rgb(53, 53, 53);font-family: &quot;Helvetica Neue&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, 黑体, Arial, sans-serif;font-size: 14px;white-space: normal;background-color: rgb(255, 255, 255);line-height: 34px;text-align: left;direction: ltr;unicode-bidi: embed;"><span style="font-family: 微软雅黑;color: rgb(23, 23, 23);font-size: 14px;"></span><span style="box-sizing: inherit;font-family: -apple-system, system-ui, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;, &quot;Segoe UI Symbol&quot;, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: left;background-color: rgb(255, 255, 255);color: rgb(38, 38, 38);">新一代大数据工作流调度 - Apache DolphinScheduler(incubator) 今天发布了 1.3.5 官方 Docker 镜像。</span><span style="box-sizing: inherit;font-family: -apple-system, system-ui, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;, &quot;Segoe UI Symbol&quot;, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: left;background-color: rgb(255, 255, 255);color: rgb(34, 34, 34);">在社区伙伴 chengshiwen 的努力下,  1.3.5 版本的 Docker 镜像大约只有 1.3.4 版本的 1/2 ,  现在只有大约 220M 啦,奥利给!</span></p> <p style="text-align: center;"><img class="rich_pages js_insertlocalimg b-lazy" data-ratio="0.43515625" data-s="300,640" data-type="png" data-w="1280" style="" data-src="https://oscimg.oschina.net/oscnet/c4804d10-6714-42f4-93b0-9881d4dd573f.png" data-original="https://oscimg.oschina.net/oscnet/c4804d10-6714-42f4-93b0-9881d4dd573f.png" src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" /></p> <p style="color: rgb(53, 53, 53);font-family: &quot;Helvetica Neue&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, 黑体, Arial, sans-serif;font-size: 14px;white-space: normal;background-color: rgb(255, 255, 255);line-height: 34px;text-align: left;direction: ltr;unicode-bidi: embed;"><span style="box-sizing: inherit;font-family: -apple-system, system-ui, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;, &quot;Segoe UI Symbol&quot;, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: left;background-color: rgb(255, 255, 255);color: rgb(34, 34, 34);"></span><br /></p> <p style="color: rgb(53, 53, 53);font-family: &quot;Helvetica Neue&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, 黑体, Arial, sans-serif;font-size: 14px;white-space: normal;background-color: rgb(255, 255, 255);text-align: left;"><br /></p> <p style="box-sizing: inherit;margin-bottom: 20px;line-height: inherit;font-family: -apple-system, system-ui, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;, &quot;Segoe UI Symbol&quot;, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: left;white-space: normal;background-color: rgb(255, 255, 255);"><span style="box-sizing: inherit;color: rgb(38, 38, 38);">下面就带大家来</span><span style="box-sizing: inherit;font-weight: 700;"> 快速使用 DolphinScheduler</span></p> <p style="box-sizing: inherit;margin-bottom: 20px;line-height: inherit;font-family: -apple-system, system-ui, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;, &quot;Segoe UI Symbol&quot;, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: left;white-space: normal;background-color: rgb(255, 255, 255);">官方推荐以 docker-compose 的方式启动,这种方式需要先安装 docker-compose , docker-compose 的安装网上已经有非常多的资料,请自行安装即可。<br style="box-sizing: inherit;" /><span style="box-sizing: inherit;font-weight: 700;">1、下载源码 zip 包  - 请下载最新版本的源码包并进行解压</span></p> <blockquote style="box-sizing: inherit;margin-top: 0px;margin-bottom: 20px;padding: 20px;background-color: rgb(246, 246, 246);border-left-width: 6px;border-left-color: rgb(230, 230, 230);word-break: break-word;color: rgb(51, 51, 51);font-family: -apple-system, system-ui, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;, &quot;Segoe UI Symbol&quot;, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: left;white-space: normal;"> <p style="box-sizing: inherit;margin-bottom: 20px;line-height: inherit;"># 创建源码存放目录<br style="box-sizing: inherit;" />mkdir -p /opt/soft/dolphinscheduler;<br style="box-sizing: inherit;" />cd /opt/soft/dolphinscheduler;</p> <p style="box-sizing: inherit;margin-bottom: 20px;line-height: inherit;"># 下载源码包<br style="box-sizing: inherit;" />wget https://mirrors.tuna.tsinghua.edu.cn/apache/incubator/dolphinscheduler/1.3.5/apache-dolphinscheduler-incubating-1.3.5-src.zip</p> <p style="box-sizing: inherit;line-height: inherit;"># 解压缩<br style="box-sizing: inherit;" />tar -zxvf apache-dolphinscheduler-incubating-1.3.5-src.zip<br style="box-sizing: inherit;" />mv apache-dolphinscheduler-incubating-1.3.5-src-release  dolphinscheduler-src</p> </blockquote> <p style="box-sizing: inherit;margin-bottom: 20px;line-height: inherit;font-family: -apple-system, system-ui, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;, &quot;Segoe UI Symbol&quot;, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: left;white-space: normal;background-color: rgb(255, 255, 255);"><span style="box-sizing: inherit;font-weight: 700;">2、安装并启动服务</span></p> <blockquote style="box-sizing: inherit;margin-top: 0px;margin-bottom: 20px;padding: 20px;background-color: rgb(246, 246, 246);border-left-width: 6px;border-left-color: rgb(230, 230, 230);word-break: break-word;color: rgb(51, 51, 51);font-family: -apple-system, system-ui, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;, &quot;Segoe UI Symbol&quot;, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: left;white-space: normal;"> <p style="box-sizing: inherit;line-height: inherit;">cd dolphinscheduler-src<br style="box-sizing: inherit;" />docker-compose -f ./docker/docker-swarm/docker-compose.yml up -d</p> </blockquote> <p style="box-sizing: inherit;margin-bottom: 20px;line-height: inherit;font-family: -apple-system, system-ui, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;, &quot;Segoe UI Symbol&quot;, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: left;white-space: normal;background-color: rgb(255, 255, 255);"><span style="box-sizing: inherit;font-weight: 700;">3、登录系统   </span></p> <p style="box-sizing: inherit;margin-bottom: 20px;line-height: inherit;font-family: -apple-system, system-ui, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;, &quot;Segoe UI Symbol&quot;, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: left;white-space: normal;background-color: rgb(255, 255, 255);">访问前端界面:http://192.168.xx.xx:8888<br style="box-sizing: inherit;" /></p> <p style="text-align: center;"><img class="rich_pages js_insertlocalimg b-lazy" data-ratio="0.9464068209500609" data-s="300,640" data-type="png" data-w="821" style="width: 311px;height: 294px;" data-src="https://oscimg.oschina.net/oscnet/be10b32a-a3ab-40c6-ba1b-9f44dc3754ed.png" data-original="https://oscimg.oschina.net/oscnet/be10b32a-a3ab-40c6-ba1b-9f44dc3754ed.png" src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" /></p> <p style="box-sizing: inherit;margin-bottom: 20px;line-height: inherit;font-family: -apple-system, system-ui, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;, &quot;Segoe UI Symbol&quot;, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: left;white-space: normal;background-color: rgb(255, 255, 255);">然后参考官网用户手册章节的`快速上手`即可进行使用<br /></p> <p style="box-sizing: inherit;margin-bottom: 20px;line-height: inherit;font-family: -apple-system, system-ui, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;, &quot;Segoe UI Symbol&quot;, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: left;white-space: normal;background-color: rgb(255, 255, 255);">怎么样,是不是非常简单?</p> <p style="color: rgb(53, 53, 53);font-family: &quot;Helvetica Neue&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, 黑体, Arial, sans-serif;font-size: 14px;white-space: normal;background-color: rgb(255, 255, 255);text-align: left;"><br /></p> <section data-tools-id="80812" style="font-family: &quot;Helvetica Neue&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, 黑体, Arial, sans-serif;font-size: 14px;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);max-width: 100%;box-sizing: border-box;color: rgb(0, 0, 0);overflow-wrap: break-word !important;"><section style="margin: 10px auto;max-width: 100%;box-sizing: border-box;text-align: center;overflow-wrap: break-word !important;"><section style="padding-top: 4px;padding-right: 10px;padding-bottom: 4px;display: inline-block;max-width: 100%;box-sizing: border-box;border-bottom: 2px solid rgb(61, 170, 214);border-top: 2px solid rgb(61, 170, 214);overflow-wrap: break-word !important;"><section style="margin-top: -8px;display: inline-block;max-width: 100%;box-sizing: border-box;background-color: rgb(254, 254, 254);float: left;width: 60px;overflow-wrap: break-word !important;"><section style="display: table;max-width: 100%;box-sizing: border-box;border-color: rgb(72, 192, 163);color: inherit;width: 60px;overflow-wrap: break-word !important;"><section style="display: table-cell;max-width: 100%;box-sizing: border-box;line-height: 1em;overflow-wrap: break-word !important;"><p style="max-width: 100%;box-sizing: border-box;min-height: 1em;font-size: 42px;font-style: italic;overflow-wrap: break-word !important;">1</p> </section></section></section><section style="max-width: 100%;box-sizing: border-box;color: rgb(72, 192, 163);float: left;overflow-wrap: break-word !important;"><span style="font-size: 20px;"><strong><span style="max-width: 100%;box-sizing: border-box;color: rgb(0, 0, 0);overflow-wrap: break-word !important;">DolphinScheduler 介绍</span></strong></span> </section></section></section></section><p style="color: rgb(53, 53, 53);font-family: &quot;Helvetica Neue&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, 黑体, Arial, sans-serif;font-size: 14px;white-space: normal;background-color: rgb(255, 255, 255);line-height: 34px;text-align: left;direction: ltr;unicode-bidi: embed;"><span style="color: rgb(23, 23, 23);font-family: 微软雅黑;">新一代大数据任务调度 </span><span style="color: rgb(23, 23, 23);font-family: 微软雅黑;">-  Apache DolphinScheduler 在 2020 年接连获得由 InfoQ 主办的 “2020 年度十大开源新锐项目” 和 “2020 年度最具人气新锐项目” 以及 OSCHINA 年度 “最佳技术团队” 称号,非常欢迎更多小伙伴加入到贡献队伍中来,为中国的开源崛起贡献自己的一份力量。</span></p> <p style="color: rgb(53, 53, 53);font-family: &quot;Helvetica Neue&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, 黑体, Arial, sans-serif;font-size: 14px;white-space: normal;background-color: rgb(255, 255, 255);line-height: 34px;text-align: left;direction: ltr;unicode-bidi: embed;"><br /></p> <p style="color: rgb(53, 53, 53);font-family: &quot;Helvetica Neue&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, 黑体, Arial, sans-serif;font-size: 14px;white-space: normal;background-color: rgb(255, 255, 255);line-height: 34px;text-align: left;direction: ltr;unicode-bidi: embed;"><span style="font-family: 微软雅黑;color: rgb(23, 23, 23);font-size: 14px;">Apache DolphinScheduler(incubator) 于 17 年在易观数科立项, 19 年 3 月开源,8 月进入 Apache 孵化器, 据不完全统计,</span><span style="font-family: 微软雅黑;color: rgb(23, 23, 23);font-size: 14px;">截止 2020 年 10 月</span><span style="font-family: 微软雅黑;color: rgb(23, 23, 23);font-size: 14px;"><span style="color: rgb(53, 53, 53);font-family: &quot;Helvetica Neue&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, 黑体, Arial, sans-serif;font-size: 14px;text-align: start;background-color: rgb(255, 255, 255);">,</span>已有 400+ 公司在生产上使用。DolphinScheduler 致力于“解决大数据任务之间错综复杂的依赖关系,使整个数据处理流程直观可见”。DolphinScheduler以 DAG(有向无环图) 的方式将 Task 组装起来,可实时监控任务的运行状态,同时支持重试、从指定节点恢复失败、暂停及Kill任务等操作。DolphinScheduler 专注于以下 6 个主要能力</span></p> <p style="color: rgb(53, 53, 53);font-family: &quot;Helvetica Neue&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, 黑体, Arial, sans-serif;font-size: 14px;white-space: normal;background-color: rgb(255, 255, 255);text-align: center;"><br /></p> <p style="color: rgb(53, 53, 53);font-family: &quot;Helvetica Neue&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, 黑体, Arial, sans-serif;font-size: 14px;white-space: normal;background-color: rgb(255, 255, 255);text-align: center;"><img class="rich_pages b-lazy" data-backh="346" data-backw="578" data-ratio="0.5992736077481841" data-s="300,640" data-type="png" data-w="1652" style="width: 754.188px;" data-src="https://oscimg.oschina.net/oscnet/47d13ee4-9a3f-4dbc-89c6-920e186cea90.png" data-original="https://oscimg.oschina.net/oscnet/47d13ee4-9a3f-4dbc-89c6-920e186cea90.png" src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" /></p> <p style="color: rgb(53, 53, 53);font-family: &quot;Helvetica Neue&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, 黑体, Arial, sans-serif;font-size: 14px;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);"><br /></p> <p style="color: rgb(53, 53, 53);font-family: &quot;Helvetica Neue&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, 黑体, Arial, sans-serif;font-size: 14px;white-space: normal;background-color: rgb(255, 255, 255);text-align: left;direction: ltr;unicode-bidi: embed;"><span style="font-size: 16px;color: rgb(46, 46, 46);">Apache 组织崇尚 “社区大于代码”,DolphinScheduler 目前微信用户群 4000 人,社区目前有  200 + 贡献者,来自 100+ 家公司、机构和高校(部分统计)</span></p> <p style="color: rgb(53, 53, 53);font-family: &quot;Helvetica Neue&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, 黑体, Arial, sans-serif;font-size: 14px;white-space: normal;background-color: rgb(255, 255, 255);text-align: center;"><img class="rich_pages b-lazy" data-backh="643" data-backw="578" data-ratio="1.1117478510028653" data-s="300,640" data-type="png" data-w="698" style="width: 754.188px;" data-src="https://oscimg.oschina.net/oscnet/ae5404a4-7996-4a63-aa0c-51c109a5d12a.png" data-original="https://oscimg.oschina.net/oscnet/ae5404a4-7996-4a63-aa0c-51c109a5d12a.png" src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" /></p> <p style="text-align: center;"><img class="rich_pages b-lazy" data-ratio="1.0682730923694779" data-s="300,640" data-type="png" data-w="996" style="" data-src="https://oscimg.oschina.net/oscnet/4cbf67f4-8edb-43b5-a33f-57f05ba68bc3.png" data-original="https://oscimg.oschina.net/oscnet/4cbf67f4-8edb-43b5-a33f-57f05ba68bc3.png" src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" /></p> <p style="color: rgb(53, 53, 53);font-family: &quot;Helvetica Neue&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, 黑体, Arial, sans-serif;font-size: 14px;white-space: normal;background-color: rgb(255, 255, 255);text-align: left;direction: ltr;unicode-bidi: embed;"><br /></p> <p style="color: rgb(53, 53, 53);font-family: &quot;Helvetica Neue&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, 黑体, Arial, sans-serif;font-size: 14px;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);"><br /></p> <p style="color: rgb(53, 53, 53);font-family: &quot;Helvetica Neue&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, 黑体, Arial, sans-serif;font-size: 14px;white-space: normal;background-color: rgb(255, 255, 255);text-align: center;"><br /></p> <section data-tools-id="80812" style="font-family: &quot;Helvetica Neue&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, 黑体, Arial, sans-serif;font-size: 14px;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);max-width: 100%;box-sizing: border-box;color: rgb(0, 0, 0);overflow-wrap: break-word !important;"><section style="margin: 10px auto;max-width: 100%;box-sizing: border-box;text-align: center;overflow-wrap: break-word !important;"><section style="padding-top: 4px;padding-right: 10px;padding-bottom: 4px;display: inline-block;max-width: 100%;box-sizing: border-box;border-bottom: 2px solid rgb(61, 170, 214);border-top: 2px solid rgb(61, 170, 214);overflow-wrap: break-word !important;"><section style="margin-top: -8px;display: inline-block;max-width: 100%;box-sizing: border-box;background-color: rgb(254, 254, 254);float: left;width: 60px;overflow-wrap: break-word !important;"><section style="display: table;max-width: 100%;box-sizing: border-box;border-color: rgb(72, 192, 163);color: inherit;width: 60px;overflow-wrap: break-word !important;"><section style="display: table-cell;max-width: 100%;box-sizing: border-box;line-height: 1em;overflow-wrap: break-word !important;"><p style="max-width: 100%;box-sizing: border-box;min-height: 1em;font-size: 42px;font-style: italic;overflow-wrap: break-word !important;">2</p> </section></section></section><section style="max-width: 100%;box-sizing: border-box;color: rgb(72, 192, 163);float: left;overflow-wrap: break-word !important;"><span style="font-size: 20px;"><strong><span style="max-width: 100%;box-sizing: border-box;color: rgb(0, 0, 0);overflow-wrap: break-word !important;">部分用户案例</span></strong></span> </section></section></section></section><p style="color: rgb(53, 53, 53);font-family: &quot;Helvetica Neue&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, 黑体, Arial, sans-serif;font-size: 14px;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);">据不完全统计,截止 2020 年 10 月,已经有 400 + 家公司及机构采用 DolphinScheduler 在生产环境使用,以下是部分案例(排名不分先后)<br /></p> <p style="color: rgb(53, 53, 53);font-family: &quot;Helvetica Neue&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, 黑体, Arial, sans-serif;font-size: 14px;white-space: normal;background-color: rgb(255, 255, 255);text-align: center;"><img class="rich_pages b-lazy" data-ratio="0.45248868778280543" data-s="300,640" data-type="png" data-w="884" data-backw="578" data-backh="262" style="width: 100%;height: auto;" data-src="https://oscimg.oschina.net/oscnet/e6e1cb8d-1d4a-4149-b344-698ca7822dc1.png" data-original="https://oscimg.oschina.net/oscnet/e6e1cb8d-1d4a-4149-b344-698ca7822dc1.png" src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" /></p> <p style="color: rgb(53, 53, 53);font-family: &quot;Helvetica Neue&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, 黑体, Arial, sans-serif;font-size: 14px;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);"><br /></p> <p style="color: rgb(53, 53, 53);font-family: &quot;Helvetica Neue&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, 黑体, Arial, sans-serif;font-size: 14px;white-space: normal;background-color: rgb(255, 255, 255);text-align: left;">此外,还有 2000+ 用户注册了 demo 试用( http://106.75.43.194:8888 ),欢迎大家体验,十分欢迎对比哈。<br /></p> <p style="color: rgb(53, 53, 53);font-family: &quot;Helvetica Neue&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, 黑体, Arial, sans-serif;font-size: 14px;white-space: normal;background-color: rgb(255, 255, 255);text-align: center;"><br /></p> <p style="color: rgb(53, 53, 53);font-family: &quot;Helvetica Neue&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, 黑体, Arial, sans-serif;font-size: 14px;white-space: normal;background-color: rgb(255, 255, 255);text-align: center;"><br /></p> <p style="color: rgb(53, 53, 53);font-family: &quot;Helvetica Neue&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, 黑体, Arial, sans-serif;font-size: 14px;white-space: normal;background-color: rgb(255, 255, 255);text-align: left;"><br /></p> <p style="color: rgb(53, 53, 53);font-family: &quot;Helvetica Neue&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, 黑体, Arial, sans-serif;font-size: 14px;white-space: normal;background-color: rgb(255, 255, 255);text-align: center;"><br /></p> <section data-tools-id="80812" style="font-family: &quot;Helvetica Neue&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, 黑体, Arial, sans-serif;font-size: 14px;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);max-width: 100%;box-sizing: border-box;color: rgb(0, 0, 0);overflow-wrap: break-word !important;"><section style="margin: 10px auto;max-width: 100%;box-sizing: border-box;text-align: center;overflow-wrap: break-word !important;"><section style="padding-top: 4px;padding-right: 10px;padding-bottom: 4px;display: inline-block;max-width: 100%;box-sizing: border-box;border-bottom: 2px solid rgb(61, 170, 214);border-top: 2px solid rgb(61, 170, 214);overflow-wrap: break-word !important;"><section style="margin-top: -8px;display: inline-block;max-width: 100%;box-sizing: border-box;background-color: rgb(254, 254, 254);float: left;width: 60px;overflow-wrap: break-word !important;"><section style="display: table;max-width: 100%;box-sizing: border-box;border-color: rgb(72, 192, 163);color: inherit;width: 60px;overflow-wrap: break-word !important;"><section style="display: table-cell;max-width: 100%;box-sizing: border-box;line-height: 1em;overflow-wrap: break-word !important;"><p style="max-width: 100%;box-sizing: border-box;min-height: 1em;font-size: 42px;font-style: italic;overflow-wrap: break-word !important;">3</p> </section></section></section><section style="max-width: 100%;box-sizing: border-box;color: rgb(72, 192, 163);float: left;overflow-wrap: break-word !important;"><span style="font-size: 20px;"><strong><span style="max-width: 100%;box-sizing: border-box;color: rgb(0, 0, 0);overflow-wrap: break-word !important;">参与贡献</span></strong></span> </section></section></section></section><p style="color: rgb(53, 53, 53);font-family: &quot;Helvetica Neue&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, 黑体, Arial, sans-serif;font-size: 14px;white-space: normal;background-color: rgb(255, 255, 255);max-width: 100%;min-height: 1em;text-align: left;box-sizing: border-box !important;overflow-wrap: break-word !important;">近 2 年随着国内开源的迅猛崛起,DolphinScheduler 社区迎来了十分蓬勃的发展,为了做更好用、易用的调度,真诚欢迎热爱开源的伙伴加入到开源社区中来,为中国开源崛起献上一份自己的力量,让本土开源走向全球</p> <section data-role="paragraph" style="color: rgb(53, 53, 53);font-family: &quot;Helvetica Neue&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, 黑体, Arial, sans-serif;text-align: start;white-space: normal;font-size: 16px;background-color: rgb(255, 255, 255);"><section data-role="paragraph"><section data-id="96450" data-tools="135编辑器"><section data-width="100%" style="margin: 10px auto;width: 578px;"><section data-width="100%" style="width: 578px;transform: rotate(0deg);"><img data-ratio="0.05631399317406143" data-type="png" data-width="100%" data-w="586" style="width: 578px;display: block;" class="b-lazy" data-src="https://oscimg.oschina.net/oscnet/bc745df6-32e8-45ab-84e8-0c1d521a3181.png" data-original="https://oscimg.oschina.net/oscnet/bc745df6-32e8-45ab-84e8-0c1d521a3181.png" src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" /></section><section style="margin-top: -10px;border-radius: 10px;border-width: 1px;border-style: solid;border-color: rgb(162, 188, 132);"><section style="background-image: url(&quot;https://oscimg.oschina.net/oscnet/092b68c8-03ba-4c4c-85fd-307e33de3796.png&quot;);background-position: right bottom;background-size: 50px;background-repeat: no-repeat;background-attachment: initial;background-origin: initial;background-clip: initial;"><section data-role="list" data-autoskip="1" style="padding: 1em;color: rgb(87, 158, 119);line-height: 1.75em;letter-spacing: 1.5px;font-size: 14px;"><p><span style="color: rgb(0, 0, 0);">参与 DolphinScheduler 社区有非常多的参与贡献的方式,包括:</span></p> <p style="text-align: center;"><img class="rich_pages b-lazy" data-ratio="0.0468187274909964" data-s="300,640" data-type="png" data-w="833" data-src="https://oscimg.oschina.net/oscnet/73df80ce-ebb2-4f50-a19c-6843188691b4.png" data-original="https://oscimg.oschina.net/oscnet/73df80ce-ebb2-4f50-a19c-6843188691b4.png" src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" /></p> <p><br /></p> <p><span style="color: rgb(0, 0, 0);">贡献第一个PR(文档、代码) 我们也希望是简单的,第一个PR用于熟悉提交的流程和社区协作以及感受社区的友好度。</span></p> <p><br /></p> <p><span style="color: rgb(0, 0, 0);">社区汇总了以下适合新手的问题列表:https://github.com/apache/incubator-dolphinscheduler/issues/4124</span></p> <p><br /></p> <p><span style="color: rgb(0, 0, 0);">如何参与贡献链接:https://dolphinscheduler.apache.org/zh-cn/docs/development/contribute.html</span></p> <p><span style="color: rgb(0, 0, 0);"></span><br /></p> <p><span style="color: rgb(0, 0, 0);">来吧,DolphinScheduler开源社区需要您的参与,为中国开源崛起添砖加瓦吧,哪怕只是小小的一块瓦,汇聚起来的力量也是巨大的。</span></p> <p><br /></p> <p>参与开源可以近距离与各路高手切磋,迅速提升自己的技能,如果您想参与贡献,我们有个贡献者种子孵化群,可以添加社区小助手</p> <p>微信(easyworkflow) 手把手教会您( 贡献者不分水平高低,有问必答,关键是有一颗愿意贡献的心 )。添加小助手微信时请说明想参与贡献哈</p> <p><br /></p> <p><span style="color: rgb(0, 0, 0);">来吧,开源社区非常期待您的参与。</span></p> </section></section></section></section></section></section><section data-id="97318" data-tools="135编辑器"><section style="margin: 10px auto;"><section style="margin: 10px auto;width: 70px;"><section style="display: flex;"><section style="background: rgb(216, 239, 232);width: 14px;height: 14px;overflow: hidden;"><br /></section><section style="background-image: none;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;width: 14px;height: 14px;overflow: hidden;"><br /></section><section style="background: rgb(216, 239, 232);width: 14px;height: 14px;overflow: hidden;"><br /></section><section style="background-image: none;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;width: 14px;height: 14px;overflow: hidden;"><br /></section><section style="background: rgb(216, 239, 232);width: 14px;height: 14px;overflow: hidden;"><br /></section></section></section></section></section><p><br /></p> </section><section data-role="paragraph" style="color: rgb(53, 53, 53);font-family: &quot;Helvetica Neue&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, 黑体, Arial, sans-serif;text-align: start;white-space: normal;font-size: 16px;background-color: rgb(255, 255, 255);"><p><br /></p> <section data-darkmode-bgcolor-16044847656801="rgb(25, 25, 25)" data-darkmode-original-bgcolor-16044847656801="rgb(255, 255, 255)" data-style="max-width: 100%; font-family: -apple-system-font, system-ui, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif; letter-spacing: 0.544px; font-size: 16px; background-color: rgb(255, 255, 255); text-align: center; margin-left: 8px; margin-right: 8px; box-sizing: border-box !important; overflow-wrap: break-word !important;" class="js_darkmode__65" style="margin-right: 8px;margin-left: 8px;max-width: 100%;font-family: -apple-system-font, system-ui, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;letter-spacing: 0.544px;text-align: center;box-sizing: border-box !important;overflow-wrap: break-word !important;color: rgb(163, 163, 163) !important;"><br /></section><section data-darkmode-bgcolor-16044847656801="rgb(25, 25, 25)" data-darkmode-original-bgcolor-16044847656801="rgb(255, 255, 255)" data-style="max-width: 100%; font-family: -apple-system-font, system-ui, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif; letter-spacing: 0.544px; font-size: 16px; background-color: rgb(255, 255, 255); text-align: center; margin-left: 8px; margin-right: 8px; box-sizing: border-box !important; overflow-wrap: break-word !important;" class="js_darkmode__65" style="margin-right: 8px;margin-left: 8px;max-width: 100%;font-family: -apple-system-font, system-ui, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;letter-spacing: 0.544px;text-align: center;box-sizing: border-box !important;overflow-wrap: break-word !important;color: rgb(163, 163, 163) !important;"><br /></section><section data-darkmode-bgcolor-16044847656801="rgb(25, 25, 25)" data-darkmode-original-bgcolor-16044847656801="rgb(255, 255, 255)" data-style="max-width: 100%; font-family: -apple-system-font, system-ui, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif; letter-spacing: 0.544px; font-size: 16px; background-color: rgb(255, 255, 255); text-align: center; margin-left: 8px; margin-right: 8px; box-sizing: border-box !important; overflow-wrap: break-word !important;" class="js_darkmode__65" style="padding: 1em;color: rgb(87, 158, 119);line-height: 1.75em;letter-spacing: 1.5px;font-size: 14px;text-align: center;"><span style="color: rgb(0, 0, 0);font-size: 17px;">DolphinScheduler's Github Repo 传送门</span> </section><section data-darkmode-bgcolor-16044847656801="rgb(25, 25, 25)" data-darkmode-original-bgcolor-16044847656801="rgb(255, 255, 255)" data-style="max-width: 100%; font-family: -apple-system-font, system-ui, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif; letter-spacing: 0.544px; font-size: 16px; background-color: rgb(255, 255, 255); text-align: center; margin-left: 8px; margin-right: 8px; box-sizing: border-box !important; overflow-wrap: break-word !important;" class="js_darkmode__66" style="padding: 1em;color: rgb(87, 158, 119);line-height: 1.75em;letter-spacing: 1.5px;font-size: 14px;text-align: center;"><span style="color: rgb(0, 0, 0);font-size: 17px;">↓↓↓</span> </section><section data-darkmode-bgcolor-16044847656801="rgb(25, 25, 25)" data-darkmode-original-bgcolor-16044847656801="rgb(255, 255, 255)" data-style="max-width: 100%; font-family: -apple-system-font, system-ui, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif; letter-spacing: 0.544px; font-size: 16px; background-color: rgb(255, 255, 255); text-align: center; margin-left: 8px; margin-right: 8px; box-sizing: border-box !important; overflow-wrap: break-word !important;" class="js_darkmode__67" style="padding: 1em;color: rgb(87, 158, 119);line-height: 1.75em;letter-spacing: 1.5px;font-size: 14px;text-align: center;"><span style="color: rgb(0, 0, 0);">https://github.com/apache/incubator-dolphinscheduler</span> </section><section data-darkmode-bgcolor-16044847656801="rgb(25, 25, 25)" data-darkmode-original-bgcolor-16044847656801="rgb(255, 255, 255)" data-style="max-width: 100%; font-family: -apple-system-font, system-ui, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif; letter-spacing: 0.544px; font-size: 16px; background-color: rgb(255, 255, 255); text-align: center; margin-left: 8px; margin-right: 8px; box-sizing: border-box !important; overflow-wrap: break-word !important;" class="js_darkmode__68" style="margin-right: 8px;margin-left: 8px;max-width: 100%;font-family: -apple-system-font, system-ui, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;letter-spacing: 0.544px;text-align: center;box-sizing: border-box !important;overflow-wrap: break-word !important;color: rgb(163, 163, 163) !important;"><span style="color: rgb(0, 0, 0);">喜欢❤️ DolphinScheduler 的话,别忘了 Star 收藏一下哟~</span> <span style="color: rgb(51, 51, 51);font-family: mp-quote, -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 17px;text-align: justify;"></span> </section></section></div> <p style="color: #858585; font-size: 13px;">本文分享自微信公众号 - 海豚调度(dolphin-scheduler)。<br />如有侵权,请联系 support@oschina.cn 删除。<br />本文参与“<a href="https://www.oschina.net/sharing-plan" target="_blank" rel="nofollow">OSC源创计划</a>”,欢迎正在阅读的你也加入,一起分享。</p> <div class="alert alert-success" role="alert"><p>来源:<code>oschina</code></p><p>链接:<code>https://my.oschina.net/dailidong/blog/4957432</code></p></div></div> <div class="field field--name-field-tags field--type-entity-reference field--label-above"> <div class="field--label">标签</div> <div class="field--items"> <div class="field--item"><a href="/tag/docker-compose" hreflang="zh-hans">Docker Compose</a></div> <div class="field--item"><a href="/tag/github" hreflang="zh-hans">github</a></div> <div class="field--item"><a href="/tag/dashuju" hreflang="zh-hans">大数据</a></div> <div class="field--item"><a href="/tag/apache" hreflang="zh-hans">apache</a></div> <div class="field--item"><a href="/tag/docker" hreflang="zh-hans">Docker</a></div> </div> </div> Sat, 20 Feb 2021 08:17:38 +0000 我是研究僧i 4120511 at https://www.e-learn.cn 腾讯九年,再见喽! https://www.e-learn.cn/topic/4120509 <span>腾讯九年,再见喽!</span> <span><span lang="" about="/user/68" typeof="schema:Person" property="schema:name" datatype="">佐手、</span></span> <span>2021-02-20 16:16:50</span> <div class="field field--name-body field--type-text-with-summary field--label-hidden field--item"> <div class="rich_media_content" id="js_content"> <p style="white-space: normal;text-align: left;" data-mpa-powered-by="yiban.io"><span style="color: rgb(0, 0, 0);font-family: mp-quote, -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 14px;letter-spacing: 0.544px;text-align: left;caret-color: rgb(51, 51, 51);">来源:yuguo.us/weblog/leaving-tencent/</span><br /></p> <p style=""><span style="font-size: 14px;color: rgb(0, 0, 0);">作者:余果 </span></p> <p><br /></p> <section style=""><span style="color: rgb(83, 83, 83);font-size: 15px;">我觉得,你们可以静下心来,听听我的故事,相信你们会有收获的。</span> </section><section style=""><span style="color: rgb(83, 83, 83);font-size: 15px;">下周,就是我加入腾讯九周年,我选择在同一天辞职离开公司,迎接新的事业挑战。<br /></span> </section><section style=""><span style="color: rgb(83, 83, 83);font-size: 15px;">很多朋友都觉得这个消息太突然,毫无征兆;也有朋友觉得毫不惊讶,觉得我一定会有这一天。</span> </section><section style=""><span style="color: rgb(83, 83, 83);font-size: 15px;">感觉很突然,可能是因为我已经在腾讯工作9年,且顺风顺水,按照惯性推理应该继续做下去。而感觉毫不惊讶的,可能也因为这与我一直以来的价值观是匹配的,在去年的8周年总结中就写得很清楚了:</span> </section><blockquote style="margin-top: 30px;margin-bottom: 30px;margin-left: 30.4px;padding: 5px 30.4px;border-left-color: rgb(198, 213, 225);color: rgb(59, 59, 59);line-height: 38px;font-size: 18px;white-space: normal;font-style: italic;font-variant-numeric: normal;font-weight: 700;font-stretch: normal;font-family: Domine, serif;text-align: start;"> <section style="margin: 15px 8px;color: rgb(51, 51, 50);line-height: 1.75em;letter-spacing: 2px;"><span style="color: rgb(83, 83, 83);font-size: 15px;">……如果完全胜任还没有被安排更有挑战的工作,要么自己找事情做,要么跳槽转岗。</span> </section></blockquote> <section style=""><span style="color: rgb(83, 83, 83);font-size: 15px;">工作九年,我的关系网大部分都在腾讯,因此我想写一篇文字给朋友们,说明我这样决定的原因。当然,不能代替请客吃饭,我很希望老朋友们随时来激活我的头像。</span> </section><section style=""><span style="color: rgb(83, 83, 83);font-size: 15px;">不用我说大家也知道腾讯很好,而且在越来越好。记得2010年毕业拿到腾讯offer,那时候腾讯的知名度限定在“年轻人”,父母给亲戚同事说起,需要补一句“是那个开发QQ的公司”。</span> </section><section style=""><span style="color: rgb(83, 83, 83);font-size: 15px;">后来,微信时代、王者时代,腾讯的好可以说是众所周知,无须解释。现在,腾讯的好可以说是“斩钉截铁、毋容置疑”,甚至你说腾讯哪里没做好,都有人跳出来反对,腾讯没做好怎么做到亚洲市值第一第二?</span> <br /></section><section style=""><span style="color: rgb(83, 83, 83);font-size: 15px;">确实如此,腾讯崇尚自由主义,不同的团队就像一个个创业公司,自下而上的创新加上赛马机制,孵化了微信、王者,这在其他自上而下的公司是不可能出现的。</span> </section><section style=""><span style="color: rgb(83, 83, 83);font-size: 15px;">这么说来腾讯颇有点“雅典学院”的氛围,让大家不会有太多勾心斗角,只需做好自己的研究和工作。公司创造环境,不但不收学费,反而给与很有竞争力的薪酬,只要求你认真地做好每一道题。</span> </section><section style=""><span style="color: rgb(83, 83, 83);font-size: 15px;">学习成长反而能挣到钱,简直不要有这么好的事,让我想起巴菲特的老师格雷厄姆教授,他会在课堂布置作业,选一些公司让大家分析,就有的学生去听课顺便买股票,把学费都挣回来。</span> </section><span id="OSC_h2_1"></span> <h2 style=""><strong><span style="color: rgb(83, 83, 83);font-size: 19px;">一、腾讯的氛围适合有自驱力的人</span></strong></h2> <section style=""><span style="color: rgb(83, 83, 83);font-size: 15px;">我能直观感受到的就是在员工成长上也很自由,公司会给每一个入职的新人分配“导师”,让“学生”在工作和生活上遇到困难时都可以求助。我之前的导师其实不太管我,我不找他,基本上不主动让我做什么,但他的专业能力很强,我通过观察从他身上学到很多的东西。</span> </section><section style=""><span style="color: rgb(83, 83, 83);font-size: 15px;">导师不用硬塞给新人一些理念,只要做好自己的事情,有自己的价值观,新人就可以自己观察和思考。总的来说,擅长观察和模仿的学生就能很快成长。</span> </section><section style=""><span style="color: rgb(83, 83, 83);font-size: 15px;">我的几任leader都很好。leader会鼓励我选定一个课题去研究,遇到困难就帮我梳理思路,慢慢学会自己做一些决策,后来就是给更多责任,去带人和带团队。</span> </section><section style=""><span style="color: rgb(83, 83, 83);font-size: 15px;">后来我的直属经理(ISUX的掌门人)对我更好,他观察到我在专业发展遇到瓶颈,同时对项目本身的体验问题非常积极,就问我要不要换一个课题研究——产品体验设计,这给我打开新的大门。</span> </section><section style=""><span style="color: rgb(83, 83, 83);font-size: 15px;">还有业务部门的经理、开发总监甚至VP,也很信任地给我机会做一些项目策划的事情,从项目和用户体验的源头去策划需求,而不是接到一个需求然后去做。我在项目中学到很多产品闭环的知识,也从ISUX中学到很多专业细分的东西。</span> </section><section style=""><img data-backh="562" data-backw="562" data-ratio="1" data-type="jpeg" data-w="1920" style="margin-top: 30px;margin-bottom: 30px;border-width: 0px;border-style: initial;border-color: initial;border-radius: 4px;width: 522.667px;box-sizing: border-box !important;visibility: visible !important;" class="b-lazy" data-src="https://oscimg.oschina.net/oscnet/0380ef87-27f5-42a0-8b04-d6c2745cd2d8.jpg" data-original="https://oscimg.oschina.net/oscnet/0380ef87-27f5-42a0-8b04-d6c2745cd2d8.jpg" src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" /></section><section style=""><span style="color: rgb(83, 83, 83);font-size: 15px;">上图是社交线的老板Ross送我的临别礼物</span> </section><section style=""><span style="color: rgb(83, 83, 83);font-size: 15px;"><span style="font-weight: 600;">我领悟到真正好的领导就是信任下属,让下属去做一件可能失败的事情,这过程比培训和教育都有效,因为它让人有自驱力,让人有成就感。</span> (当然,你也要值得信任,不要总甩锅说我没成就的原因是领导不信任)</span> </section><section style=""><span style="color: rgb(83, 83, 83);font-size: 15px;">我很幸运遇到这么好的老板,也努力把这种价值观传导给自己团队。通过招聘、授权和辅导传达我的做事方法和理念,我可以自信地说我培养了一个战斗力很强的产品设计团队。</span> </section><section style=""><span style="color: rgb(83, 83, 83);font-size: 15px;">真心推荐朋友们加入腾讯、<span style="font-weight: 600;">加入ISUX</span> (我在的部门)。</span> </section><section style=""><img data-ratio="1" data-type="jpeg" data-w="1920" style="margin-top: 30px;margin-bottom: 30px;background-color: rgb(238, 237, 235);border-width: 0px;border-style: initial;border-color: initial;background-size: 22px;background-position: center center;background-repeat: no-repeat;border-radius: 4px;height: 523px !important;box-sizing: border-box !important;width: 523px !important;" class="b-lazy" data-src="https://oscimg.oschina.net/oscnet/b07fbf31-70c4-4573-9528-ae2aad26e53c.jpg" data-original="https://oscimg.oschina.net/oscnet/b07fbf31-70c4-4573-9528-ae2aad26e53c.jpg" src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" /></section><section style=""><span style="color: rgb(83, 83, 83);font-size: 15px;">上图是ISUX所有总监和leader们给我的临别签名礼</span> </section><section style=""><span style="color: rgb(83, 83, 83);font-size: 15px;">那为什么非要离开呢?其实我在每年7月的入职日都会想,如果今年离职,我会交上怎样的答卷?</span> </section><section style=""><span style="color: rgb(83, 83, 83);font-size: 15px;"><span style="font-weight: 600;">我希望能在自己状态最好的情况下离职,因此我每每发现还有很多东西需要学习,自己的观念和行为有优化空间,我就会有动力继续做下去。</span> </span> </section><section style=""><span style="color: rgb(83, 83, 83);font-size: 15px;">如果我今年不离开,明年再交卷,我还能有哪些成长改变呢?我越来越不敢想。</span> </section><section style=""><span style="color: rgb(83, 83, 83);font-size: 15px;">回顾一下我在腾讯做的一些事情:</span> </section><section style=""><span style="color: rgb(83, 83, 83);font-size: 15px;">第一阶段:专注提升效率、技术成长、学习用户体验的概念。第二阶段:被动交付到主动发现并推动落地,注意力对单个专业的执念转为对商业和产品目标的关注。第三阶段:独立负责产品设计,利用自己跨界的专业,提升影响力,在产品中发挥正向的领导作用(设计侧、产品侧、开发侧)。</span> </section><p style="white-space: normal;"><br /></p> <ul class="list-paddingleft-2" style=""><li style="padding-left: 21.425px;list-style: square;font-size: 15px;color: rgb(83, 83, 83);"> <section style="margin-top: 15px;margin-bottom: 15px;line-height: 1.75em;letter-spacing: 2px;"> 2010:作为“页面重构”加入腾讯,进入B2 </section></li> <li style="padding-left: 21.425px;list-style: square;font-size: 15px;color: rgb(83, 83, 83);"> <section style="margin-top: 15px;margin-bottom: 15px;line-height: 1.75em;letter-spacing: 2px;"> 2011:ISUX成立,加入ISUX </section></li> <li style="padding-left: 21.425px;list-style: square;font-size: 15px;color: rgb(83, 83, 83);"> <section style="margin-top: 15px;margin-bottom: 15px;line-height: 1.75em;letter-spacing: 2px;"> 2012:翻译第一本书《Responsive Web Design Workflow》 </section></li> <li style="padding-left: 21.425px;list-style: square;font-size: 15px;color: rgb(83, 83, 83);"> <section style="margin-top: 15px;margin-bottom: 15px;line-height: 1.75em;letter-spacing: 2px;"> 2013:翻译第二本书《Smashing Book》 </section></li> <li style="padding-left: 21.425px;list-style: square;font-size: 15px;color: rgb(83, 83, 83);"> <section style="margin-top: 15px;margin-bottom: 15px;line-height: 1.75em;letter-spacing: 2px;"> 2014:升职为UI开发组leader </section></li> <li style="padding-left: 21.425px;list-style: square;font-size: 15px;color: rgb(83, 83, 83);"> <section style="margin-top: 15px;margin-bottom: 15px;line-height: 1.75em;letter-spacing: 2px;"> 2015:写作出版《全栈工程师的自我修养》 </section></li> <li style="padding-left: 21.425px;list-style: square;font-size: 15px;color: rgb(83, 83, 83);"> <section style="margin-top: 15px;margin-bottom: 15px;line-height: 1.75em;letter-spacing: 2px;"> 2016:作为腾讯云布道师宣讲课程、写专栏 </section></li> <li style="padding-left: 21.425px;list-style: square;font-size: 15px;color: rgb(83, 83, 83);"> <section style="margin-top: 15px;margin-bottom: 15px;line-height: 1.75em;letter-spacing: 2px;"> 2017:转为腾讯微云的用户体验设计负责人,转专业为产品体验设计 </section></li> <li style="padding-left: 21.425px;list-style: square;font-size: 15px;color: rgb(83, 83, 83);"> <section style="margin-top: 15px;margin-bottom: 15px;line-height: 1.75em;letter-spacing: 2px;"> 2019:交上答卷,从腾讯毕业! </section></li> </ul><p style="white-space: normal;"><br /></p> <section style=""><span style="color: rgb(83, 83, 83);font-size: 15px;">我用“毕业”这个词,因为腾讯对毕业生而言,不太像一个企业,而像大学的延续。</span> </section><section style=""><span style="color: rgb(83, 83, 83);font-size: 15px;">作为“优等生”,我可以一直不交卷。</span> </section><section style=""><span style="color: rgb(83, 83, 83);font-size: 15px;">腾讯专业线和KPI设置一些高度抽象的、与现实有些脱节的目标(恕我直言,比如在某些产品目标上分解得太细,让你的目光都一直聚焦在方片之间),但是我越来越想要成为一个能力闭环的人,看到全局的人,生命力坚韧的人。</span> </section><section style=""><img data-ratio="1" data-type="jpeg" data-w="1920" style="margin-top: 30px;margin-bottom: 30px;border-width: 0px;border-style: initial;border-color: initial;border-radius: 4px;box-sizing: border-box !important;width: 539px !important;visibility: visible !important;" class="b-lazy" data-src="https://oscimg.oschina.net/oscnet/d7d87cd5-dcd4-4382-ab45-c5b749720a99.jpg" data-original="https://oscimg.oschina.net/oscnet/d7d87cd5-dcd4-4382-ab45-c5b749720a99.jpg" src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" /></section><section style=""><span style="color: rgb(83, 83, 83);font-size: 15px;">我不会狂妄地觉得自己已经学不到东西了,我在一些细分的专业领域仍然有很多可以学习,但在想要做全流程价值设计这个课题上,我想要有突破。</span> </section><span id="OSC_h2_2"></span> <h2 style=""><span style="font-size: 19px;"><strong><span style="color: rgb(83, 83, 83);">二、从行业外的人身上学到的最多</span></strong></span></h2> <section style=""><span style="color: rgb(83, 83, 83);font-size: 15px;">回想起来,我几乎所有的重要理念都是跟跨界的人沟通学来的。</span> </section><section style=""><span style="color: rgb(83, 83, 83);font-size: 15px;">我从13年就通过买房认识了刚来深圳打拼的房产中介,我发现他对“做生意”有自己的一套哲学和策略。比如不把一次成交当做“交易”:付出努力然后获得中介费。</span> </section><section style=""><span style="color: rgb(83, 83, 83);font-size: 15px;"><span style="font-weight: 600;">而是把每一次交易当做“投资”</span> ,通过好的服务切入点(只推荐最有性价比的房源,再努力杀价到底线),以及长期客户关怀,获得“口碑账户”的增长,然后在未来收获更多的回头客。即使是买房这样的低频行为,他也很在意长期客户关怀,因为维护好这些客户,后续可能会拓展出新的商业机会。</span> </section><section style=""><span style="color: rgb(83, 83, 83);font-size: 15px;">我从他那里学到很多,自然也会推荐朋友在他那里成交,这是双赢的。他现在已经拥有好几家房产领域的公司。</span> </section><section style=""><span style="color: rgb(83, 83, 83);font-size: 15px;">早些年我出于兴趣,工作外时间开发了一个电商导购CMS,完全基于用程序员思维设计,让零技术的人也可以搭建一个自己的垂类导购平台,自己引流然后收取按比例的抽成。比如你用我的系统自己搭建了一个口红店网站,用户去点击就跳转到天猫购买,你就可以抽成。</span> </section><section style=""><span style="color: rgb(83, 83, 83);font-size: 15px;">我不是出于盈利为目标开发系统,都是开源的,你随便用。我只是把它当做一个开放式系统,写好模块的分离和封装,写好注释,以方便其他开发者去修改和优化。我还好好设计了初始化和安装系统,方便那些不懂技术的店主自己傻瓜式安装。基本上都是程序员应该做好的事情,然后这个项目在GitHub上还登上了全球每周新项目周排行榜。</span> </section><section style=""><span style="color: rgb(83, 83, 83);font-size: 15px;">接下来有意思的事情发生了,这个系统获得关注初创公司的媒体报道,于是就有两家风投联系我,而且两家都是国际大公司。其中一个人约我当面聊一下,我一看头像,是年轻漂亮的女生,我想着风投那就是给我钱呗,就去了。</span> </section><section style=""><span style="color: rgb(83, 83, 83);font-size: 15px;">结果聊下来,她说了一大堆我不懂的概念和词,问商业模式是什么,问 <span style="font-weight: 600;">如果拿到500万天使轮,你会拿它做什么。</span> 是建立开发团队,还是销售?我什么都没想过。</span> </section><section style=""><span style="color: rgb(83, 83, 83);font-size: 15px;">最后自然是什么都没有发生,<span style="font-weight: 600;">但我觉得这事儿太有趣了,她那么年轻就可以去跟每一个行业的专家聊,你的商业模式是什么,我如果给你500万、5000万、5亿你要怎么用。</span></span> </section><section style=""><span style="color: rgb(83, 83, 83);font-size: 15px;">于是我也开始读这方面的书。我也读很多乱七八糟的,推理小说和科幻系列、团队管理和企业经营、宏观经济和行业分析、历史和传记、群体心理分析和自我思维训练……离我的行业越远的,我学到的越多。</span> </section><section style=""><span style="color: rgb(83, 83, 83);font-size: 15px;">直到现在,我还会收到一些邮件,问能不能付费请我帮忙优化功能,我说我已经不做这个项目了。我发现2B的生意,其实他们是渴望付费的,只要你能产生增量价值。</span> </section><span id="OSC_h2_3"></span> <h2 style=""><span style="font-size: 19px;"><strong><span style="color: rgb(83, 83, 83);">三、说说信息茧房和跨界交流</span></strong></span></h2> <section style=""><span style="color: rgb(83, 83, 83);font-size: 15px;">在腾讯内,有很多专家,在专业领域研究得非常细,比如设计、开发。不过在合作起来做一个产品时,有时不是很顺畅,我自己也感受到最终交付给用户的产品不是符合需求的,或者是与真实场景脱节的,或者是过于自嗨的,有缺陷的。<span style="font-weight: 600;">每个中心汇报,好像都很好很牛逼,但加起来产品就是不好没人用,这是为什么呢?</span></span> </section><section style=""><span style="color: rgb(83, 83, 83);font-size: 15px;">后来在哈佛商业评论看到一篇文章写部门墙(也就是“信息壁垒”),原来这是每个组织各擅其长的不良副产品。由于重要情报囿于各个壁垒之中,很可能造成整个公司的价值低于各部门价值总和。但这些部门壁垒中存在缺口,对想成为中间人者就是机会,他们可以在这些缺口之间架起桥梁。</span> </section><section style=""><span style="color: rgb(83, 83, 83);font-size: 15px;">谁能同时掌握双方的语言,了解双方的需求和资源,而且能在恰当的时候把合适的资源引导到另一方,谁就能给公司和个人带来好处,就是“桥梁”。<span style="font-weight: 600;">他们不必有官方授权,通过领导式的行为,别人就会把他们视为领导者。</span></span> </section><section style=""><span style="color: rgb(83, 83, 83);font-size: 15px;">突破信息茧房,获取各方信息,是我越来越熟练掌握的技能。我有时候给GM或开发总监提一些建议,或者说开发想做某些功能,我也诚实地说这不符合用户的心智模型和场景,很多时候都能说服对方。我不止一次听身边同事和隔壁团队的人说,好像你在项目里的影响力很大,而且口碑也很好,我觉得这是我蛮骄傲的一件事。</span> </section><section style=""><span style="color: rgb(83, 83, 83);font-size: 15px;">我跟一些总监聊,大家其实也看得很清楚,之前常常说“打磨”“梳理”“探索”,主语都是我做什么。<span style="font-weight: 600;">这两年开始出现在口边的两个词是“自嗨”和“生意”</span>。其实之前也应该这样想问题,但巨大的流量红利和快速的增长让人不需要这样思考。</span> </section><section style=""><span style="color: rgb(83, 83, 83);font-size: 15px;">以前一说“商业模式”大家就反感,觉得体验要下降,其实是把商业模式定义狭隘了,好像只有流量变现、免费-付费、会员这几种方法。<span style="font-weight: 600;">做生意是战略设计,不是令人眼花缭乱的战术。</span></span> </section><section style=""><span style="color: rgb(83, 83, 83);font-size: 15px;">去年有一次,开发总监还半开玩笑说我其实把你定位为产品团队和设计团队的负责人。即使是随便说说,我也很感激,但我还是更喜欢做用户体验设计,一方面跟产品KPI保持一定距离,做一个观察者也许能更清醒,一方面研究用户体验真的很有趣啊。</span> </section><section style=""><span style="color: rgb(83, 83, 83);font-size: 15px;">我慢慢从跨界中找到理想、兴趣和擅长的完美契合,我决心做好“广义的”用户价值设计。</span> </section><span id="OSC_h2_4"></span> <h2 style=""><span style="font-size: 19px;"><strong><span style="color: rgb(83, 83, 83);">四、谁创造价值,谁拿走利润</span></strong></span></h2> <section style=""><span style="color: rgb(83, 83, 83);font-size: 15px;">我们平时讲用户体验,这个词好大。<span style="font-weight: 600;">什么是用户体验?在我看来,就是简简单单的“用户价值”4个字。这绝不是单纯的“界面”或“交互”或某个单一的“感觉”,而是整体价值。必须得创造增量价值。如果用户体验设计师看不到全局,就不会知道“用户价值”最薄弱的地方在哪里。</span></span> </section><section style=""><span style="font-weight: 600;color: rgb(83, 83, 83);font-size: 15px;">细分专业非常有价值,也是需要很多年积累的,是你个人能力的护城河。但要对用户产生价值,需要有中间人将专业的资源放在用户需要的地方。</span> </section><section style=""><span style="color: rgb(83, 83, 83);font-size: 15px;">说一个简单的例子,在微信中开发小游戏,如果给专业人士来怎么做?策划做故事和数值设计、设计师绘大量图标和动画、程序员找游戏引擎编出整个游戏来,团队打磨整个游戏引导、体验,给身边朋友玩了都说好,很专业吧。</span> </section><section style=""><span style="color: rgb(83, 83, 83);font-size: 15px;">但一上线,数据上不来,投入都打水漂,因为你的游戏很难分发到千万玩家那里。那怎么办?找游戏发行商,把广告收入跟他分成。在小游戏行业,游戏分发比游戏品质价值更高,因此,发行商要拿走比开发团队还多的利润。</span> </section><section style=""><span style="color: rgb(83, 83, 83);font-size: 15px;">大游戏也是一样。因为用户流量更聚集在社交媒体、头部信息流(不论是图文还是短视频)、大手机厂商的应用商店,小的发行渠道倒闭很多,现在游戏分发行业聚合度已经很高,单用户价格也很高。</span> </section><section style=""><span style="color: rgb(83, 83, 83);font-size: 15px;"><span style="font-weight: 600;">谁创造价值,谁拿走利润。</span> 以前国家、行业和公司红利叠加太多的情况下,总流量永远在增加,你的专业在哪里都有人买单,但现在你的位置不在有价值的区域,就要考虑风险。</span> </section><section style=""><span style="color: rgb(83, 83, 83);font-size: 15px;">如果你没产生用户价值,但公司还在给你丰厚的收入,那一定是有人在买单。早期腾讯策略是让大家做好很多自闭环的创新,赌某些产品能够跑出来,以后还会这样对赌吗,如果趋势是向管理要效率的话,不一定。即使还会维持下去,我也不想自己成为“被补贴”的那一个。</span> </section><span id="OSC_h2_5"></span> <h2 style=""><span style="font-size: 19px;"><strong><span style="color: rgb(83, 83, 83);">五、无知和弱小不是生存的障碍,傲慢才是</span></strong></span></h2> <section style=""><span style="color: rgb(83, 83, 83);font-size: 15px;">高高在上的互联网想要拯救落后土气的传统行业,有问过传统行业的意见吗?</span> </section><section style=""><span style="color: rgb(83, 83, 83);font-size: 15px;">记得15年左右,互联网行业高歌猛进,流量红利达到巅峰,那时候朋友圈转的都是 <span style="font-weight: 600;">“我消灭你,与你无关”</span> 这样的主题。这句话来自《三体》,表达了外星人跨维度碾压人类时将人类看为蝼蚁的那种态度。</span> </section><section style=""><span style="color: rgb(83, 83, 83);font-size: 15px;">这句话确实嚣张跋扈但充满大智慧,我们饶有趣味地发现消灭康师傅的是美团外卖,消灭口香糖的是微信(之前买单的时候无聊就会拿起口香糖)。要命的是人家根本没想要消灭你,就是想做好自己的生意,你就活不下去了。</span> </section><section style=""><span style="color: rgb(83, 83, 83);font-size: 15px;">这句话揭示了世界运作的残酷真相,但互联网人完全将它误读了。</span> </section><section style=""><span style="font-weight: 600;color: rgb(83, 83, 83);font-size: 15px;">高端大气的互联网人将自己视为“三体人”,将线下生意人视为“地球人”,傲慢导致思考层次很浅,进而做出错误的决策。很多时候,互联网人想要拿走线下的利润都是失败的。</span> </section><section style=""><span style="color: rgb(83, 83, 83);font-size: 15px;">搜房网想从房类门户转做线下交易,被链家断了房源接口后直接失败。以为是自己的弱小和无知造成的,其实根本原因是,别人看你不爽,觉得你太张狂了。所以才去打击你,什么资本都没有,还在那里到处炫耀。你想跟他下棋,想了挺多策略应该可以赢吧,人家直接掀棋盘,把你砸死了。</span> </section><section style=""><span style="color: rgb(83, 83, 83);font-size: 15px;">所以,这两年,互联网人低调很多,不再谈“互联网+”,主语是互联网,强调互联网对传统行业的渗透和改变。现在变成“产业互联网”,把“产业”放在“互联网”前面。诚诚恳恳地宣告,我是来服务你们的。</span> </section><section style=""><span style="color: rgb(83, 83, 83);font-size: 15px;">有态度首先是好的,但一定做得好吗?我们坐在北上广深格子间,喝着星巴克咖啡,怎么能洞察到某个垂类行业的命门呢?事实上我们连在自己战场的发生的突袭都看不到,看不到拼多多,看不到抖音快手。中国太大,人群太复杂,我们不能用同一种方式在所有的战场都打胜仗。</span> </section><section style=""><span style="color: rgb(83, 83, 83);font-size: 15px;">所以,我更喜欢的来自《三体》的一句话是:<span style="font-weight: 600;">无知和弱小不是生存的障碍,傲慢才是。</span></span> </section><section style=""><span style="color: rgb(83, 83, 83);font-size: 15px;">很多人为了方便自己理解,或者在跟同事朋友聊起来有个谈资,就用标签去定义某个正在发生的事情。</span> </section><section style=""><span style="color: rgb(83, 83, 83);font-size: 15px;">知乎上很多人定义钉钉就是体验差,我们认定“有钉必达”是毫无人性,“工作时长排名”是错误的价值观,就觉得我们看到了钉钉的全貌,其实我们看到的只是用户端浮出水面的东西,真正冰山下面的行业能力和基础设施都没有观察到。</span> </section><section style=""><span style="color: rgb(83, 83, 83);font-size: 15px;">这一方面是员工视角,看不到老板对这个产品的认可;另一方面是思维的懒惰:<span style="font-weight: 600;">好了,我知道了这是怎么个产品了,不需要告诉我更多了,我可以赢它。</span></span> </section><section style=""><span style="color: rgb(83, 83, 83);font-size: 15px;">我敢打赌,我随便说一下现在仍然存在的行业,你马上就会有标签冒出来。“房产中介”——收佣金的。“医药代表”——推销药的。“保险”——推销我不需要的东西的。</span> </section><section style=""><span style="color: rgb(83, 83, 83);font-size: 15px;">标签会阻碍人进行第二层、第三层的思考,你看到的世界是抽象且片面的。没错,这些行业一定有可以优化的地方,但他们存在的理由你需要看到。</span> </section><span id="OSC_h2_6"></span> <h2 style=""><span style="color: rgb(83, 83, 83);font-size: 19px;"><strong>六、综合考虑理性和价值观</strong></span></h2> <section style=""><span style="color: rgb(83, 83, 83);font-size: 15px;">综合考虑,我决定离开公司。在腾讯九年已经获得足够的积累,现在可以不用太担心收入的问题,想要的东西也都能买到。</span> </section><section style=""><span style="font-weight: 600;color: rgb(83, 83, 83);font-size: 15px;">人做决策有很多潜意识叠加作用,但潜意识绝不是非理性。</span> </section><section style=""><span style="color: rgb(83, 83, 83);font-size: 15px;">之前刚从前端团队转为带设计团队,业务老板跟我私下说过,你要做好设计,需要多增加一些感性思维。这是非常有价值的建议。</span> </section><section style=""><span style="color: rgb(83, 83, 83);font-size: 15px;">因为绝大部分用户群是注意力涣散的(也有人说用户只有七岁智商),所以做产品设计要带有感性思维。利用偏见是设计师的工作,比如“美”就是一种偏见,还有“品牌”也是偏见,“看见免费就点”是偏见,“看到打折就买”也是偏见。<span style="font-weight: 600;">这些偏见谁利用得好谁就能给产品和用户增加价值。</span></span> </section><section style=""><span style="color: rgb(83, 83, 83);font-size: 15px;">我经过锻炼,苦苦思考,发现确实能把“研究潜意识行为”这件事越做越好。每当自己想潜意识做一些行为,或抗拒某些行为,我就用理性思维反思为什么会这样。</span> </section><section style=""><span style="color: rgb(83, 83, 83);font-size: 15px;">经过不断的锻炼,我已经习惯性挖掘潜意识决策的原因。设计用户体验要随时通过潜意识做决定,然后再切回专注和理性,深入思考为什么刚才自己做出了这样的决策。</span> </section><section style=""><span style="font-weight: 600;color: rgb(83, 83, 83);font-size: 15px;">我有了“必须离开公司避风港”的潜意识,于是就仔细挖掘底层原因。</span> </section><section style=""><span style="color: rgb(83, 83, 83);font-size: 15px;">我虽然不会说凡事计算得很精确,但大体都会估算概率和收益,以便综合计算期望值。我在做网盘类产品分析的时候,研究过行业(GMV总量多大?需求有没有被满足?市场在增长吗?);研究过已有的竞争者(他们的定位是什么?分别解决谁的什么问题?天花板多高?他们做的怎么样?护城河有多厚?);研究过团队(在行业中摸爬滚打多少年?有没有快速验证假设并调转方向的思维和能力?)</span> </section><section style=""><span style="color: rgb(83, 83, 83);font-size: 15px;">我还研究同行业的上市公司,从公司新闻和对应的股价波动的对应关系中,反推投资者看中公司的关键指标是什么?吐槽一句,互联网公司产品经常把北极星指标设置为DAU,认为有流量就能变现,其实过于盲目了,专业投资者不会这么看,流量也分离消费近的和远的。SaaS的生意更不用看DAU,要看需求满足度、看在价值链中的位置、看license的加购率。</span> </section><section style=""><span style="color: rgb(83, 83, 83);font-size: 15px;">我当时经过测算,很不幸,网盘类产品现在在中国天花板很低,而我们的品牌定位在跟竞争对手的定位没法做出足够的差异化,因此只能身陷价格竞争的泥沼和产品创新的陷阱(很多创新都不是用户需求)。即使经过苦苦挖掘商业价值,利润仍然低得可怜。这纯属个人观点,不构成任何建议,你可以自己思考。</span> </section><section style=""><span style="color: rgb(83, 83, 83);font-size: 15px;">所以我想找到一个天花板足够高的市场,找出没有被挖掘出来的用户价值,制定足够清晰的定位和策略,加入或打造一个还可以的团队,制造出一个或多个MPF(Market Product Fit,市场-产品匹配)的产品,做出足够快速而可用的执行,来增加这个市场的价值。</span> </section><section style=""><span style="color: rgb(83, 83, 83);font-size: 15px;">在这个过程中,我通过自己的跨专业能力(用户体验知识、比较宽的技术知识体系、对市场和需求的理解)做好用户价值路径上的大部分重要的事情。在这个过程中,我顺手实现自己的价值。</span> </section><section style=""><span style="color: rgb(83, 83, 83);font-size: 15px;">我在从UI工程师转到产品体验设计时,把之前拿过的所有四五星奖牌都丢掉了(抱歉)。<span style="font-weight: 600;">我并不是不尊重荣誉,而是一直期待,接下来这个工作是如此有意义,以至于让我之前的成绩都不值一提。</span></span> </section><section style=""><span style="font-size: 15px;color: rgb(83, 83, 83);font-weight: 600;"><img data-ratio="1" data-type="jpeg" data-w="1920" style="margin-top: 30px;margin-bottom: 30px;color: rgb(51, 51, 50);font-size: 16px;border-width: 0px;border-style: initial;border-color: initial;border-radius: 4px;box-sizing: border-box !important;width: 539px !important;visibility: visible !important;" class="b-lazy" data-src="https://oscimg.oschina.net/oscnet/9c039719-d322-4a20-8b88-22b37d8aa767.jpg" data-original="https://oscimg.oschina.net/oscnet/9c039719-d322-4a20-8b88-22b37d8aa767.jpg" src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" /></span> </section><section style=""><span style="color: rgb(83, 83, 83);font-size: 15px;">我不想畏手畏脚错过人生的关键路口。在成年人的世界中前进基本上是自己做决定,没人会提醒你这个路口一定要左转或右转,但你必须做出决定,你的决定加起来构成了你的人生。</span> </section><section style=""><span style="color: rgb(83, 83, 83);font-size: 15px;">感谢老婆和家人,对我的决定完全支持和鼓励,让我可以像一个理想主义者那样选择事业;</span> </section><section style=""><span style="color: rgb(83, 83, 83);font-size: 15px;">感谢理解并支持我出来的老板们,让我在最后一天到来时越来越不舍甚至想放弃;</span> </section><section style=""><span style="color: rgb(83, 83, 83);font-size: 15px;">感谢一直在成长的优秀的团队,让我能够放心交付项目;</span> </section><section style=""><span style="color: rgb(83, 83, 83);font-size: 15px;">感谢对我的选择做出质疑的真心朋友,让我能够从你们的视角和逻辑去反思;</span> </section><section style=""><span style="color: rgb(83, 83, 83);font-size: 15px;">感谢所有的同事朋友,很幸运遇到你们,我从每一个人身上都学到很多,也度过了最美好的一段时光,我们有缘再见。</span> </section><span id="OSC_h2_7"></span> <h2 data-id="heading-13" style="margin: 35px 8px 10px;padding-bottom: 12px;font-size: 24px;white-space: normal;text-align: left;color: rgb(0, 0, 0);caret-color: rgb(51, 51, 51);letter-spacing: 0.544px;text-size-adjust: auto;line-height: 1.5;border-bottom: 1px solid rgb(236, 236, 236);font-family: &quot;PingFang SC&quot;, &quot;Source Sans Pro&quot;, &quot;Hiragino Sans GB&quot;, &quot;Helvetica Neue&quot;, Helvetica, &quot;Microsoft Yahei&quot;, arial, sans-serif;background-color: rgb(255, 255, 255);">最后</h2> <section style="margin-bottom: 20px;padding-right: 0.5em;padding-left: 0.5em;white-space: normal;font-size: 16px;letter-spacing: 2px;text-align: left;font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &quot;PingFang SC&quot;, Cambria, Cochin, Georgia, Times, &quot;Times New Roman&quot;, serif;caret-color: rgb(51, 51, 51);text-size-adjust: auto;widows: 1;word-spacing: 2px;background-color: rgb(255, 255, 255);line-height: 1.8em;color: rgb(58, 58, 58);"> 欢迎关注【前端瓶子君】✿✿ヽ(°▽°)ノ✿ <br /></section><section style="margin-bottom: 20px;padding-right: 0.5em;padding-left: 0.5em;white-space: normal;font-size: 16px;letter-spacing: 2px;text-align: left;font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &quot;PingFang SC&quot;, Cambria, Cochin, Georgia, Times, &quot;Times New Roman&quot;, serif;caret-color: rgb(51, 51, 51);text-size-adjust: auto;widows: 1;word-spacing: 2px;background-color: rgb(255, 255, 255);line-height: 1.8em;color: rgb(58, 58, 58);"><span style="letter-spacing: 0px;">欢迎关注「前端瓶子君」,回复「</span> <span style="letter-spacing: 0px;color: rgb(61, 167, 66);">算法</span> <span style="letter-spacing: 0px;">」,加入前端算法源码编程群,每日一刷(工作日),<span style="letter-spacing: 2px;">每题瓶子君都会很认真的解答哟</span><span style="letter-spacing: 2px;">!</span></span> <br /></section><section style="margin-bottom: 20px;padding-right: 0.5em;padding-left: 0.5em;white-space: normal;font-size: 16px;letter-spacing: 2px;text-align: left;font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &quot;PingFang SC&quot;, Cambria, Cochin, Georgia, Times, &quot;Times New Roman&quot;, serif;caret-color: rgb(51, 51, 51);text-size-adjust: auto;widows: 1;word-spacing: 2px;background-color: rgb(255, 255, 255);line-height: 1.8em;color: rgb(58, 58, 58);"><span style="letter-spacing: 0px;"><span style="letter-spacing: 0px;">回复「</span><span style="letter-spacing: 0px;color: rgb(61, 167, 66);">交流</span><span style="letter-spacing: 0px;">」,吹吹水、聊聊技术、吐吐槽!</span></span> </section><section style="margin-bottom: 20px;padding-right: 0.5em;padding-left: 0.5em;white-space: normal;font-size: 16px;letter-spacing: 2px;text-align: left;font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &quot;PingFang SC&quot;, Cambria, Cochin, Georgia, Times, &quot;Times New Roman&quot;, serif;caret-color: rgb(51, 51, 51);text-size-adjust: auto;widows: 1;word-spacing: 2px;background-color: rgb(255, 255, 255);line-height: 1.8em;color: rgb(58, 58, 58);"><span style="letter-spacing: 0px;">回复「</span> <span style="letter-spacing: 0px;color: rgb(61, 167, 66);">阅读</span> <span style="letter-spacing: 0px;">」,每日刷刷高质量好文!</span> </section><section style="margin-bottom: 20px;padding-right: 0.5em;padding-left: 0.5em;white-space: normal;font-size: 16px;letter-spacing: 2px;text-align: left;font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &quot;PingFang SC&quot;, Cambria, Cochin, Georgia, Times, &quot;Times New Roman&quot;, serif;caret-color: rgb(51, 51, 51);text-size-adjust: auto;widows: 1;word-spacing: 2px;background-color: rgb(255, 255, 255);line-height: 1.8em;color: rgb(58, 58, 58);"><span style="letter-spacing: 0px;">如果这篇文章对你有帮助,<span style="letter-spacing: 0px;">「</span><span style="letter-spacing: 0px;color: rgb(61, 167, 66);">在看</span><span style="letter-spacing: 0px;">」是最大的支持</span><br /></span> </section><figure data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;padding-right: 0.5em;padding-left: 0.5em;white-space: normal;font-size: 16px;letter-spacing: 2px;text-align: left;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &quot;PingFang SC&quot;, Cambria, Cochin, Georgia, Times, &quot;Times New Roman&quot;, serif;caret-color: rgb(51, 51, 51);text-size-adjust: auto;widows: 1;word-spacing: 2px;background-color: rgb(255, 255, 255);"><img data-ratio="0.4255555555555556" data-type="png" data-w="900" style="margin-right: auto;margin-bottom: 15px;margin-left: auto;border-radius: 5px;display: block;box-sizing: border-box !important;width: 558px !important;visibility: visible !important;" class="b-lazy" data-src="https://oscimg.oschina.net/oscnet/47bc8179-e82d-4be4-98e6-03a639f121c6.png" data-original="https://oscimg.oschina.net/oscnet/47bc8179-e82d-4be4-98e6-03a639f121c6.png" src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" /></figure><section style="margin-top: 5px;margin-bottom: 10px;padding-right: 0.5em;padding-left: 0.5em;white-space: normal;font-size: 16px;letter-spacing: 2px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &quot;PingFang SC&quot;, Cambria, Cochin, Georgia, Times, &quot;Times New Roman&quot;, serif;caret-color: rgb(51, 51, 51);text-size-adjust: auto;widows: 1;word-spacing: 2px;background-color: rgb(255, 255, 255);text-align: center;"><a class="weapp_text_link" data-miniprogram-appid="wx27c980b913cbfb08" data-miniprogram-path="pages/index/index" data-miniprogram-nickname="高级前端面试" data-miniprogram-type="text" data-miniprogram-servicetype="0" style="font-size: 16px;cursor: pointer;" href="" rel="nofollow">》》面试官也在看的算法资料《《</a> </section><section style="padding-right: 0.5em;padding-left: 0.5em;white-space: normal;color: rgb(89, 89, 89);font-family: Optima-Regular, Optima, PingFangTC-Light, PingFangSC-light, PingFangTC-light;font-size: 16px;letter-spacing: 2px;caret-color: rgb(51, 51, 51);text-size-adjust: auto;widows: 1;word-spacing: 2px;background-color: rgb(255, 255, 255);border-width: 0px;border-style: none;border-color: initial;text-align: right;"><section style="display: inline-block;clear: both;"><section data-brushtype="text" style="padding: 18px 15px 20px 10px;color: rgb(86, 146, 214);background-image: url(&quot;https://oscimg.oschina.net/oscnet/8afe785e-93df-4381-868a-546793f638a8.png&quot;);text-align: center;background-size: 100% 100%;letter-spacing: 1.5px;background-repeat: no-repeat;"><section style="display: flex;justify-content: center;align-items: center;"><section data-brushtype="text" style="font-size: 14px;color: rgb(51, 51, 51);text-align: right;"><span style="font-family: 楷体, 楷体_GB2312, SimKai;color: rgb(255, 104, 39);">“在看和转发”</span> <span style="font-family: 楷体, 楷体_GB2312, SimKai;">就是最大的支持</span> </section></section></section></section></section></div> <p style="color: #858585; font-size: 13px;">本文分享自微信公众号 - 前端瓶子君(pinzi_com)。<br />如有侵权,请联系 support@oschina.cn 删除。<br />本文参与“<a href="https://www.oschina.net/sharing-plan" target="_blank" rel="nofollow">OSC源创计划</a>”,欢迎正在阅读的你也加入,一起分享。</p> <div class="alert alert-success" role="alert"><p>来源:<code>oschina</code></p><p>链接:<code>https://my.oschina.net/u/4593024/blog/4957438</code></p></div></div> <div class="field field--name-field-tags field--type-entity-reference field--label-above"> <div class="field--label">标签</div> <div class="field--items"> <div class="field--item"><a href="/tag/mianshi" hreflang="zh-hans">面试</a></div> <div class="field--item"><a href="/tag/github" hreflang="zh-hans">github</a></div> <div class="field--item"><a href="/tag/workflow" hreflang="zh-hans">workflow</a></div> <div class="field--item"><a href="/tag/weblog" hreflang="zh-hans">Weblog</a></div> </div> </div> Sat, 20 Feb 2021 08:16:50 +0000 佐手、 4120509 at https://www.e-learn.cn 仅使用CSS就可以提高页面渲染速度的4个技巧 https://www.e-learn.cn/topic/4120506 <span>仅使用CSS就可以提高页面渲染速度的4个技巧</span> <span><span lang="" about="/user/217" typeof="schema:Person" property="schema:name" datatype="">随声附和</span></span> <span>2021-02-20 16:16:19</span> <div class="field field--name-body field--type-text-with-summary field--label-hidden field--item"> <div class="rich_media_content" id="js_content"> <section data-tool="mdnice编辑器" data-website="https://www.mdnice.com" style=""><figure data-tool="mdnice编辑器" style="margin: 0;margin-top: 10px;margin-bottom: 10px;"><img data-ratio="0.56171875" data-type="jpeg" data-w="1280" style="display: block;margin: 0 auto;width: auto;max-width: 100%;border-radius: 4px;margin-bottom: 25px;" class="b-lazy" data-src="https://oscimg.oschina.net/oscnet/87f2c503-5dcd-448e-98bc-9b62046f8517.jpg" data-original="https://oscimg.oschina.net/oscnet/87f2c503-5dcd-448e-98bc-9b62046f8517.jpg" src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" /></figure><p style="font-size: 16px;padding-bottom: 8px;margin: 0px;padding-top: 1em;color: rgb(74, 74, 74);line-height: 2em;"><span style="color: rgb(217, 33, 66);"><strong><span style="color: rgb(217, 33, 66);letter-spacing: 1px;">文末福利资源更新</span></strong></span></p> <p style="font-size: 16px;padding-bottom: 8px;margin: 0px;padding-top: 1em;color: rgb(74, 74, 74);line-height: 2em;"><span style="letter-spacing: 1px;">本文将重点介绍4个可以用来提高页面渲染速度的CSS技巧。</span></p> <span id="OSC_h2_1"></span> <h2 data-tool="mdnice编辑器" style="font-weight: bold;color: black;font-size: 22px;display: block;text-align: center;background-image: url(&quot;https://oscimg.oschina.net/oscnet/9fcc7cc1-8043-4f04-b1a7-f980ed473a04.png&quot;);background-position: center center;background-repeat: no-repeat;background-attachment: initial;background-origin: initial;background-clip: initial;background-size: 50px;margin-top: 1em;margin-bottom: 10px;"><span style="text-align: center;display: inline-block;height: 38px;line-height: 42px;color: #48b378;background-position: left center;background-repeat: no-repeat;background-attachment: initial;background-origin: initial;background-clip: initial;background-size: 63px;margin-top: 38px;font-size: 18px;margin-bottom: 10px;">1. Content-visibility</span></h2> <p style="font-size: 16px;padding-bottom: 8px;margin: 0px;padding-top: 1em;color: rgb(74, 74, 74);line-height: 2em;"><span style="letter-spacing: 1px;font-size: 15px;">一般来说,大多数Web应用都有复杂的UI元素,它的扩展范围超出了用户在浏览器视图中看到的内容。在这种情况下,我们可以使用内容可见性( </span><code style="font-size: 14px;word-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin: 0 2px;background-color: rgba(27,31,35,.05);font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;word-break: break-all;color: #28ca71;"><span style="letter-spacing: 1px;font-size: 14px;">content-visibility</span></code><span style="letter-spacing: 1px;font-size: 15px;"> )来跳过屏幕外内容的渲染。如果你有大量的离屏内容,这将大大减少页面渲染时间。</span></p> <p style="font-size: 16px;padding-bottom: 8px;margin: 0px;padding-top: 1em;color: rgb(74, 74, 74);line-height: 2em;"><span style="letter-spacing: 1px;font-size: 15px;">这个功能是最新增加的功能之一,也是对提高渲染性能影响最大的功能之一。虽然 </span><code style="font-size: 14px;word-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin: 0 2px;background-color: rgba(27,31,35,.05);font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;word-break: break-all;color: #28ca71;"><span style="letter-spacing: 1px;font-size: 14px;">content-visibility</span></code><span style="letter-spacing: 1px;font-size: 15px;"> 接受几个值,但我们可以在元素上使用 </span><code style="font-size: 14px;word-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin: 0 2px;background-color: rgba(27,31,35,.05);font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;word-break: break-all;color: #28ca71;"><span style="letter-spacing: 1px;font-size: 14px;">content-visibility: auto;</span></code><span style="letter-spacing: 1px;font-size: 15px;"> 来获得直接的性能提升。</span></p> <p style="font-size: 16px;padding-bottom: 8px;margin: 0px;padding-top: 1em;color: rgb(74, 74, 74);line-height: 2em;"><span style="letter-spacing: 1px;font-size: 15px;">让我们考虑一下下面的页面,其中包含许多不同信息的卡片。虽然大约有12张卡适合屏幕,但列表中大约有375张卡。正如你所看到的,浏览器用了1037ms来渲染这个页面</span><span style="letter-spacing: 1px;">。</span></p> <figure data-tool="mdnice编辑器" style="margin: 0;margin-top: 10px;margin-bottom: 10px;"><img data-ratio="0.7960992907801419" data-type="png" data-w="1128" style="display: block;margin: 0 auto;width: auto;max-width: 100%;border-radius: 4px;margin-bottom: 25px;" class="b-lazy" data-src="https://oscimg.oschina.net/oscnet/2ead6321-4ee2-45ba-b0ac-92006bc9e377.png" data-original="https://oscimg.oschina.net/oscnet/2ead6321-4ee2-45ba-b0ac-92006bc9e377.png" src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" /></figure><section style="font-size: 16px;padding-bottom: 8px;margin: 0px;padding-top: 1em;color: rgb(74, 74, 74);line-height: 2em;"><span style="letter-spacing: 1px;font-size: 15px;">下一步,您可以向所有卡添加 </span> <code style="font-size: 14px;word-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin: 0 2px;background-color: rgba(27,31,35,.05);font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;word-break: break-all;color: #28ca71;"><span style="letter-spacing: 1px;font-size: 14px;">content-visibility</span></code> <span style="letter-spacing: 1px;font-size: 15px;"> 。</span> </section><blockquote data-tool="mdnice编辑器" style="font-size: 0.9em;overflow: auto;overflow-scrolling: touch;background: rgba(0, 0, 0, 0.05);color: #6a737d;padding-top: 10px;padding-bottom: 10px;padding-left: 20px;padding-right: 10px;margin-bottom: 20px;margin-top: 20px;padding: 15px 20px;line-height: 27px;background-color: #FBF9FD;border-left: 3px solid #35b378;display: block;"> <section style="margin: 0px;padding: 0px;font-size: 15px;color: rgb(89, 89, 89);line-height: 2em;"><span style="letter-spacing: 1px;font-size: 15px;">在这个例子中,在页面中加入 </span> <code style="font-size: 14px;word-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin: 0 2px;background-color: rgba(27,31,35,.05);font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;word-break: break-all;color: #28ca71;"><span style="letter-spacing: 1px;font-size: 14px;">content-visibility</span></code> <span style="letter-spacing: 1px;font-size: 15px;"> 后,渲染时间下降到150ms,这是6倍以上的性能提升。</span> </section></blockquote> <figure data-tool="mdnice编辑器" style="margin: 0;margin-top: 10px;margin-bottom: 10px;"><img data-ratio="0.6994171523730225" data-type="png" data-w="1201" style="display: block;margin: 0 auto;width: auto;max-width: 100%;border-radius: 4px;margin-bottom: 25px;" class="b-lazy" data-src="https://oscimg.oschina.net/oscnet/1289725f-18ae-45ca-8432-32367eaa2b6d.png" data-original="https://oscimg.oschina.net/oscnet/1289725f-18ae-45ca-8432-32367eaa2b6d.png" src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" /></figure><section style="font-size: 16px;padding-bottom: 8px;margin: 0px;padding-top: 1em;color: rgb(74, 74, 74);line-height: 2em;"><span style="font-size: 15px;letter-spacing: 1px;">正如你所看到的,内容可见性是相当强大的,对提高页面渲染时间非常有用。根据我们目前所讨论的东西,你一定是把它当成了页面渲染的银弹。</span> </section><span id="OSC_h3_2"></span> <h3 data-tool="mdnice编辑器" style="margin-bottom: 15px;font-weight: bold;color: black;font-size: 20px;margin-top: 1.2em;"><span style="font-size: 17px;font-weight: bold;display: inline-block;margin-left: 8px;color: #48b378;">content-visibility 的限制</span></h3> <section style="font-size: 16px;padding-bottom: 8px;margin: 0px;padding-top: 1em;color: rgb(74, 74, 74);line-height: 2em;"><span style="font-size: 15px;letter-spacing: 1px;">然而,有几个领域的内容可视性不佳。我想强调两点,供大家参考。</span> </section><ul data-tool="mdnice编辑器" style="margin-top: 8px;margin-bottom: 8px;padding-left: 25px;color: black;list-style-type: disc;" class="list-paddingleft-2"><li style="font-size: 15px;letter-spacing: 1px;"> <section style="margin-top: 5px;margin-bottom: 5px;text-align: left;color: rgb(1, 1, 1);font-weight: 500;line-height: 2em;"><span style="font-size: 15px;letter-spacing: 1px;"><strong style="font-weight: bold;line-height: 1.75em;color: rgb(74,74,74);">此功能仍处于试验阶段。</strong> 截至目前,Firefox(PC和Android版本)、IE(我认为他们没有计划在IE中添加这个功能)和,Safari(Mac和iOS)不支持内容可见性。</span> </section></li> <li style="font-size: 15px;letter-spacing: 1px;"> <section style="margin-top: 5px;margin-bottom: 5px;text-align: left;color: rgb(1, 1, 1);font-weight: 500;line-height: 2em;"><span style="font-size: 15px;letter-spacing: 1px;"><strong style="font-weight: bold;line-height: 1.75em;color: rgb(74,74,74);">与滚动条行为有关的问题。</strong> 由于元素的初始渲染高度为0px,每当你向下滚动时,这些元素就会进入屏幕。实际内容会被渲染,元素的高度也会相应更新。这将使滚动条的行为以一种非预期的方式进行。</span> </section></li> </ul><figure data-tool="mdnice编辑器" style="margin: 0;margin-top: 10px;margin-bottom: 10px;"><img data-ratio="1.0576671035386631" data-type="gif" data-w="763" style="display: block;margin: 0 auto;width: auto;max-width: 100%;border-radius: 4px;margin-bottom: 25px;" class="b-lazy" data-src="https://oscimg.oschina.net/oscnet/f33ad017-5f9d-49d7-83e2-d7c3aca7ab73.gif" data-original="https://oscimg.oschina.net/oscnet/f33ad017-5f9d-49d7-83e2-d7c3aca7ab73.gif" src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" /></figure><section style="font-size: 16px;padding-bottom: 8px;margin: 0px;padding-top: 1em;color: rgb(74, 74, 74);line-height: 2em;"><span style="font-size: 15px;letter-spacing: 1px;">为了解决滚动条的问题,你可以使用另一个叫做 </span> <code style="font-size: 14px;word-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin: 0 2px;background-color: rgba(27,31,35,.05);font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;word-break: break-all;color: #28ca71;"><span style="letter-spacing: 1px;font-size: 14px;">contain-intrinsic-size</span></code> <span style="font-size: 15px;letter-spacing: 1px;"> 的 CSS 属性。它指定了一个元素的自然大小,因此,元素将以给定的高度而不是0px呈现。</span> </section><pre data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;"><code style="overflow-x: auto;padding: 16px;background: #272822;color: #ddd;display: -webkit-box;font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;border-radius: 0px;font-size: 12px;-webkit-overflow-scrolling: touch;"><span style="line-height: 26px;">.element</span>{<br /><span style="color: #bf79db;line-height: 26px;">content-visibility</span>: auto;<br /><span style="color: #bf79db;line-height: 26px;">contain-intrinsic-size</span>: <span style="line-height: 26px;">200px</span>;<br />}<br /></code></pre> <section style="font-size: 16px;padding-bottom: 8px;margin: 0px;padding-top: 1em;color: rgb(74, 74, 74);line-height: 2em;"><span style="font-size: 15px;letter-spacing: 1px;">然而,在实验时,我注意到,即使使用 </span> <code style="font-size: 14px;word-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin: 0 2px;background-color: rgba(27,31,35,.05);font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;word-break: break-all;color: #28ca71;"><span style="letter-spacing: 1px;font-size: 14px;">conta-intrinsic-size</span></code> <span style="font-size: 15px;letter-spacing: 1px;">,如果我们有大量的元素, </span> <code style="font-size: 14px;word-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin: 0 2px;background-color: rgba(27,31,35,.05);font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;word-break: break-all;color: #28ca71;"><span style="letter-spacing: 1px;font-size: 14px;">content-visibility</span></code> <span style="font-size: 15px;letter-spacing: 1px;"> 设置为 </span> <code style="font-size: 14px;word-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin: 0 2px;background-color: rgba(27,31,35,.05);font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;word-break: break-all;color: #28ca71;"><span style="letter-spacing: 1px;font-size: 14px;">auto</span></code> <span style="font-size: 15px;letter-spacing: 1px;"> ,你仍然会有较小的滚动条问题。</span> </section><section style="font-size: 16px;padding-bottom: 8px;margin: 0px;padding-top: 1em;color: rgb(74, 74, 74);line-height: 2em;"><span style="font-size: 15px;letter-spacing: 1px;">因此,我的建议是规划你的布局,将其分解成几个部分,然后在这些部分上使用内容可见性,以获得更好的滚动条行为。</span> </section><mpcpc js_editor_cpcad="" class="js_cpc_area cpc_iframe" src="/cgi-bin/readtemplate?t=tmpl/cpc_tmpl#1608744797010" data-category_id_list="48|26|1|55|5|24|37|11|50|54|53|42|29|43|16|51|36" data-id="1608744797010"></mpcpc><span style="font-size: 15px;letter-spacing: 1px;color: rgb(74, 74, 74);"></span> <span id="OSC_h2_3"></span> <h2 data-tool="mdnice编辑器" style="font-weight: bold;color: black;font-size: 22px;display: block;text-align: center;background-image: url(&quot;https://oscimg.oschina.net/oscnet/9fcc7cc1-8043-4f04-b1a7-f980ed473a04.png&quot;);background-position: center center;background-repeat: no-repeat;background-attachment: initial;background-origin: initial;background-clip: initial;background-size: 50px;margin-top: 1em;margin-bottom: 10px;"><span style="text-align: center;display: inline-block;height: 38px;line-height: 42px;color: #48b378;background-position: left center;background-repeat: no-repeat;background-attachment: initial;background-origin: initial;background-clip: initial;background-size: 63px;margin-top: 38px;font-size: 18px;margin-bottom: 10px;">2. Will-change 属性</span></h2> <section style="font-size: 16px;padding-bottom: 8px;margin: 0px;padding-top: 1em;color: rgb(74, 74, 74);line-height: 2em;"><span style="font-size: 15px;letter-spacing: 1px;">浏览器上的动画并不是一件新鲜事。通常情况下,这些动画是和其他元素一起定期渲染的。不过,现在浏览器可以使用GPU来优化其中的一些动画操作。</span> </section><blockquote data-tool="mdnice编辑器" style="font-size: 0.9em;overflow: auto;overflow-scrolling: touch;background: rgba(0, 0, 0, 0.05);color: #6a737d;padding-top: 10px;padding-bottom: 10px;padding-left: 20px;padding-right: 10px;margin-bottom: 20px;margin-top: 20px;padding: 15px 20px;line-height: 27px;background-color: #FBF9FD;border-left: 3px solid #35b378;display: block;"> <section style="margin: 0px;padding: 0px;font-size: 15px;color: rgb(89, 89, 89);line-height: 2em;"><span style="font-size: 15px;letter-spacing: 1px;">通过will-change CSS属性,我们可以表明元素将修改特定的属性,让浏览器事先进行必要的优化。</span> </section></blockquote> <section style="font-size: 16px;padding-bottom: 8px;margin: 0px;padding-top: 1em;color: rgb(74, 74, 74);line-height: 2em;"><span style="font-size: 15px;letter-spacing: 1px;">下面发生的事情是,浏览器将为该元素创建一个单独的层。之后,它将该元素的渲染与其他优化一起委托给GPU。这将使动画更加流畅,因为GPU加速接管了动画的渲染。</span> </section><section style="font-size: 16px;padding-bottom: 8px;margin: 0px;padding-top: 1em;color: rgb(74, 74, 74);line-height: 2em;"><span style="font-size: 15px;letter-spacing: 1px;">考虑以下CSS类:</span> </section><pre data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;"><code style="overflow-x: auto;padding: 16px;background: #272822;color: #ddd;display: -webkit-box;font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;border-radius: 0px;font-size: 12px;-webkit-overflow-scrolling: touch;">// <span style="color: #f92672;font-weight: bold;line-height: 26px;">In</span> <span style="color: #f92672;font-weight: bold;line-height: 26px;">stylesheet</span><br /><span style="line-height: 26px;">.animating-element</span> {<br /><span style="color: #bf79db;line-height: 26px;">will-change</span>: opacity;<br />}<br /><br />// <span style="color: #f92672;font-weight: bold;line-height: 26px;">In</span> <span style="color: #f92672;font-weight: bold;line-height: 26px;">HTML</span><br />&lt;<span style="color: #f92672;font-weight: bold;line-height: 26px;">div</span> <span style="color: #f92672;font-weight: bold;line-height: 26px;">class</span>="<span style="color: #f92672;font-weight: bold;line-height: 26px;">animating-elememt</span>"&gt;<br /><span style="color: #f92672;font-weight: bold;line-height: 26px;">Animating</span> <span style="color: #f92672;font-weight: bold;line-height: 26px;">Child</span> <span style="color: #f92672;font-weight: bold;line-height: 26px;">elements</span><br />&lt;/<span style="color: #f92672;font-weight: bold;line-height: 26px;">div</span>&gt;<br /></code></pre> <section style="font-size: 16px;padding-bottom: 8px;margin: 0px;padding-top: 1em;color: rgb(74, 74, 74);line-height: 2em;"><span style="font-size: 15px;letter-spacing: 1px;">当在浏览器中渲染上述片段时,它将识别 </span> <code style="font-size: 14px;word-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin: 0 2px;background-color: rgba(27,31,35,.05);font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;word-break: break-all;color: #28ca71;"><span style="letter-spacing: 1px;font-size: 14px;">will-change</span></code> <span style="font-size: 15px;letter-spacing: 1px;"> 属性并优化未来与不透明度相关的变化。</span> </section><blockquote data-tool="mdnice编辑器" style="font-size: 0.9em;overflow: auto;overflow-scrolling: touch;background: rgba(0, 0, 0, 0.05);color: #6a737d;padding-top: 10px;padding-bottom: 10px;padding-left: 20px;padding-right: 10px;margin-bottom: 20px;margin-top: 20px;padding: 15px 20px;line-height: 27px;background-color: #FBF9FD;border-left: 3px solid #35b378;display: block;"> <section style="margin: 0px;padding: 0px;font-size: 15px;color: rgb(89, 89, 89);line-height: 2em;"><span style="letter-spacing: 1px;">根据Maximillian Laumeister所做的性能基准,可以看到他通过这个单行的改变获得了超过120FPS的渲染速度,而最初的渲染速度大概在50FPS。</span> </section></blockquote> <figure data-tool="mdnice编辑器" style="margin: 0;margin-top: 10px;margin-bottom: 10px;"><img data-ratio="0.218562874251497" data-type="png" data-w="668" style="display: block;margin: 0 auto;width: auto;max-width: 100%;border-radius: 4px;margin-bottom: 25px;" class="b-lazy" data-src="https://oscimg.oschina.net/oscnet/c6970439-d492-4325-9e4b-8d10a674287f.png" data-original="https://oscimg.oschina.net/oscnet/c6970439-d492-4325-9e4b-8d10a674287f.png" src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" /></figure><figure data-tool="mdnice编辑器" style="margin: 0;margin-top: 10px;margin-bottom: 10px;"><img data-ratio="0.218562874251497" data-type="png" data-w="668" style="display: block;margin: 0 auto;width: auto;max-width: 100%;border-radius: 4px;margin-bottom: 25px;" class="b-lazy" data-src="https://oscimg.oschina.net/oscnet/3dff5dd1-460d-4560-9fcc-8eafde3acc68.png" data-original="https://oscimg.oschina.net/oscnet/3dff5dd1-460d-4560-9fcc-8eafde3acc68.png" src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" /><figcaption style="margin-top: 5px;text-align: center;color: #888;display: block;font-size: 12px;font-family: PingFangSC-Light;"> 5 </figcaption></figure><span id="OSC_h3_4"></span> <h3 data-tool="mdnice编辑器" style="margin-bottom: 15px;font-weight: bold;color: black;font-size: 20px;margin-top: 1.2em;"><span style="font-size: 17px;font-weight: bold;display: inline-block;margin-left: 8px;color: #48b378;">什么时候不是用will-change</span></h3> <section style="font-size: 16px;padding-bottom: 8px;margin: 0px;padding-top: 1em;color: rgb(74, 74, 74);line-height: 2em;"><span style="font-size: 15px;letter-spacing: 1px;">虽然 </span> <code style="font-size: 14px;word-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin: 0 2px;background-color: rgba(27,31,35,.05);font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;word-break: break-all;color: #28ca71;"><span style="letter-spacing: 1px;font-size: 14px;">will-change</span></code> <span style="font-size: 15px;letter-spacing: 1px;"> 的目的是为了提高性能,但如果你滥用它,它也会降低Web应用的性能。</span> </section><ul data-tool="mdnice编辑器" style="margin-top: 8px;margin-bottom: 8px;padding-left: 25px;color: black;list-style-type: disc;" class="list-paddingleft-2"><li> <section style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;text-align: left;color: rgb(1,1,1);font-weight: 500;"><section style="font-size: 16px;padding-bottom: 8px;margin: 0px;padding-top: 1em;color: rgb(74, 74, 74);line-height: 2em;"><span style="font-size: 15px;letter-spacing: 1px;"><strong style="font-weight: bold;line-height: 1.75em;color: rgb(74,74,74);">使用 </strong></span> <span style="letter-spacing: 1px;font-size: 14px;"><strong style="font-weight: bold;line-height: 1.75em;color: rgb(74,74,74);"><code style="font-size: 14px;word-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin: 0 2px;background-color: rgba(27,31,35,.05);font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;word-break: break-all;color: #28ca71;">will-change</code></strong></span> <span style="font-size: 15px;letter-spacing: 1px;"><strong style="font-weight: bold;line-height: 1.75em;color: rgb(74,74,74);"> 表示该元素在未来会发生变化。</strong> 因此,如果你试图将 </span> <code style="font-size: 14px;word-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin: 0 2px;background-color: rgba(27,31,35,.05);font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;word-break: break-all;color: #28ca71;"><span style="letter-spacing: 1px;font-size: 14px;">will-change</span></code> <span style="font-size: 15px;letter-spacing: 1px;"> 和动画同时使用,它将不会给你带来优化。因此,建议在父元素上使用 </span> <code style="font-size: 14px;word-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin: 0 2px;background-color: rgba(27,31,35,.05);font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;word-break: break-all;color: #28ca71;"><span style="letter-spacing: 1px;font-size: 14px;">will-change</span></code> <span style="font-size: 15px;letter-spacing: 1px;"> ,在子元素上使用动画。</span> </section><pre data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;"><code style="overflow-x: auto;padding: 16px;background: #272822;color: #ddd;display: -webkit-box;font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;border-radius: 0px;font-size: 12px;-webkit-overflow-scrolling: touch;"><span style="line-height: 26px;">.my-class</span>{<br /><span style="color: #bf79db;line-height: 26px;">will-change</span>: opacity;<br />}<br /><span style="line-height: 26px;">.child-class</span>{<br /><span style="color: #bf79db;line-height: 26px;">transition</span>: opacity <span style="line-height: 26px;">1s</span> ease-in-out;<br />}<br /></code></pre> </section></li> <li> <section style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;text-align: left;color: rgb(1,1,1);font-weight: 500;"><section style="font-size: 16px;padding-bottom: 8px;margin: 0px;padding-top: 1em;color: rgb(74, 74, 74);line-height: 2em;"><span style="font-size: 15px;letter-spacing: 1px;"><strong style="font-weight: bold;line-height: 1.75em;color: rgb(74,74,74);">不要使用非动画元素。</strong> 当你在一个元素上使用 </span> <code style="font-size: 14px;word-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin: 0 2px;background-color: rgba(27,31,35,.05);font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;word-break: break-all;color: #28ca71;"><span style="letter-spacing: 1px;font-size: 14px;">will-change</span></code> <span style="font-size: 15px;letter-spacing: 1px;"> 时,浏览器会尝试通过将元素移动到一个新的图层并将转换工作交给GPU来优化它。如果您没有任何要转换的内容,则会导致资源浪费。</span> </section></section></li> </ul><section style="font-size: 16px;padding-bottom: 8px;margin: 0px;padding-top: 1em;color: rgb(74, 74, 74);line-height: 2em;"><span style="font-size: 15px;letter-spacing: 1px;">最后需要注意的是,建议在完成所有动画后,将元素的 </span> <code style="font-size: 14px;word-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin: 0 2px;background-color: rgba(27,31,35,.05);font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;word-break: break-all;color: #28ca71;"><span style="letter-spacing: 1px;font-size: 14px;">will-change</span></code> <span style="font-size: 15px;letter-spacing: 1px;"> 删除。</span> </section><span id="OSC_h2_5"></span> <h2 data-tool="mdnice编辑器" style="font-weight: bold;color: black;font-size: 22px;display: block;text-align: center;background-image: url(&quot;https://oscimg.oschina.net/oscnet/9fcc7cc1-8043-4f04-b1a7-f980ed473a04.png&quot;);background-position: center center;background-repeat: no-repeat;background-attachment: initial;background-origin: initial;background-clip: initial;background-size: 50px;margin-top: 1em;margin-bottom: 10px;"><span style="text-align: center;display: inline-block;height: 38px;line-height: 42px;color: #48b378;background-position: left center;background-repeat: no-repeat;background-attachment: initial;background-origin: initial;background-clip: initial;background-size: 63px;margin-top: 38px;font-size: 18px;margin-bottom: 10px;">3.减少渲染阻止时间</span></h2> <section style="font-size: 16px;padding-bottom: 8px;margin: 0px;padding-top: 1em;color: rgb(74, 74, 74);line-height: 2em;"><span style="font-size: 15px;letter-spacing: 1px;">今天,许多Web应用必须满足多种形式的需求,包括PC、平板电脑和手机等。为了完成这种响应式的特性,我们必须根据媒体尺寸编写新的样式。当涉及页面渲染时,它无法启动渲染阶段,直到 CSS对象模型(CSSOM)已准备就绪。根据你的Web应用,你可能会有一个大的样式表来满足所有设备的形式因素。</span> </section><blockquote data-tool="mdnice编辑器" style="font-size: 0.9em;overflow: auto;overflow-scrolling: touch;background: rgba(0, 0, 0, 0.05);color: #6a737d;padding-top: 10px;padding-bottom: 10px;padding-left: 20px;padding-right: 10px;margin-bottom: 20px;margin-top: 20px;padding: 15px 20px;line-height: 27px;background-color: #FBF9FD;border-left: 3px solid #35b378;display: block;"> <section style="margin: 0px;padding: 0px;font-size: 15px;color: rgb(89, 89, 89);line-height: 2em;"><span style="font-size: 15px;letter-spacing: 1px;">但是,假设我们根据表单因素将其拆分为多个样式表。在这种情况下,我们可以只让主CSS文件阻塞关键路径,并以高优先级下载它,而让其他样式表以低优先级方式下载。</span> </section></blockquote> <pre data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;"><code style="overflow-x: auto;padding: 16px;background: #272822;color: #ddd;display: -webkit-box;font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;border-radius: 0px;font-size: 12px;-webkit-overflow-scrolling: touch;"><span style="color: #f92672;line-height: 26px;">&lt;<span style="color: #f92672;line-height: 26px;">link</span> <span style="line-height: 26px;">rel</span>=<span style="color: #a6e22e;line-height: 26px;">"stylesheet"</span> <span style="line-height: 26px;">href</span>=<span style="color: #a6e22e;line-height: 26px;">"styles.css"</span>&gt;</span><br /></code></pre> <figure data-tool="mdnice编辑器" style="margin: 0;margin-top: 10px;margin-bottom: 10px;"><img data-ratio="0.1711111111111111" data-type="png" data-w="900" style="display: block;margin: 0 auto;width: auto;max-width: 100%;border-radius: 4px;margin-bottom: 25px;" class="b-lazy" data-src="https://oscimg.oschina.net/oscnet/6a951dc0-5f0b-4d5e-91af-61b86c59e533.png" data-original="https://oscimg.oschina.net/oscnet/6a951dc0-5f0b-4d5e-91af-61b86c59e533.png" src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" /><figcaption style="margin-top: 5px;text-align: center;color: #888;display: block;font-size: 12px;font-family: PingFangSC-Light;"> 单一样式表 </figcaption></figure><section style="font-size: 16px;padding-bottom: 8px;margin: 0px;padding-top: 1em;color: rgb(74, 74, 74);line-height: 2em;"><span style="font-size: 15px;letter-spacing: 1px;">将其分解为多个样式表后:</span> </section><pre data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;"><code style="overflow-x: auto;padding: 16px;background: #272822;color: #ddd;display: -webkit-box;font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;border-radius: 0px;font-size: 12px;-webkit-overflow-scrolling: touch;"><span style="color: #75715e;line-height: 26px;">&lt;!-- style.css contains only the minimal styles needed for the page rendering --&gt;</span><br /><span style="color: #f92672;line-height: 26px;">&lt;<span style="color: #f92672;line-height: 26px;">link</span> <span style="line-height: 26px;">rel</span>=<span style="color: #a6e22e;line-height: 26px;">"stylesheet"</span> <span style="line-height: 26px;">href</span>=<span style="color: #a6e22e;line-height: 26px;">"styles.css"</span> <span style="line-height: 26px;">media</span>=<span style="color: #a6e22e;line-height: 26px;">"all"</span> /&gt;</span><br /><span style="color: #75715e;line-height: 26px;">&lt;!-- Following stylesheets have only the styles necessary for the form factor --&gt;</span><br /><span style="color: #f92672;line-height: 26px;">&lt;<span style="color: #f92672;line-height: 26px;">link</span> <span style="line-height: 26px;">rel</span>=<span style="color: #a6e22e;line-height: 26px;">"stylesheet"</span> <span style="line-height: 26px;">href</span>=<span style="color: #a6e22e;line-height: 26px;">"sm.css"</span> <span style="line-height: 26px;">media</span>=<span style="color: #a6e22e;line-height: 26px;">"(min-width: 20em)"</span> /&gt;</span><br /><span style="color: #f92672;line-height: 26px;">&lt;<span style="color: #f92672;line-height: 26px;">link</span> <span style="line-height: 26px;">rel</span>=<span style="color: #a6e22e;line-height: 26px;">"stylesheet"</span> <span style="line-height: 26px;">href</span>=<span style="color: #a6e22e;line-height: 26px;">"md.css"</span> <span style="line-height: 26px;">media</span>=<span style="color: #a6e22e;line-height: 26px;">"(min-width: 64em)"</span> /&gt;</span><br /><span style="color: #f92672;line-height: 26px;">&lt;<span style="color: #f92672;line-height: 26px;">link</span> <span style="line-height: 26px;">rel</span>=<span style="color: #a6e22e;line-height: 26px;">"stylesheet"</span> <span style="line-height: 26px;">href</span>=<span style="color: #a6e22e;line-height: 26px;">"lg.css"</span> <span style="line-height: 26px;">media</span>=<span style="color: #a6e22e;line-height: 26px;">"(min-width: 90em)"</span> /&gt;</span><br /><span style="color: #f92672;line-height: 26px;">&lt;<span style="color: #f92672;line-height: 26px;">link</span> <span style="line-height: 26px;">rel</span>=<span style="color: #a6e22e;line-height: 26px;">"stylesheet"</span> <span style="line-height: 26px;">href</span>=<span style="color: #a6e22e;line-height: 26px;">"ex.css"</span> <span style="line-height: 26px;">media</span>=<span style="color: #a6e22e;line-height: 26px;">"(min-width: 120em)"</span> /&gt;</span><br /><span style="color: #f92672;line-height: 26px;">&lt;<span style="color: #f92672;line-height: 26px;">link</span> <span style="line-height: 26px;">rel</span>=<span style="color: #a6e22e;line-height: 26px;">"stylesheet"</span> <span style="line-height: 26px;">href</span>=<span style="color: #a6e22e;line-height: 26px;">"print.css"</span> <span style="line-height: 26px;">media</span>=<span style="color: #a6e22e;line-height: 26px;">"print"</span> /&gt;</span><br /></code></pre> <figure data-tool="mdnice编辑器" style="margin: 0;margin-top: 10px;margin-bottom: 10px;"><img data-ratio="0.35650224215246634" data-type="png" data-w="892" style="display: block;margin: 0 auto;width: auto;max-width: 100%;border-radius: 4px;margin-bottom: 25px;" class="b-lazy" data-src="https://oscimg.oschina.net/oscnet/708fd31c-dbeb-402d-b9d3-16db91de0244.png" data-original="https://oscimg.oschina.net/oscnet/708fd31c-dbeb-402d-b9d3-16db91de0244.png" src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" /></figure><section style="font-size: 16px;padding-bottom: 8px;margin: 0px;padding-top: 1em;color: rgb(74, 74, 74);line-height: 2em;"><span style="font-size: 15px;letter-spacing: 1px;">如您所见,根据样式因素分解样式表可以减少渲染阻止时间。</span> </section><span id="OSC_h2_6"></span> <h2 data-tool="mdnice编辑器" style="font-weight: bold;color: black;font-size: 22px;display: block;text-align: center;background-image: url(&quot;https://oscimg.oschina.net/oscnet/9fcc7cc1-8043-4f04-b1a7-f980ed473a04.png&quot;);background-position: center center;background-repeat: no-repeat;background-attachment: initial;background-origin: initial;background-clip: initial;background-size: 50px;margin-top: 1em;margin-bottom: 10px;"><span style="text-align: center;display: inline-block;height: 38px;line-height: 42px;color: #48b378;background-position: left center;background-repeat: no-repeat;background-attachment: initial;background-origin: initial;background-clip: initial;background-size: 63px;margin-top: 38px;font-size: 18px;margin-bottom: 10px;">4.避免@import包含多个样式表</span></h2> <section style="font-size: 16px;padding-bottom: 8px;margin: 0px;padding-top: 1em;color: rgb(74, 74, 74);line-height: 2em;"><span style="font-size: 15px;letter-spacing: 1px;">通过 </span> <code style="font-size: 14px;word-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin: 0 2px;background-color: rgba(27,31,35,.05);font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;word-break: break-all;color: #28ca71;"><span style="letter-spacing: 1px;font-size: 14px;">@import</span></code> <span style="font-size: 15px;letter-spacing: 1px;">,我们可以在另一个样式表中包含一个样式表。当我们在处理一个大型项目时,使用 </span> <code style="font-size: 14px;word-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin: 0 2px;background-color: rgba(27,31,35,.05);font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;word-break: break-all;color: #28ca71;"><span style="letter-spacing: 1px;font-size: 14px;">@import</span></code> <span style="font-size: 15px;letter-spacing: 1px;"> 可以使代码更加简洁。</span> </section><blockquote data-tool="mdnice编辑器" style="font-size: 0.9em;overflow: auto;overflow-scrolling: touch;background: rgba(0, 0, 0, 0.05);color: #6a737d;padding-top: 10px;padding-bottom: 10px;padding-left: 20px;padding-right: 10px;margin-bottom: 20px;margin-top: 20px;padding: 15px 20px;line-height: 27px;background-color: #FBF9FD;border-left: 3px solid #35b378;display: block;"> <section style="margin: 0px;padding: 0px;font-size: 15px;color: rgb(89, 89, 89);line-height: 2em;"><span style="font-size: 15px;letter-spacing: 1px;">关于 </span> <code style="font-size: 14px;word-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin: 0 2px;background-color: rgba(27,31,35,.05);font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;word-break: break-all;color: #28ca71;"><span style="letter-spacing: 1px;font-size: 14px;">@import</span></code> <span style="font-size: 15px;letter-spacing: 1px;"> 的关键事实是,它是一个阻塞调用,因为它必须通过网络请求来获取文件,解析文件,并将其包含在样式表中。如果我们在样式表中嵌套了 </span> <code style="font-size: 14px;word-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin: 0 2px;background-color: rgba(27,31,35,.05);font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;word-break: break-all;color: #28ca71;"><span style="letter-spacing: 1px;font-size: 14px;">@import</span></code> <span style="font-size: 15px;letter-spacing: 1px;">,就会妨碍渲染性能。</span> </section></blockquote> <pre data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;"><code style="overflow-x: auto;padding: 16px;background: #272822;color: #ddd;display: -webkit-box;font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;border-radius: 0px;font-size: 12px;-webkit-overflow-scrolling: touch;"># <span style="color: #f92672;font-weight: bold;line-height: 26px;">style</span><span style="line-height: 26px;">.css</span><br /><span style="color: #f92672;font-weight: bold;line-height: 26px;">@import</span> url(<span style="color: #a6e22e;line-height: 26px;">"windows.css"</span>);<br /># <span style="color: #f92672;font-weight: bold;line-height: 26px;">windows</span><span style="line-height: 26px;">.css</span><br /><span style="color: #f92672;font-weight: bold;line-height: 26px;">@import</span> url(<span style="color: #a6e22e;line-height: 26px;">"componenets.css"</span>);<br /></code></pre> <figure data-tool="mdnice编辑器" style="margin: 0;margin-top: 10px;margin-bottom: 10px;"><img data-ratio="0.16439688715953307" data-type="png" data-w="1028" style="display: block;margin: 0 auto;width: auto;max-width: 100%;border-radius: 4px;margin-bottom: 25px;" class="b-lazy" data-src="https://oscimg.oschina.net/oscnet/cd8062e7-fb0d-4068-9cda-3d8265312ac9.png" data-original="https://oscimg.oschina.net/oscnet/cd8062e7-fb0d-4068-9cda-3d8265312ac9.png" src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" /></figure><section style="font-size: 16px;padding-bottom: 8px;margin: 0px;padding-top: 1em;color: rgb(74, 74, 74);line-height: 2em;"><span style="font-size: 15px;letter-spacing: 1px;">与使用 </span> <code style="font-size: 14px;word-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin: 0 2px;background-color: rgba(27,31,35,.05);font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;word-break: break-all;color: #28ca71;"><span style="letter-spacing: 1px;font-size: 14px;">@import</span></code> <span style="font-size: 15px;letter-spacing: 1px;"> 相比,我们可以通过多个 </span> <code style="font-size: 14px;word-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin: 0 2px;background-color: rgba(27,31,35,.05);font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;word-break: break-all;color: #28ca71;"><span style="letter-spacing: 1px;font-size: 14px;">link</span></code> <span style="font-size: 15px;letter-spacing: 1px;"> 来实现同样的功能,但性能要好得多,因为它允许我们并行加载样式表。</span> </section><figure data-tool="mdnice编辑器" style="margin: 0;margin-top: 10px;margin-bottom: 10px;"><img data-ratio="0.1557454890788224" data-type="png" data-w="1053" style="display: block;margin: 0 auto;width: auto;max-width: 100%;border-radius: 4px;margin-bottom: 25px;" class="b-lazy" data-src="https://oscimg.oschina.net/oscnet/e23c2bc5-2805-4eed-9194-23c14a2a9506.png" data-original="https://oscimg.oschina.net/oscnet/e23c2bc5-2805-4eed-9194-23c14a2a9506.png" src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" /></figure><span id="OSC_h2_7"></span> <h2 data-tool="mdnice编辑器" style="font-weight: bold;color: black;font-size: 22px;display: block;text-align: center;background-image: url(&quot;https://oscimg.oschina.net/oscnet/9fcc7cc1-8043-4f04-b1a7-f980ed473a04.png&quot;);background-position: center center;background-repeat: no-repeat;background-attachment: initial;background-origin: initial;background-clip: initial;background-size: 50px;margin-top: 1em;margin-bottom: 10px;"><span style="text-align: center;display: inline-block;height: 38px;line-height: 42px;color: #48b378;background-position: left center;background-repeat: no-repeat;background-attachment: initial;background-origin: initial;background-clip: initial;background-size: 63px;margin-top: 38px;font-size: 18px;margin-bottom: 10px;">总结</span></h2> <section style="font-size: 16px;padding-bottom: 8px;margin: 0px;padding-top: 1em;color: rgb(74, 74, 74);line-height: 2em;"><span style="font-size: 15px;letter-spacing: 1px;">除了我们在本文中讨论的4个方面,我们还有一些其他的方法可以使用CSS来提高网页的性能。CSS最近的一个特性:</span> <code style="font-size: 14px;word-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin: 0 2px;background-color: rgba(27,31,35,.05);font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;word-break: break-all;color: #28ca71;"><span style="letter-spacing: 1px;font-size: 14px;">content-visibility</span></code> <span style="font-size: 15px;letter-spacing: 1px;">,在未来的几年里看起来是如此的有前途,因为它给页面渲染带来了数倍的性能提升。</span> </section><blockquote data-tool="mdnice编辑器" style="font-size: 0.9em;overflow: auto;overflow-scrolling: touch;background: rgba(0, 0, 0, 0.05);color: #6a737d;padding-top: 10px;padding-bottom: 10px;padding-left: 20px;padding-right: 10px;margin-bottom: 20px;margin-top: 20px;padding: 15px 20px;line-height: 27px;background-color: #FBF9FD;border-left: 3px solid #35b378;display: block;"> <section style="margin: 0px;padding: 0px;font-size: 15px;color: rgb(89, 89, 89);line-height: 2em;"><span style="font-size: 15px;letter-spacing: 1px;">最重要的是,我们不需要写一条JavaScript语句就能获得所有的性能。</span> </section></blockquote> <section style="font-size: 16px;padding-bottom: 8px;margin: 0px;padding-top: 1em;color: rgb(74, 74, 74);line-height: 2em;"><span style="font-size: 15px;letter-spacing: 1px;">我相信你可以结合以上的一些功能,为终端用户构建性能更好的Web应用。希望这篇文章对你有用,如果你知道什么CSS技巧可以提高Web应用的性能,请在下面的评论中提及。谢谢大家。</span> </section><hr data-tool="mdnice编辑器" style="margin: 10px 0px;height: 1px;padding: 0px;border-width: initial;border-style: none;border-color: initial;text-align: center;background-image: linear-gradient(to right, rgba(93, 186, 133, 0), rgba(93, 186, 133, 0.75), rgba(93, 186, 133, 0));" /><p data-tool="mdnice编辑器" style="font-size: 16px;padding-bottom: 8px;margin: 0;padding-top: 1em;color: rgb(74,74,74);line-height: 1.75em;"><span style="color: rgb(136, 136, 136);"><span style="color: rgb(136, 136, 136);font-size: 12px;">来源:https://blog.bitsrc.io/improve-page-rendering-speed-using-only-css-a61667a16b2<br /></span><span style="color: rgb(136, 136, 136);font-size: 12px;letter-spacing: 0.034em;">作者:Rumesh Eranga Hapuarachchi</span></span></p> </section><section data-tool="mdnice编辑器" data-website="https://www.mdnice.com" style="max-width: 100%;color: rgb(89, 89, 89);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &quot;PingFang SC&quot;, Cambria, Cochin, Georgia, Times, &quot;Times New Roman&quot;, serif;text-align: left;white-space: normal;letter-spacing: 0.476px;font-size: 16px;background-color: rgb(255, 255, 255);box-sizing: border-box !important;overflow-wrap: break-word !important;"><span id="OSC_h4_8"></span> <h4 data-tool="mdnice编辑器" style="margin-top: 30px;margin-bottom: 15px;font-weight: bold;font-size: 18px;color: black;max-width: 100%;line-height: 1.5em;box-sizing: border-box !important;overflow-wrap: break-word !important;">粉丝福利</h4> <span id="OSC_h3_9"></span> <h3 data-tool="mdnice编辑器" style="margin-top: 2.2em;margin-bottom: 4px;color: rgba(0, 0, 0, 0.85);max-width: 100%;line-height: 1.5em;letter-spacing: 0.75px;box-sizing: border-box !important;overflow-wrap: break-word !important;"> <section style="margin-top: -10px;margin-bottom: 1em;padding-right: 10px;padding-left: 10px;max-width: 100%;overflow-wrap: break-word;letter-spacing: 0.05em;line-height: 2em;word-break: break-word;box-sizing: border-box !important;"><span style="max-width: 100%;font-weight: bolder;font-size: 14px;box-sizing: border-box !important;overflow-wrap: break-word !important;"><span style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;">148期留言+在看幸运用户:暂无<span style="max-width: 100%;font-weight: bolder;color: rgb(255, 41, 65);box-sizing: border-box !important;overflow-wrap: break-word !important;"><span style="max-width: 100%;color: rgba(0, 0, 0, 0.85);letter-spacing: 0.8px;box-sizing: border-box !important;overflow-wrap: break-word !important;">。</span></span></span><span style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"></span></span> </section></h3><p style="margin-top: -10px;margin-bottom: 5px;padding-right: 10px;padding-left: 10px;max-width: 100%;overflow-wrap: break-word;min-height: 1em;color: black;letter-spacing: 0.05em;line-height: 2em;word-break: break-word;box-sizing: border-box !important;"><span style="max-width: 100%;font-size: 14px;box-sizing: border-box !important;overflow-wrap: break-word !important;">临走前留下,<span style="max-width: 100%;font-weight: bolder;color: rgb(255, 41, 65);text-decoration: underline;box-sizing: border-box !important;overflow-wrap: break-word !important;">今天的福利</span></span></p> <ul class="list-paddingleft-2" style="max-width: 100%;width: 577.422px;font-family: -apple-system-font, system-ui, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;letter-spacing: 0.476px;overflow-wrap: break-word !important;"><li style="max-width: 100%;font-size: 14px;letter-spacing: 0.5px;box-sizing: border-box !important;overflow-wrap: break-word !important;"> <section style="margin-bottom: 10px;max-width: 100%;font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &quot;PingFang SC&quot;, Cambria, Cochin, Georgia, Times, &quot;Times New Roman&quot;, serif;letter-spacing: 0.75px;color: rgb(89, 89, 89);font-size: 15px;min-height: 1em;box-sizing: border-box !important;overflow-wrap: break-word !important;"><span style="max-width: 100%;font-size: 14px;letter-spacing: 0.5px;color: rgb(0, 0, 0);box-sizing: border-box !important;overflow-wrap: break-word !important;"></span> <span style="max-width: 100%;font-size: 14px;letter-spacing: 0.5px;color: rgb(0, 0, 0);box-sizing: border-box !important;overflow-wrap: break-word !important;">福利1:</span> <span style="max-width: 100%;letter-spacing: 0.5px;box-sizing: border-box !important;overflow-wrap: break-word !important;"><span style="max-width: 100%;font-weight: bolder;font-size: 14px;color: rgb(255, 41, 65);box-sizing: border-box !important;overflow-wrap: break-word !important;">《MongoDB 4.0从入门到达人》</span><span style="max-width: 100%;font-size: 14px;color: rgb(0, 0, 0);box-sizing: border-box !important;overflow-wrap: break-word !important;">获取资源请在公众号对话框中回复关键字:</span><span style="max-width: 100%;font-weight: bolder;font-size: 14px;color: rgb(255, 41, 65);box-sizing: border-box !important;overflow-wrap: break-word !important;">043,</span></span> <span style="max-width: 100%;letter-spacing: 0.5px;font-size: 14px;color: rgb(0, 0, 0);box-sizing: border-box !important;overflow-wrap: break-word !important;">如果没有关注请扫下面的二维码。更多福利资料请查看公众号菜单</span> <span style="max-width: 100%;letter-spacing: 0.5px;font-size: 14px;color: rgb(0, 0, 0);box-sizing: border-box !important;overflow-wrap: break-word !important;"></span> </section></li> <li style="max-width: 100%;font-size: 14px;letter-spacing: 0.5px;box-sizing: border-box !important;overflow-wrap: break-word !important;"> <section style="margin-bottom: 10px;max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"><span style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"><span style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;">福利2:</span><span style="max-width: 100%;font-weight: bolder;color: rgb(255, 41, 65);box-sizing: border-box !important;overflow-wrap: break-word !important;">在看+留言</span><span style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;">,</span></span> <span style="max-width: 100%;color: rgb(0, 0, 0);box-sizing: border-box !important;overflow-wrap: break-word !important;">我随机抽取一位认真留言的小伙伴,给他发一个红包奖励</span> <span style="max-width: 100%;font-size: 12px;text-align: center;box-sizing: border-box !important;overflow-wrap: break-word !important;"></span> </section></li> </ul><span id="OSC_h4_10"></span> <h4 data-tool="mdnice编辑器" style="margin-top: 30px;margin-bottom: 15px;font-weight: bold;font-size: 18px;color: black;max-width: 100%;line-height: 1.5em;box-sizing: border-box !important;overflow-wrap: break-word !important;">最近文章</h4> </section><ul class="list-paddingleft-2" style="max-width: 100%;color: rgb(89, 89, 89);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &quot;PingFang SC&quot;, Cambria, Cochin, Georgia, Times, &quot;Times New Roman&quot;, serif;font-size: 15px;text-align: left;white-space: normal;letter-spacing: 0.476px;width: 577.422px;background-color: rgb(255, 255, 255);overflow-wrap: break-word !important;"><li style="max-width: 100%;font-size: 14px;color: rgb(0, 122, 170);box-sizing: border-box !important;overflow-wrap: break-word !important;"> <section style="max-width: 100%;line-height: 2em;box-sizing: border-box !important;overflow-wrap: break-word !important;"><a target="_blank" href="https://www.oschina.net/action/GoToLink?url=http%3A%2F%2Fmp.weixin.qq.com%2Fs%3F__biz%3DMzI0MDIwNTQ1Mg%3D%3D%26mid%3D2676496009%26idx%3D1%26sn%3D1befe383b8921701f9fd7e4726da23cf%26chksm%3Df362dd6ac415547c0d7dbc3af1bbc07bfcc63e5da2659a4f06fc4cab1f989a882ac0b1403aad%26scene%3D21%23wechat_redirect" data-itemshowtype="0" tab="innerlink" data-linktype="2" hasload="1" style="color: rgb(0, 122, 170);-webkit-tap-highlight-color: rgba(0, 0, 0, 0);background-color: transparent;outline: none;cursor: pointer;transition: color 0.3s ease 0s;touch-action: manipulation;max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;" rel="nofollow">如何在React应用中实现“使用GitHub登录”</a> <br style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;" /></section></li> <li style="max-width: 100%;font-size: 14px;color: rgb(0, 122, 170);box-sizing: border-box !important;overflow-wrap: break-word !important;"> <section style="max-width: 100%;line-height: 2em;box-sizing: border-box !important;overflow-wrap: break-word !important;"><a target="_blank" href="https://www.oschina.net/action/GoToLink?url=http%3A%2F%2Fmp.weixin.qq.com%2Fs%3F__biz%3DMzI0MDIwNTQ1Mg%3D%3D%26mid%3D2676495903%26idx%3D1%26sn%3D3b91d22e645fbf1a82e0f9addb8b2688%26chksm%3Df362ddfcc41554ea0ec3a5a156e3185719baf2b636f01ec0e3c3b80a18b344fe3d6885dc43cb%26scene%3D21%23wechat_redirect" data-itemshowtype="0" tab="innerlink" data-linktype="2" hasload="1" style="color: rgb(0, 122, 170);-webkit-tap-highlight-color: rgba(0, 0, 0, 0);background-color: transparent;outline: none;cursor: pointer;transition: color 0.3s ease 0s;touch-action: manipulation;max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;" rel="nofollow">Vite使Vue CLI过时了吗?</a> </section></li> <li style="max-width: 100%;font-size: 14px;color: rgb(0, 122, 170);box-sizing: border-box !important;overflow-wrap: break-word !important;"> <section style="max-width: 100%;line-height: 2em;box-sizing: border-box !important;overflow-wrap: break-word !important;"><a target="_blank" href="https://www.oschina.net/action/GoToLink?url=http%3A%2F%2Fmp.weixin.qq.com%2Fs%3F__biz%3DMzI0MDIwNTQ1Mg%3D%3D%26mid%3D2676495903%26idx%3D1%26sn%3D3b91d22e645fbf1a82e0f9addb8b2688%26chksm%3Df362ddfcc41554ea0ec3a5a156e3185719baf2b636f01ec0e3c3b80a18b344fe3d6885dc43cb%26scene%3D21%23wechat_redirect" data-itemshowtype="0" tab="innerlink" data-linktype="2" hasload="1" style="color: rgb(0, 122, 170);-webkit-tap-highlight-color: rgba(0, 0, 0, 0);background-color: transparent;outline: none;cursor: pointer;transition: color 0.3s ease 0s;touch-action: manipulation;max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;" rel="nofollow">思维训练:如何</a> <a target="_blank" href="https://www.oschina.net/action/GoToLink?url=http%3A%2F%2Fmp.weixin.qq.com%2Fs%3F__biz%3DMzI0MDIwNTQ1Mg%3D%3D%26mid%3D2676494424%26idx%3D1%26sn%3D8b79fed9b2e1c67dd8451c59fbe42a7f%26chksm%3Df362dbbbc41552adc909258cb3081ca90dd1b761dc6ef4ac3758266c5e0415de50ade47f187e%26scene%3D21%23wechat_redirect" data-itemshowtype="0" tab="innerlink" data-linktype="2" hasload="1" style="color: rgb(68, 181, 73);-webkit-tap-highlight-color: rgba(0, 0, 0, 0);background-color: transparent;outline: none;cursor: pointer;transition: color 0.3s ease 0s;touch-action: manipulation;max-width: 100%;font-size: 15px;letter-spacing: 0.476px;box-sizing: border-box !important;overflow-wrap: break-word !important;" rel="nofollow"><span style="max-width: 100%;font-size: 14px;color: rgb(0, 122, 170);box-sizing: border-box !important;overflow-wrap: break-word !important;">设计一个JavaScript插件系统?</span></a> <br style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;" /></section></li> <li style="max-width: 100%;font-size: 14px;color: rgb(0, 122, 170);box-sizing: border-box !important;overflow-wrap: break-word !important;"> <section style="max-width: 100%;min-height: 1em;line-height: 2em;box-sizing: border-box !important;overflow-wrap: break-word !important;"><a target="_blank" href="https://www.oschina.net/action/GoToLink?url=http%3A%2F%2Fmp.weixin.qq.com%2Fs%3F__biz%3DMzI0MDIwNTQ1Mg%3D%3D%26mid%3D2676495874%26idx%3D1%26sn%3Dbc59e4218a99915a0441263cca285152%26chksm%3Df362dde1c41554f7aa0adb36a9e706167c0b537b4f31d98779e8c50916d9423a1c2784675787%26scene%3D21%23wechat_redirect" data-itemshowtype="0" tab="innerlink" data-linktype="2" hasload="1" style="color: rgb(0, 122, 170);-webkit-tap-highlight-color: rgba(0, 0, 0, 0);background-color: transparent;outline: none;cursor: pointer;transition: color 0.3s ease 0s;touch-action: manipulation;max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;" rel="nofollow">MongoDB+Mongoose+Node.js后端开发最佳实践</a> <br style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;" /></section></li> <li style="max-width: 100%;font-size: 14px;color: rgb(0, 122, 170);box-sizing: border-box !important;overflow-wrap: break-word !important;"> <section style="max-width: 100%;min-height: 1em;line-height: 2em;box-sizing: border-box !important;overflow-wrap: break-word !important;"><a target="_blank" href="https://www.oschina.net/action/GoToLink?url=http%3A%2F%2Fmp.weixin.qq.com%2Fs%3F__biz%3DMzI0MDIwNTQ1Mg%3D%3D%26mid%3D2676495683%26idx%3D1%26sn%3D13ff2bb804bf1963fff05ba2bc1bf746%26chksm%3Df362dea0c41557b61d65d76004c09c75b925e8425a38015289978b03d3b8b11f2766619fb74f%26scene%3D21%23wechat_redirect" data-itemshowtype="0" tab="innerlink" data-linktype="2" hasload="1" style="color: rgb(0, 122, 170);-webkit-tap-highlight-color: rgba(0, 0, 0, 0);background-color: transparent;outline: none;cursor: pointer;transition: color 0.3s ease 0s;touch-action: manipulation;max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;" rel="nofollow">自动增长&lt;textareas&gt;的最干净技巧</a> </section></li> <li style="max-width: 100%;font-size: 14px;color: rgb(0, 122, 170);box-sizing: border-box !important;overflow-wrap: break-word !important;"> <section style="max-width: 100%;min-height: 1em;line-height: 2em;box-sizing: border-box !important;overflow-wrap: break-word !important;"><a target="_blank" href="https://www.oschina.net/action/GoToLink?url=http%3A%2F%2Fmp.weixin.qq.com%2Fs%3F__biz%3DMzI0MDIwNTQ1Mg%3D%3D%26mid%3D2676495664%26idx%3D1%26sn%3D80938070526dfa08c11f6101f992ba96%26chksm%3Df362ded3c41557c5de37ce15f9454bae768cc46dbd664fe408f4ce409bf22887db4ee5e495cf%26scene%3D21%23wechat_redirect" data-itemshowtype="0" tab="innerlink" data-linktype="2" hasload="1" style="color: rgb(0, 122, 170);-webkit-tap-highlight-color: rgba(0, 0, 0, 0);background-color: transparent;outline: none;cursor: pointer;transition: color 0.3s ease 0s;touch-action: manipulation;max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;" rel="nofollow">使用 GPU.js 改善JavaScript性能</a> <span style="max-width: 100%;color: rgb(51, 51, 51);font-family: mp-quote, -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 17px;text-align: justify;box-sizing: border-box !important;overflow-wrap: break-word !important;"></span> </section></li> <li style="max-width: 100%;font-size: 14px;color: rgb(0, 122, 170);box-sizing: border-box !important;overflow-wrap: break-word !important;"> <section style="max-width: 100%;min-height: 1em;line-height: 2em;box-sizing: border-box !important;overflow-wrap: break-word !important;"><a target="_blank" href="https://www.oschina.net/action/GoToLink?url=http%3A%2F%2Fmp.weixin.qq.com%2Fs%3F__biz%3DMzI0MDIwNTQ1Mg%3D%3D%26mid%3D2676495641%26idx%3D1%26sn%3Dc01c9a109621c2c469bdcf016aaea6c5%26chksm%3Df362defac41557ec870c67f3c4a0b036800f37d6136bffccdf1bc58df20eff6d8ce1b4c209d4%26scene%3D21%23wechat_redirect" data-itemshowtype="0" tab="innerlink" data-linktype="2" hasload="1" style="color: rgb(0, 122, 170);-webkit-tap-highlight-color: rgba(0, 0, 0, 0);background-color: transparent;outline: none;cursor: pointer;transition: color 0.3s ease 0s;touch-action: manipulation;max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;" rel="nofollow">初学者的技术写作:技术博客基础知识A-Z指南</a> <br style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;" /></section></li> <li style="max-width: 100%;font-size: 14px;color: rgb(0, 122, 170);box-sizing: border-box !important;overflow-wrap: break-word !important;"> <section style="max-width: 100%;min-height: 1em;line-height: 2em;box-sizing: border-box !important;overflow-wrap: break-word !important;"><a target="_blank" href="https://www.oschina.net/action/GoToLink?url=http%3A%2F%2Fmp.weixin.qq.com%2Fs%3F__biz%3DMzI0MDIwNTQ1Mg%3D%3D%26mid%3D2676495597%26idx%3D2%26sn%3D37aac76201ccc30d85222f4e03e73c17%26chksm%3Df362df0ec41556185fa9182b95beeff7cd039620509ded927639b0012dc089a922a6e951eda2%26scene%3D21%23wechat_redirect" data-itemshowtype="0" tab="innerlink" data-linktype="2" hasload="1" style="color: rgb(0, 122, 170);-webkit-tap-highlight-color: rgba(0, 0, 0, 0);background-color: transparent;outline: none;cursor: pointer;transition: color 0.3s ease 0s;touch-action: manipulation;max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;" rel="nofollow">create-react-app 4.0.0的新功能</a> <br style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;" /></section></li> <li style="max-width: 100%;font-size: 14px;color: rgb(0, 122, 170);box-sizing: border-box !important;overflow-wrap: break-word !important;"> <section style="max-width: 100%;min-height: 1em;line-height: 2em;box-sizing: border-box !important;overflow-wrap: break-word !important;"><a target="_blank" href="https://www.oschina.net/action/GoToLink?url=http%3A%2F%2Fmp.weixin.qq.com%2Fs%3F__biz%3DMzI0MDIwNTQ1Mg%3D%3D%26mid%3D2676495559%26idx%3D1%26sn%3Dd63523a1525b9de91ce4ebe27be79f2b%26chksm%3Df362df24c4155632427cd263381cef2440301aa1be1344461619297c6ba5198295af3960a2c9%26scene%3D21%23wechat_redirect" data-itemshowtype="0" tab="innerlink" data-linktype="2" hasload="1" style="color: rgb(0, 122, 170);-webkit-tap-highlight-color: rgba(0, 0, 0, 0);background-color: transparent;outline: none;cursor: pointer;transition: color 0.3s ease 0s;touch-action: manipulation;max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;" rel="nofollow">压箱底笔记:Promise和Async/await的理解和使用</a> <br style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;" /></section></li> <li style="max-width: 100%;font-size: 14px;color: rgb(0, 122, 170);box-sizing: border-box !important;overflow-wrap: break-word !important;"> <section style="max-width: 100%;min-height: 1em;line-height: 2em;box-sizing: border-box !important;overflow-wrap: break-word !important;"> Fetch API速查表:9个最常见的API请求 </section></li> <li style="max-width: 100%;font-size: 14px;color: rgb(0, 122, 170);box-sizing: border-box !important;overflow-wrap: break-word !important;"> <section style="max-width: 100%;min-height: 1em;line-height: 2em;box-sizing: border-box !important;overflow-wrap: break-word !important;"><a target="_blank" href="https://www.oschina.net/action/GoToLink?url=http%3A%2F%2Fmp.weixin.qq.com%2Fs%3F__biz%3DMzI0MDIwNTQ1Mg%3D%3D%26mid%3D2676495312%26idx%3D2%26sn%3D7b3c4788e1898ebe0ab83af2fa19fc8e%26chksm%3Df362d833c415512502fe4fa4c67a1ef1a53aa26a577e64bfff90a814f89182e9bb009011199d%26scene%3D21%23wechat_redirect" data-itemshowtype="0" tab="innerlink" data-linktype="2" hasload="1" style="color: rgb(0, 122, 170);-webkit-tap-highlight-color: rgba(0, 0, 0, 0);background-color: transparent;outline: none;cursor: pointer;transition: color 0.3s ease 0s;touch-action: manipulation;max-width: 100%;letter-spacing: 0.476px;box-sizing: border-box !important;overflow-wrap: break-word !important;" rel="nofollow">将HTML表格转换成精美的PDF</a> <span style="max-width: 100%;letter-spacing: 0.476px;box-sizing: border-box !important;overflow-wrap: break-word !important;">的几种方案比较</span> <br style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;" /></section><section style="max-width: 100%;min-height: 1em;line-height: 2em;box-sizing: border-box !important;overflow-wrap: break-word !important;"><br style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;" /></section></li> </ul><p style="max-width: 100%;min-height: 1em;color: rgb(89, 89, 89);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &quot;PingFang SC&quot;, Cambria, Cochin, Georgia, Times, &quot;Times New Roman&quot;, serif;font-size: 15px;letter-spacing: 0.75px;white-space: normal;background-color: rgb(255, 255, 255);text-align: center;box-sizing: border-box !important;overflow-wrap: break-word !important;"><span style="max-width: 100%;font-weight: 700;letter-spacing: 1px;caret-color: rgb(51, 51, 51);color: black;font-family: -apple-system-font, system-ui, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;box-sizing: border-box !important;overflow-wrap: break-word !important;">- END -</span></p> <p data-tool="mdnice编辑器" style="margin: 1em 4px;padding-top: 8px;padding-bottom: 8px;max-width: 100%;min-height: 1em;font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &quot;PingFang SC&quot;, Cambria, Cochin, Georgia, Times, &quot;Times New Roman&quot;, serif;font-size: 15px;white-space: normal;letter-spacing: 0.476px;background-color: rgb(255, 255, 255);color: rgba(0, 0, 0, 0.85);text-align: center;line-height: 26px;box-sizing: border-box !important;overflow-wrap: break-word !important;"><span style="max-width: 100%;font-size: 12px;letter-spacing: 0.5px;box-sizing: border-box !important;overflow-wrap: break-word !important;"><span style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"><span style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;">点赞 + 在看 + 留言,下一个幸运儿就是你!<br style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;" />走心的分享更容易被抽中~</span><br style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;" /><span style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;">开奖时间 下期文末</span></span></span></p> <p style="max-width: 100%;min-height: 1em;font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &quot;PingFang SC&quot;, Cambria, Cochin, Georgia, Times, &quot;Times New Roman&quot;, serif;white-space: normal;letter-spacing: 0.476px;color: rgb(63, 63, 63);font-size: 16px;background-color: rgb(255, 255, 255);text-align: center;box-sizing: border-box !important;overflow-wrap: break-word !important;"><img data-ratio="0.5555555555555556" data-type="png" data-w="900" style="vertical-align: middle;border-style: none;box-sizing: border-box !important;overflow-wrap: break-word !important;visibility: visible !important;width: 537px !important;" class="b-lazy" data-src="https://oscimg.oschina.net/oscnet/68679c33-dd73-4b0d-bfb2-39ffafcbacce.png" data-original="https://oscimg.oschina.net/oscnet/68679c33-dd73-4b0d-bfb2-39ffafcbacce.png" src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" /></p> <p style="max-width: 100%;min-height: 1em;font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &quot;PingFang SC&quot;, Cambria, Cochin, Georgia, Times, &quot;Times New Roman&quot;, serif;white-space: normal;letter-spacing: 0.476px;color: rgb(63, 63, 63);font-size: 16px;background-color: rgb(255, 255, 255);text-align: center;box-sizing: border-box !important;overflow-wrap: break-word !important;"><img data-type="gif" data-ratio="0.1732283464566929" data-w="635" class="__bg_gif b-lazy" style="vertical-align: middle;border-style: none;box-sizing: border-box !important;overflow-wrap: break-word !important;visibility: visible !important;width: 417px !important;" data-src="https://oscimg.oschina.net/oscnet/6cf8053a-776e-4558-b64c-14eee0876807.gif" data-original="https://oscimg.oschina.net/oscnet/6cf8053a-776e-4558-b64c-14eee0876807.gif" src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" /></p> </div> <p style="color: #858585; font-size: 13px;">本文分享自微信公众号 - 前端全栈开发者(by-zhangbing-dev)。<br />如有侵权,请联系 support@oschina.cn 删除。<br />本文参与“<a href="https://www.oschina.net/sharing-plan" target="_blank" rel="nofollow">OSC源创计划</a>”,欢迎正在阅读的你也加入,一起分享。</p> <div class="alert alert-success" role="alert"><p>来源:<code>oschina</code></p><p>链接:<code>https://my.oschina.net/u/1782402/blog/4863621</code></p></div></div> <div class="field field--name-field-tags field--type-entity-reference field--label-above"> <div class="field--label">标签</div> <div class="field--items"> <div class="field--item"><a href="/tag/javascript" hreflang="zh-hans">javascript</a></div> <div class="field--item"><a href="/tag/mongodb" hreflang="zh-hans">mongodb</a></div> <div class="field--item"><a href="/tag/nodejs" hreflang="zh-hans">node.js</a></div> <div class="field--item"><a href="/tag/github" hreflang="zh-hans">github</a></div> <div class="field--item"><a href="/tag/vite" hreflang="zh-hans">vite</a></div> <div class="field--item"><a href="/tag/vue-cli" hreflang="zh-hans">Vue CLI</a></div> <div class="field--item"><a href="/tag/safari" hreflang="zh-hans">safari</a></div> <div class="field--item"><a href="/tag/mongoose" hreflang="zh-hans">mongoose</a></div> <div class="field--item"><a href="/tag/create-react-app-0" hreflang="zh-hans">Create React App</a></div> <div class="field--item"><a href="/tag/android" hreflang="zh-hans">android</a></div> </div> </div> Sat, 20 Feb 2021 08:16:19 +0000 随声附和 4120506 at https://www.e-learn.cn