03 2020 档案
摘要:安装组件react-grid-layout yarn add react-grid-layout 引入拖动样式,不然没有拖动效果 import '../../../node_modules/react-grid-layout/css/styles.css' import React from 're
阅读全文
posted @ 2020-03-24 14:51
KamYee
摘要:创建项目,app-name = 项目名称 yarn create react-app app-name --template typescript 执行完毕控制台输入 cd app-name 然后输入运行命令,等待运行起来,项目基本功能已经初始化完毕了 yarn start 增加状态管理器 切换镜像
阅读全文
posted @ 2020-03-17 15:48
KamYee
摘要:var a = {n: 1}; var b = a; a.x = a = {n: 2}; console.log(a.x) // undefined console.log(b.x) // {n: 2} 解答: 点的优先级高于等号,所以先执行a.x 然后在从右执行赋值 传送门 mdn 优先级运算类型
阅读全文
posted @ 2020-03-05 10:45
KamYee
摘要:for...in for...in语句以任意顺序遍历一个对象的除Symbol以外的可枚举属性。 for...in会循环原型链上的属性 function test() { } test.prototype.testa = '123123' var c1 = new test() c1.testb =
阅读全文
posted @ 2020-03-04 17:11
KamYee

浙公网安备 33010602011771号