Comments (194)
打卡:elementUI组件Form设计**
1、el-input组件实现数据双向绑定、input事件传递给父组件,触发校验
2、el-form-item组件接受el-form传递的组件校验规则以及双向绑定数据模型,监听子组件触发的input事件,匹配对应的单条校验规则
3、el-form组件接受校验规则和数据模型model
4、使用vue provider 和inject 接口实现有归属关系组件之间直接传值,将el-form组件实例传递给el-form-item组件,以直接获取el-form组价接收到的校验规则;
5、使用async-validator校验库,进行校验规则的校验,返回对应结果,触发校验结果在页面的错误信息展示
from today-i-learned.
今日总结:微前端single-spa,single-spa-vue, 首先安装依赖 npm install single-spa-vue,然后修改main.js, 引入single-spa-vue, 修改new vue, const vueNav = singleSpaVue({
Vue,
appOptions: {
el: '#app',
router,
store,
render: r => r(App)
}
});,
single-spa 有三个常用的声明周期,bootstrap引导功能,mount挂载函数,unmount卸载函数,然后修改webpack.base.config.js文件的出口,output:增加library: 'main',libraryTarget: 'umd',然后增加公共依赖参数externals,初次研究微前端,还有很多没有研究明白,等项目运行成功,另写文章梳理
from today-i-learned.
- 深入浅出模块化(含 tree shaking)(上)
- 深入浅出模块化(含 tree shaking)(下)
- webpack 工程师和前端工程师(上)
- webpack 工程师和前端工程师(下)
- 代码规范工具及背后技术设计(上)
- 代码规范工具及背后技术设计(下)
from today-i-learned.
打卡 : js 基础学习笔记
1、函数提升 > 变量提升
2、函数名和变量名相同 如果变量未赋值 函数 > 变量
3、var s = function Test() {} 函数只读,只能内部调用
4、this 指向调用的位置 没人调用 指向window
5、ES6简单的函数 不支持new
6、new this 的指向
7、对象 闭包在一起 必须加分号
8、暂时性死区
掘金地址: https://juejin.im/post/5dd0a741f265da0bdb75da37
from today-i-learned.
from today-i-learned.
from today-i-learned.
https://juejin.im/post/5dd231316fb9a01ff13e1fcf
如何渲染几万条数据并不卡住界面?
这道题考察了如何在不卡住页面的情况下渲染数据,也就是说不能一次性将几万条
都渲染出来,而应该一次渲染部分 DOM,那么就可以通过 requestAnimationFrame 来
每 16 ms 刷新一次。
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
</head>
<body>
<ul>控件</ul>
<script>
setTimeout(() => {
// 插入十万条数据
const total = 100000
// 一次插入 20 条,如果觉得性能不好就减少
const once = 20
// 渲染数据总共需要几次
const loopCount = total / once
let countOfRender = 0
let ul = document.querySelector("ul");
function add() {
// 优化性能,插入不会造成回流
const fragment = document.createDocumentFragment();
for (let i = 0; i < once; i++) {
const li = document.createElement("li");
li.innerText = Math.floor(Math.random() * total);
fragment.appendChild(li);
}
ul.appendChild(fragment);
countOfRender += 1;
loop();
}
function loop() {
if (countOfRender < loopCount) {
window.requestAnimationFrame(add);
}
}
loop();
}, 0);
</script>
</body>
</html>
from today-i-learned.
打卡:箭头函数this指向总结https://www.cnblogs.com/zxmonster/p/11881282.html
from today-i-learned.
React Hooks自定义Hooks代替高阶组件实现长按逻辑
from today-i-learned.
from today-i-learned.
map和weakmap出来很久了 但是一直没有实际使用过, 今天研究了下其应用场景, 在合适的场景使用map或者weakMap真的会make life easy.
写了一篇文章: 是时候使用map代替object了
https://juejin.im/post/5dd2495bf265da0bd40d0b39
from today-i-learned.
https://juejin.im/post/5dd1096ee51d453af62c328b
理解堆栈。。这个对面试还是挺有帮助的
from today-i-learned.
今日学习:
前端数据结构-红黑树 https://docs.qq.com/doc/DVGJVU3JGbEpMckVQ
目前写到平衡二叉搜索树和2-3树,预计还需要两天才能完成,第一节完成了再放群里。。
from today-i-learned.
打卡:
跟着掘金这篇文章模拟了symbol的实现 https://juejin.im/post/5b1f4c21f265da6e0f70bb19
leetcode上用深搜刷了几道关于排列组合的题(第k个排列,全排列)
from today-i-learned.
日有所长:
[设计模式]单例模式从初识到实践https://juejin.im/post/5dd28c325188254c526a8da5
from today-i-learned.
打卡
typescript 基础 : 类型 / 接口
https://github.com/leoljustsave/A-hour-a-day/blob/master/note/typescript%20base.md
from today-i-learned.
今日学习:
webpack视频
- 使用happypack进行多进行/多实例打包
- 使用dll预编译模式对公共包进行打包
- tree Shaking 擦除无用的css代码
- 使用cache进行构建缓存
- 对图片进行压缩
- Node库 imagemin / yinypng API
- image-webpack-loader
- 动态polyfill
- polyfill Service 识别User Agent,动态下发不同的plyfill
- polyfill.is/v3/polyfill.min.js
附上我的学习的记录网站: study.maqixiang.com
from today-i-learned.
- 踩坑经历
微信小程序 微信开发者工具基础库 2.9.3 input 组件 onInput 失效 - 学到
小程序开发者工具用nwjs实现(待考究)
from today-i-learned.
打卡:
一、基于element的Table组件封装:
1、完善并实现了表格自适应高度设置,可根据内容,父级,设定值来设置高度
2、解决了表格服务端渲染数据的渲染过度动画
二、学习了JavaScript复杂判断的更优雅写法
链接:https://mp.weixin.qq.com/s/E_GqIhPKlSsH8Ln8vxG6oA
1、熟悉了Map的用法
2、又去看了一遍正则
from today-i-learned.
我学了断言:https://juejin.im/post/5dd2a28ef265da0bb036b8e8
from today-i-learned.
1.TypeScript 三斜线指令
next.env.d.ts描述文件中有
“/// ”这样的描述文件,这是ts中的引入方式。(抄自c#)
https://www.w3cschool.cn/typescript/typescript-triple-slash-directives.html
2.useContext的使用
父组件provider,子组件useContext,少写一层
3.封装useArray
hooks封装业务组件,自定义useArray,将根据index删除和根据key删除作为useArray的属性useCallback出去,可以很方便的实现列表中删除某一项
from today-i-learned.
18号打卡:
今天晚上学了go语言 GO语言 1-36课时
学习了golang的基本语法和 golang与js之间的区别,比如声明变量,连接方式,赋值方式等。(只学习到golang的类型)
(印象笔记的思维导图共享一直显示图片丢失,明天再换另一个笔记)
from today-i-learned.
- 学习小册<深入浅出Typescript>撸了一半
- 总结
- 明天目标:复习HTML5的新特性,阅读完剩余部分
from today-i-learned.
2019-11-19
学习webpakc的源码(一)
了解webpack-cli的运行原理,tapable的使用方式
http://study.maqixiang.com/webpack.html#webpack%E5%AD%A6%E4%B9%A0
from today-i-learned.
11月19日学习总结: 1.nodeJs中http模块是怎样返回数据,fs模块读取文件以及编写接口
2.浏览器知识,css是怎么影响首次加载白屏的,css和JavaScript文件是需要下载的,然后会发起两个文件的请求,这两个文件下载的时间是重叠的,所以会按照下载时间久的那个来计算
from today-i-learned.
2019-11-18
1.基础类型调用方法的执行过程(调用方法其值不变的原因)
2.typeof null 返回‘object’的原因
3.类型转换
4.this指向
5.模块导出
from today-i-learned.
11.19日:Promise学习总结(1)https://www.cnblogs.com/zxmonster/p/11888479.html
from today-i-learned.
2019-11-19
问题:
React 中 setState 什么时候是同步的,什么时候是异步的
解答:
在React中,如果是由React引发的事件处理(比如通过onClick引发的事件处理),调用setState不会同步更新this.state,除此之外的setState调用会同步执行this.state。所谓“除此之外”,指的是绕过React通过addEventListener直接添加的事件处理函数,还有通过setTimeout/setInterval产生的异步调用。
在React的setState函数实现中,会根据一个变量isBatchingUpdates判断是直接更新this.state还是放到队列中回头再说,而isBatchingUpdates默认是false,也就表示setState会同步更新this.state,但是,有一个函数batchedUpdates,这个函数会把isBatchingUpdates修改为true,而当React在调用事件处理函数之前就会调用这个batchedUpdates,造成的后果,就是由React控制的事件处理过程setState不会同步更新this.state。
from today-i-learned.
打卡 2019/11/19
1、Object.defineProperty
2、promise 实现 公众号代码 前端真好玩
3、阮一峰ES6 promise 章节 https://es6.ruanyifeng.com/#docs/promise#Promise-prototype-finally]
4、发布订阅模式 https://blog.csdn.net/hf872914334/article/details/88899326
5、数据劫持 Object.defineProperty 与 Proxy 的区别 http://www.fly63.com/article/detial/4072
笔记连接: https://juejin.im/post/5dd35c9e518825054f719228
from today-i-learned.
2019-11-19
会写React代码不一定会设计React组件, 写了一篇如何设计React组件的文章
https://juejin.im/post/5dd35370f265da0bbd558abc
from today-i-learned.
from today-i-learned.
2019-11-19
学习了一下Node的异步编程知识
Node异步编程
from today-i-learned.
2019-11-19
日有所长:
[轮子]一个纯TS的rollup+webpack-dev-server+jest开发类库的项目构建
from today-i-learned.
打卡
typescript 基础 : 函数 / 类
https://github.com/leoljustsave/A-hour-a-day/blob/master/note/typescript%20base.md
from today-i-learned.
打卡:leetcode (无重复字符串的最长字串)
vue原理理解:虚拟dom和render函数 https://juejin.im/post/5cd97c1cf265da03563252fe
from today-i-learned.
from today-i-learned.
11.19号 打卡
学习正则 笔记地址
from today-i-learned.
问题:在ts中的函数声明:
注意不要混淆了 TypeScript 中的 => 和 ES6 中的 =>。
在 TypeScript 的类型定义中,=> 用来表示函数的定义,左边是输入类型,需要用括号括起来,右边是输出类型。
function Tom (x:number,y:number):number{
return x+y
}
let person(x:number,y:number)=>number=function(x:number,y:number):number{
return x+y;
}
我们也可以先定义一个接口,去约束函数的参数类型和输出类型:
interface personFace{
(x:number,y:number):number
}
let person:personFace=function(x:number,y:number):number{
return x+y;
}
编译结果如下:
var person= function (x, y) {
return x + y;
};
from today-i-learned.
https://juejin.im/post/5dccdd24f265da0c09156fb3
在vue中非常使用的rules校验规则。。非常使用。。
from today-i-learned.
2019-11-19 学习日记:
解析matrix3d值:translateX & translateY
关键词:matrix3d、transform、CSS3、正则
获取元素计算后的transform的属性值,可以采用以下正则:
/^matrix3d\((?:[-\d.]+,\s*){12}([-\d.]+),\s*([-\d.]+)(?:,\s*[-\d.]+){2}\)/
/^matrix\((?:[-\d.]+,\s*){4}([-\d.]+),\s*([-\d.]+)\)$/
示例:
let matrix3dSourceValue = window.getComputedStyle( el )['transform']
let matrix3dArrValue =
matrix3dSourceValue.match( /^matrix3d\((?:[-\d.]+,\s*){12}([-\d.]+),\s*([-\d.]+)(?:,\s*[-\d.]+){2}\)/ ) ||
matrix3dSourceValue.match( /^matrix\((?:[-\d.]+,\s*){4}([-\d.]+),\s*([-\d.]+)\)$/ )
// matrix3dArrValue[0]: {matrix3dSourceValue}
// matrix3dArrValue[1]: translateX_value
// matrix3dArrValue[2]: translateY_value
// matrix3dArrValue[3]: input: 0
// matrix3dArrValue[4]: input: {matrix3dSourceValue}
from today-i-learned.
打卡:
1、学习了axios的部分源码 https://mp.weixin.qq.com/s/DUCIsPpMm0qx6m1VG4Y64g
2、学习了vuex的原理 https://m.ke.qq.com/course/367589?_wv=3&from=message&isappinstalled=0#wxlogin=1&from=courseShare
from today-i-learned.
ECMA制定脚本语言的标准
DOM(document Object model)操作网页上元素的API
BOM(Browser Object Model)操作浏览器的部分功能的API
js的常见输出方式
1通过弹窗形式输出
Alert(需要输出的内容),如果不是数字以字符串输出
confirm(需要输入的内容) 如果不是数字以字符串输出 按钮比alert多一个
Prompt(需要输入的内容)//有输入框
2通过网页内容区域的形式来输出
document.write(需要的内容);
3通过控制台进行输出
console.log(需要输入的内容)
console.warn(“警告输出”)
console.error(“错误输出”)
from today-i-learned.
leerle:
useModal 管理弹窗数据流
https://codesandbox.io/s/usemodal-ltoc9
from today-i-learned.
今日阅读:构建之法第一章。
学习:
- delete 0 是删除一个表达式。
- delete x 删除一个引用
- delete 尝试删除数值的时候,会返回true
from today-i-learned.
from today-i-learned.
- 复习部分H5新特性总结
- ts一些工具函数的实现
- 明天:实战用ts完成表单和表格页面设计和接口对接
from today-i-learned.
今日学习
基于webpack源码,书写一个简易的webpack实现
- es6转es5
- 模块化打包
- 类webpack配置项输出
github: https://github.com/HuskyToMa/simple_webpack
from today-i-learned.
11月20日学习总结:1nodeJs 中的express模块,介绍express模块功能,路由routing,http请求重定向redirection,以及支持express模板等,并用express方法get,post等请求方式,next中间件的了解,请求方法分模块维护,调用express next中间件方法
2 浏览器知识分层和合成机制,首先是显示器是怎么显示图像的,浏览器是有刷新频率的,通常是每秒60HZ,更新的图片都是读取显卡前缓冲的的地方,每秒提供60张前缓冲区的图像,显卡的职责就是合成新的图像,并将图像保存到后缓冲区中,一旦显卡把合成的图像写到后缓冲区,系统就会让后缓冲区和前缓冲区互换。分层:把一张网页想象成是由很多个图片叠加在一起的,每个图片就对应一个图层,Chrome 合成器最终将这些图层合成了用于显示页面的图片
from today-i-learned.
2019-11-20
一下都是vue源码解析
- 用 VNode 描述真实 DOM
- 用 VNode 描述抽象内容
- 使用 flags 作为 VNode 的标识
- VNode 的种类
- children 和 ChildrenFlags
- VNodeData
from today-i-learned.
2019-11-20
日有所长
[用TypeScript实现简单的Promise]https://juejin.im/post/5dd4f1045188254e15402bd2
from today-i-learned.
2019-11-20:Promise学习总结(2)https://www.cnblogs.com/zxmonster/p/11895734.html
from today-i-learned.
2019-11-20: 深入学习ES6作用域
for(let i of [1,2,3])
from today-i-learned.
打卡(2019/11/20)
1、什么是丑数
2、ES6 数组去重 Set Array.from 类数组转换成数组
3、Map 的妙用
4、冒泡排序 选择排序
笔记连接 https://juejin.im/post/5dd532e2f265da47d67c20b3
from today-i-learned.
打卡
typescript 笔记整理
https://github.com/leoljustsave/A-hour-a-day/blob/typescript/typescript/note/typescript%20base.md
from today-i-learned.
from today-i-learned.
打卡
今天工作中进行表格的二次封装改进
学习了axios的源码
学习了九种跨域方式的体现
from today-i-learned.
2019-11-20 学习日记:
CSS盒模型的三维立体结构
关键词:CSS、CSS盒模型
CSS盒模型的三维立体结构 如下:
- 第一层:border
- 第二层:content + padding
- 第三层:background-image
- 第四层:background-color
- 第五层:margin
from today-i-learned.
学习如何使用async & await 时优雅的处理。。这个文章讲的挺好的https://juejin.im/post/5dd1498df265da0bd315cca8
from today-i-learned.
读书笔记
1.单元测试应该在最基本的功能/参数上验证程序的正确性
2.单元测试必须由程序的作者来写
3.单元测试后,及其状态不变
4.天下武功,唯快不破
5.产生可重复一致性结果
6.独立性,单元测试的运行/通过/失败不依赖于别的测试。保持单元测试的独立性
7.集成到自动测试框架中
8.产品代码一起保存
from today-i-learned.
useModal
避免hide时由于清空弹窗的值导致弹窗关闭时闪现的问题。
export const useModal = (initTitle: string, initContent: string | React.ReactElement) => {
const [visible, setVisible] = useState(false);
const [title, setTitle] = useState(initTitle);
const [content, setContent] = useState(initContent);
const CustomModal = () => {
return (
{content}
);
}
const show = (content?: string | React.ReactElement) => {
content && setContent(content);
setVisible(true);
};
const hide = (delay?: number) => {
if (delay) {
setTimeout(() => setVisible(false), delay);
} else {
setVisible(false)
}
};
return {
show, hide, CustomModal, setTitle, setContent
}
}
from today-i-learned.
今天迁移博客文章时候 看到了之前写的chrome浏览器推送实现 感觉再次看到service worker生疏了, 一方面因为当时理解没到位,另一方面感觉是该复习了,最近想整理一个系列关于service worker应用的,比如离线缓存, 推送广告, 以及断网时保存数据恢复网络时更新数据之类的场景,今天看了upup.js的源码,他是对SW API的一个封装
https://dev.opera.com/articles/offline-with-upup-service-workers/
from today-i-learned.
from today-i-learned.
20号打卡:
看了方应杭的react造轮子
1-3章 了解lisp 函数式编程入门
理解了 为什么递归叫递归 迭代叫迭代 以及高阶函数的定义
from today-i-learned.
- 实战ts+react(未完成)
- 明天继续完成实战
from today-i-learned.
webpack深入学习,编写loader
http://study.maqixiang.com/webpack-loader.html#webpack-loader
from today-i-learned.
11月21日学习总结: 1.nodeJs中的koa,koa更小更轻便,定制性更高,没有express的路由等功能,需要配合koa生态圈来解决,koa解决了express异步的问题,koa可以使用async awiat关键字来创建函数,解决异步问题,koa把response和request都挂载在context对象上,这样我们自己的一些变量也可以统一挂载在context对象上,koa用的时候要通过new 关键字,示例use(‘/’,function(ctx,next){})
2.如何系统的优化页面:https://time.geekbang.org/column/article/143889
from today-i-learned.
2019-11-21
leetcode-有效的括号
from today-i-learned.
看了vue-element 关于el-input的源码
leetcode: 压缩字符串
from today-i-learned.
我学了,ts中内置的内置对象,常用的邮4种Boolean、Error、Date、RegExp等;
let b: Boolean = new Boolean(1);
let e: Error = new Error('Error occurred');
let d: Date = new Date();
let r: RegExp = /[a-z]/;
from today-i-learned.
2019.11.21
[x] 剖析 React 源码:先热个身
[x] 剖析 React 源码:调度原理
[x] 组件更新流程(一)
[x] 组件更新流程(二)diff
from today-i-learned.
2019.11.21:es6 Symbol学习及总结https://www.cnblogs.com/zxmonster/p/11903849.html
from today-i-learned.
2019-11-21
打卡:阅读程序员修炼之道
程序猿修炼之道-注重实效的哲学
from today-i-learned.
2019-11-21
日有所长
用装饰器实现截流与防抖https://juejin.im/post/5dd6870e5188254e237c81ce
from today-i-learned.
for循环创建dom使用cloneNode即可;
var dom=document.querySelector('.id');
for(let i=0;i<10;i++){
dom.innerHTML=i;
console.log(i)
document.querySelector('body').appendChild(dom.cloneNode(true))
}
from today-i-learned.
打卡
今天工作中进行表单封装的确认
进一步学习了JS执行时浏览器的内存分配
from today-i-learned.
打卡(2019/11/21)
常见的算法学习 地址: https://www.cnblogs.com/libin-1/p/7719537.html
from today-i-learned.
21号打卡:
实现一个简易版的新闻头条(h5端),
项目覆盖了:webpack工程化,前端项目架构,组件化模块化,前端分页机制,前端数据结构化,前端数据缓存,模板替换机制,异常处理技巧。
from today-i-learned.
阅读构建之法第三章
学习最短路径
from today-i-learned.
- 动手实践了 docker + Nginx + express + Redis + jenkin的环境
- 做了一个简单登录测试页面 使用OAuth2鉴权
from today-i-learned.
- 实现一个简单的ts+hook增删查
- hook中组件通信的一些方案
- 明日:react hooks api的总结
from today-i-learned.
22号学习日志
- 学习webpack的plugin写法以及实现一个简单的dmeo
- 了解svelte的基础内容以及书写方式和API
- 极客时间上阅读 设计模式之美
- 极客时间上阅读 JavaScript核心原理解析
- 思考 var a = {}; a.x = a =[]; a.x === undefinde的原因
http://study.maqixiang.com/svelte.html#svelte
from today-i-learned.
11月22日学习总结:1 nodeJs中与服务端通信rpc,ajax通信是基于tcp的,是通过地址发往dns的,然后dns解析域名返回ip,然后再发往服务端,服务端再返回数据,而rpc会更根据id寻址,然后返回ip,rpc是基于tcp或udp,tcp有单工通信,半双工通信,双工通信三种模式,单工通信是客户端往服务端发信息,全部发完后服务端才会给客户端发信息,半双工通信是客户端往服务端发一条信息,服务端返回一条信息,全双工通信指客户端与服务端可以随时通信,rpc发往服务端的数据更小,因为是二进制传输,ajax是json或html传输
2虚拟DOM和实际的DOM有何不同:https://time.geekbang.org/column/article/144569
from today-i-learned.
再次理解了前端堆栈队列关系,加深对event loop的理解
leetcode:构造矩形
from today-i-learned.
2019-11-22
sass学习小结
from today-i-learned.
from today-i-learned.
2019.11.22:es6 Interator学习总结https://www.cnblogs.com/zxmonster/p/11910732.html
from today-i-learned.
简单通用的发布订阅模式:
class Event {
constructor() {}
crop = {}
on(key, fn) {
if (!this.crop[key]) {
this.crop[key] = []
}
this.crop[key].push(fn);
console.log('我写的是', this.crop[key])
}
emit() {
let key = [].shift.call(arguments), //采用数组的方法,取到第一个key值
fns = this.crop[key];
console.log(key, fns)
if (!fns || fns.length === 0) { //规避 装注册函数的数组不存在发生的报错行为
return false;
}
fns.forEach(fn => {
fn.apply(this, arguments);
})
}
remove(key, fn) {
let fns = this.crop[key]; //我们先拿到整个装注册函数的盒子
if (!fns) return false; //规避 装注册函数的数组不存在发生的报错行为
if (!fn) return (fns && (fns.length = 0)) //触发函数不存在,清空 整个数组
else {
fns.forEach((ele, index) => {
if (ele === fn) {
fns.splice(index, 1)
}
})
}
}
}
let demo = new Event;
document.querySelector('.input').addEventListener('change', function (e) {
demo.emit('join', e.target.value)
}, false)
function join(data) {
console.log('狗蛋订阅的数据', data)
}
function join2(data) {
console.log('翠花订阅的数据', data)
}
function join3(data) {
console.log('狗剩订阅的报纸', data)
}
function join4(data) {
console.log('曹操的订阅的信', data)
}
demo.on('join', join);
demo.on('join', join2)
demo.on('join', join3)
demo.on('join', join4)
demo.remove('join', join2)
from today-i-learned.
2019-11-22打卡
设计模式之美:
基于接口而非实现编程
from today-i-learned.
从这个人博客里面看到几篇关于JS的文章将的非常好 做了笔记 准备整理一下发到掘金 https://dmitripavlutin.com
- optional chainning新特性的使用 以及babel插件配置
- 使用 [ ] 解构 Object.entries()
- 关于spread operator 的一些规则: 1. 合并对象的覆盖优先级 2. 如果合并一个类中有函数 函数会丢失的问题怎么修正 3. 如何实现浅拷贝 4. 如何用这个实现 immutable 结构
- 对于this绑定的常用场景以及手法
- 对于undefined的常用手法
from today-i-learned.
今天学习了call,apply,promise的手写
from today-i-learned.
打卡
关于今天误打误撞成功使用 typescript 管理接口返回的数据的思考 , 有些点待思考
https://github.com/leoljustsave/A-hour-a-day/blob/typescript/typescript/article/%E6%8E%A5%E5%8F%A3%E7%AE%A1%E7%90%86.md
from today-i-learned.
2019-11-22 学习日记:
BFC
关键词:BFC
特性:
- BFC内部的内部box元素会在垂直方向上一个一个排列
- BFC内部的内部相邻的box的上下margin会发生折叠
- BFC内部的每一个盒子的margin-left会触碰到容器的border-left(默认从左到右的排序下)
- 形成了BFC的区域不会与float box重叠
- 计算BFC高度时,浮动元素也参与计算
生成:
- 根元素()
- 浮动元素(float != none)
- 绝对定位或固定定位元素(position = absolute | fixed)
- 行内块元素(inline-block)
- 表格单元格 或 表格标题(table-cell or table-caption)
- 匿名表格单元格元素(display = table | table-row | table-row-group | table-header-group | table-footer-group | inline-table)
- 设置overflow不为visible的元素(overflow != visible)
- 设置display为flow-root的元素(display = flow-root)
- 设置contain为layout、content或paint的元素(contain = layout | content | paint)
- 弹性元素(display = flex | inline-flex元素的直接子元素)
- 网格元素(display = grid | inline-grid元素的直接子元素)
- 多列容器(column-count or column-with != auto,以及column-count = 1)
- columb-span = all的元素始终会创建一个新的BFC
作用:
- 当子元素设置了浮动时,将其父元素设置为BFC可以修复父元素高度塌陷
- 如果同一个BFC内的相邻box的上下margin发生重叠,可以将之放置到不同的BFC中
- divA divB,A设置了浮动时(例:float = left),此时A将浮动在B上,如果设置B的overflow = hidden触发BFC,则B将在A的左侧排列
from today-i-learned.
2019-11-22
日有所长
用栈实现队列https://juejin.im/post/5dd8031a518825732c764948
from today-i-learned.
打卡2019/11/11
打卡学习 typescript 基础类型
学习地址https://www.tslang.cn/docs/handbook/basic-types.html
from today-i-learned.
from today-i-learned.
rxjs + 数据库查询 + 数据持久 .非常适合在线协作的应用场景
from today-i-learned.
- react hooks api的总结
- 明日: redux redux-sage dava数据流的使用和原理 对前5天的知识做一个总结
from today-i-learned.
22号打卡
看视频学习ts 1-12 https://www.bilibili.com/video/av38379328?p=12
23号看完
from today-i-learned.
mooc视频 jest自动化测试
leetcode 最大子序和
from today-i-learned.
深入浅出vue.js
- 实例对象代理访问数据 data
- 数据响应系统的基本思路
- observe 工厂函数
- 数据对象的 ob 属性
- 响应式数据之纯对象的处理
- defineReactive 函数
- 被观测后的数据对象的样子
- 在 get 函数中如何收集依赖
- 在 set 函数中如何触发依赖
- 保证定义响应式数据行为的一致性
- 响应式数据之数组的处理
- 拦截数组变异方法的思路
from today-i-learned.
Related Issues (20)
- 移动端下载App
- javascript 实现希尔排序。
- > ```js
- 2019.7.29 - 8.4 中你学到什么? HOT 39
- 在iviewui Upload 对图片大小进行验证
- 加群加不进去呀?
- why not write a blog about learning ~
- cordova+vue 打包成app,并调试app
- 2019.8.5 - 8.11 中你学到什么? HOT 16
- 2019.8.12 - 8.18中你学到什么? HOT 7
- 2019.8.19 - 8.25中你学到什么? HOT 9
- 2019.8.26 - 9.1中你学到什么? HOT 6
- 2019.9.2 - 9.8中你学到什么? HOT 3
- 2019.9.9 - 9.15中你学到什么?
- 2019.9.16 - 9.22中你学到什么? HOT 3
- 拆解async/await(用promise实现async/await)
- 打卡 复习git和HTML
- 2019.12.02 - 12.08 中你学到什么? HOT 95
- 2020.3.9-2020.3.15你学到什么? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from today-i-learned.