上一页 1 ··· 17 18 19 20 21 22 23 24 25 ··· 52 下一页
摘要: define interface: use in Function Component: 阅读全文
posted @ 2019-07-24 20:37 Nyan 阅读(436) 评论(0) 推荐(0) 编辑
摘要: import toastr @types/toastr toastr.ts @import "~toastr/build/toastr.min.css"; use: 阅读全文
posted @ 2019-07-23 16:46 Nyan 阅读(275) 评论(0) 推荐(0) 编辑
摘要: define interface: useState: update imageId && imageSrc: antd inputchange: antd form onsubmit add window resizeLitener 阅读全文
posted @ 2019-07-23 11:36 Nyan 阅读(904) 评论(0) 推荐(0) 编辑
摘要: Install Jest 1、install jest dependencies 2、jest.config.js 3、test jest foo.ts foo.test.ts Install Enzyme 1、install enzyme dependencies 2、configue enzym 阅读全文
posted @ 2019-07-22 18:32 Nyan 阅读(661) 评论(0) 推荐(0) 编辑
摘要: webstorm设置 settings >> TypeScript >> TSLint, 勾选 Enable ,选取 tslint包路径...npm\node_modules\tslint,这里webstorm基本会自动读取 配置tslint.json 阅读全文
posted @ 2019-07-22 16:16 Nyan 阅读(977) 评论(0) 推荐(0) 编辑
摘要: 1、webpack.config.js 2、tsconfig.json 3、declare images.d.ts 4、webpack.config.js 5、import * as Img from "./path/to/image.png"; 阅读全文
posted @ 2019-07-22 12:57 Nyan 阅读(676) 评论(0) 推荐(0) 编辑
摘要: 全称 JSON with Padding,用于解决AJAX跨域问题的一种方案。 由于同源策略的限制,浏览器只允许XmlHttpRequest请求当前源(域名、协议、端口)的资源,而对请求script资源没有限制。通过请求script标签实现跨域请求,然后在服务端输出JSON数据并执行回调函数,这种跨 阅读全文
posted @ 2019-07-21 14:57 Nyan 阅读(3652) 评论(3) 推荐(0) 编辑
摘要: 纯css画三角形与border元素相关 设置border的属性 去掉width和height 设置区域三个border颜色为透明 虽然当前显示为三角形,但实际占用的空间还是矩形,猜测与border-width有关 设置对立边的width为0 最终效果达成, border属性的顺序为 top, rig 阅读全文
posted @ 2019-07-21 11:15 Nyan 阅读(288) 评论(0) 推荐(0) 编辑
摘要: 顶部、底部定高,中间自适应 1.position定位 2. flex 弹性布局 顶部定高、左侧导航定宽、右侧内容自适应 1. 定位 2. float + margin 3. BFC 布局 4. flex布局 圣杯布局:顶部、底部定高,左右两侧定宽,中间自适应 1. flex布局 2. 定位 3. f 阅读全文
posted @ 2019-07-21 10:31 Nyan 阅读(218) 评论(0) 推荐(0) 编辑
摘要: Initialize the project create a folder project Now we’ll turn this folder into an npm package. This creates a package.json file with default values. I 阅读全文
posted @ 2019-07-19 11:18 Nyan 阅读(305) 评论(0) 推荐(0) 编辑
上一页 1 ··· 17 18 19 20 21 22 23 24 25 ··· 52 下一页