shizhonghai / shizhonghai.github.io Goto Github PK
View Code? Open in Web Editor NEWshizhonghai blog
Home Page: https://shizhonghai.github.io
shizhonghai blog
Home Page: https://shizhonghai.github.io
https://shizhonghai.github.io/2020/03/02/webpack-optimization/
加油在家的日子不能出去玩,不能出去吃,的确是很不开心的,不过也是真的增加了好多空闲时间 与其在家呆着无聊,不如安安静静的学习一下 疫情期间,不管怎样,心态不能崩,武汉加油,**加油 闲言少叙,现在我们就开始一起学习吧 优化是个好词优化,就是加以改变或选择使优良,在工作当中是让提升效率的好办法。当然,webpack 优化千千万,但我觉得这些就够了首当其冲的,就是工作中那些用不到的样式,可能是由于历史
https://shizhonghai.github.io/2020/04/14/echart-resize/
1.图表宽度需设置成 100% 2.同页面多图表请用 addEventListener 方法监听窗体大小改变 123456789// 监听窗口变化 - 只刷新最后一个图表,后定义的会覆盖前面定义的,只有1个生效window.onresize = ()=> { EChart.resize(); };// 监听窗口变化 - 多个图表同时刷新window.addE
https://shizhonghai.github.io/2020/04/13/javascript-arrary/
问题:[[0, 1], [2, 3], [4, 5]] -> [0, 1, 2, 3, 4, 5]? 方法一 利用 es5 的 arr.reduce(callback[, initialValue]) 实现 123let arr1 = [[0, 1], [2, 3], [4, 5]];let arr2 = arr1.reduce( (a, b) => a.concat(b) );//
https://shizhonghai.github.io/2020/02/21/lowdb/#more
NPM 源地址 : https://www.npmjs.com/package/lowdb 用于Node,Electron和浏览器的小型JSON数据库。由Lodash提供技术支持 123db.get('posts') .push({ id: 1, title: 'lowdb is awesome'}) .write() 用法1npm install lowdb 1234
https://shizhonghai.github.io/2019/12/12/hexo-error-DTraceProviderBindings/
hexo 报错1Error: Cannot find module './build/Release/DTraceProviderBindings' 解决办法 on googlegoogle之后发现被这个问题困扰的小伙伴还真不少,网上最靠谱的解决办法是: 1$ npm install hexo --no-optional 的确很多小伙伴执行上面的命令之后都解决了报错的问题,但也
https://shizhonghai.github.io/2019/07/11/react-typescript/
注释文件顶部的注释,包括描述、作者、日期12345/** * @description xxxxxx * @author chengfeng * @SInCE 19/05/21 / 模块的注释123456/* * 拷贝数据 * @param {*} data 要拷贝的源数据 * @param {boolean} [isDeep=false] 是
https://shizhonghai.github.io/2019/04/25/javascript-regexp/
在 JavaScript 中,正则表达式(Regular Expressions)也是对象。这些模式被用于 RegExp 的 exec 和 test 方法, 以及 String 的 match、replace、search 和 split 方法。 创建一个正则表达式你可以使用以下两种方法之一构建一个正则表达式:使用一个正则表达式字面量,其由包含在斜杠之间的模式组成,如下所示: 123var re
https://shizhonghai.github.io/2019/08/02/react-component/
防止自己忘掉 React 的一些生命周期方法,方便自己回忆和查阅。 componentDidUpdate() componentDidUpdate(prevProps, prevState, snapshot) componentDidUpdate() 会在更新后会被立即调用。首次渲染不会执行此方法。 当组件更新后,可以在此处对 DOM 进行操作。如果你对更新前后的 props 进行了比较,也可
https://shizhonghai.github.io/2019/12/12/Daily-Interview-Question-2/
第 0002 题:Vue 中的 computed 和 watch 的区别在哪里computed:计算属性 计算属性是由 data 中的已知值,得到的一个新值。 这个新值只会根据已知值的变化而变化,其他不相关的数据的变化不会影响该新值。 计算属性不在 data 中,计算属性新值的相关已知值在 data 中。 别人变化影响我自己。 watch:监听数据的变化 监听data中数据的变化。 监听的数
https://shizhonghai.github.io/2020/01/07/gitignore/
Git 忽略规则#此为注释 – 内容被 Git 忽略 .sample # 忽略所有 .sample 结尾的文件 !lib.sample # 但 lib.sample 除外 /TODO # 仅仅忽略项目根目录下的 TODO 文件,不包括 subdir/TODO build/ # 忽略 build/ 目录下的所有文件 doc/.txt # 会忽
https://shizhonghai.github.io/2019/08/12/echarts-tooltip/
由于项目需求,悬浮框内容较多,会出现悬浮框(tooltip)很长或者很宽的现象,而太长了,就会被 Echarts 溢出隐藏了,所以需要自定义定位需求 需求描述:鼠标悬浮在左侧某一个点时,悬浮框悬停在点的右侧;鼠标悬停在右侧某一个点时,悬浮框悬停在点的左侧。 首先明确一点,我们需要借助 tooltip.position 属性。理想的思路是我们在回调函数中获取鼠标每次悬停的坐标,然后再判断这个坐标
https://shizhonghai.github.io/blog-daily/2019/07/26/CSS-skill/
padding 配合 background-clip 属性,可以制作一些特殊形状:123456789101112131415161718192021222324/三道杠/.icon1 { box-sizing: border-box; display: inline-block; width: 12px; height: 10px; padding: 2px 0; bor
https://shizhonghai.github.io/2019/05/06/hexo-next-des/
Next 主题官网 Hexo 博客官网
https://shizhonghai.github.io/blog-daily/2019/08/12/echarts-tooltip/
由于项目需求,悬浮框内容较多,会出现悬浮框(tooltip)很长或者很宽的现象,而太长了,就会被 Echarts 溢出隐藏了,所以需要自定义定位需求 需求描述:鼠标悬浮在左侧某一个点时,悬浮框悬停在点的右侧;鼠标悬停在右侧某一个点时,悬浮框悬停在点的左侧。 首先明确一点,我们需要借助 tooltip.position 属性。理想的思路是我们在回调函数中获取鼠标每次悬停的坐标,然后再判断这个坐标
https://shizhonghai.github.io/2019/05/06/markdown/
简介Markdown 是一种轻量级标记语言,它用简洁的语法代替排版,使我们专心于码字。它的目标是实现易读易写,成为一种适用于网络的书写语言。同时,Markdown 支持嵌入 html 标签。注意:Markdown 使用 #、+、* 等符号来标记, 符号后面必须跟上至少1个空格才有效!
https://shizhonghai.github.io/2020/08/14/javascript-depth-recursion/#more
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556const fuck = [{"label": "占用道路问题", "value": 31, "children": [{"label": "经营占道", "value":
测试一个 issues
https://shizhonghai.github.io/blog-daily/2019/12/12/Daily-Interview-Question-3/
第 0003 题:webpack 中 loader 和 plugin 的区别是什么loader 它是一个转换器,将 A 文件进行编译成 B 文件,比如:将 A.less 转换为 A.css,单纯的文件转换过程。plugin 是一个扩展器,它丰富了 webpack 本身,针对是 loader 结束后,webpack 打包的整个过程,它并不直接操作文件,而是基于事件机制工作,会监听 webpack 打
https://shizhonghai.github.io/blog-daily/2019/12/12/Daily-Interview-Question-2/
第 0002 题:Vue 中的 computed 和 watch 的区别在哪里computed:计算属性 计算属性是由 data 中的已知值,得到的一个新值。 这个新值只会根据已知值的变化而变化,其他不相关的数据的变化不会影响该新值。 计算属性不在 data 中,计算属性新值的相关已知值在 data 中。 具有缓存性,页面重新渲染值不变化,计算属性会立即返回之前的计算结果,而不必再次执行函数。
https://shizhonghai.github.io/2019/05/23/react-typescript/
注释文件顶部的注释,包括描述、作者、日期12345/** * @description xxxxxx * @author chengfeng * @SInCE 19/05/21 / 模块的注释123456/* * 拷贝数据 * @param {*} data 要拷贝的源数据 * @param {boolean} [isDeep=false] 是
https://shizhonghai.github.io/2020/01/15/github/
显示 GitHub Stars 数量 (官方文档地址:https://shields.io/)
https://shizhonghai.github.io/blog-daily/2019/07/18/javascript-glossary/
变量提升(hoisting)var 命令会发生“变量提升”现象,即变量可以在声明之前使用,值为undefined
https://shizhonghai.github.io/2020/05/27/sequelize-model-dataType/
Sequelize 中 Model 的数据类型对应MySQL中的数据类型 123456789101112131415161718192021222324252627282930Sequelize.STRING // VARCHAR(255) 类型:字符串 最大值: 65535个字符Sequelize.STRING(1234
https://shizhonghai.github.io/2019/03/01/javascript-skill/
Array Skill 统计元素个数 123456const arr = [0, 1, 1, 2, 2, 2];const count = arr.reduce((t, c) => { t[c] = t[c] ? ++ t[c] : 1; return t;}, {});// count => { 0: 1, 1: 2,
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.