07 2019 档案
摘要:import * as _ from "lodash"; import paramCache from "../common/param-cache" import RequestPromise from "./axios-service/RequestPromise"; export const fetchSystemParams = () => { return RequestPr...
阅读全文
摘要:1、system-params-service 2、param-type (filter) 3、param-select component
阅读全文
摘要:define basic data: declare reducer: define useAsyncTable 传入相应的参数,通过userReducer执行不一样的action更新state数据,使用useEffect监听数据发生变化重新渲染页面 useEffect 监听请求 return re
阅读全文
摘要:formatData = JSON.Stringfy(data, null, 2)
阅读全文
摘要:define interface: use in Function Component:
阅读全文
摘要:import toastr @types/toastr toastr.ts @import "~toastr/build/toastr.min.css"; use:
阅读全文
摘要:define interface: useState: update imageId && imageSrc: antd inputchange: antd form onsubmit add window resizeLitener
阅读全文
摘要: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
阅读全文
摘要:webstorm设置 settings >> TypeScript >> TSLint, 勾选 Enable ,选取 tslint包路径...npm\node_modules\tslint,这里webstorm基本会自动读取 配置tslint.json
阅读全文
摘要: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";
阅读全文
摘要:全称 JSON with Padding,用于解决AJAX跨域问题的一种方案。 由于同源策略的限制,浏览器只允许XmlHttpRequest请求当前源(域名、协议、端口)的资源,而对请求script资源没有限制。通过请求script标签实现跨域请求,然后在服务端输出JSON数据并执行回调函数,这种跨
阅读全文
摘要:纯css画三角形与border元素相关 设置border的属性 去掉width和height 设置区域三个border颜色为透明 虽然当前显示为三角形,但实际占用的空间还是矩形,猜测与border-width有关 设置对立边的width为0 最终效果达成, border属性的顺序为 top, rig
阅读全文
摘要:顶部、底部定高,中间自适应 1.position定位 2. flex 弹性布局 顶部定高、左侧导航定宽、右侧内容自适应 1. 定位 2. float + margin 3. BFC 布局 4. flex布局 圣杯布局:顶部、底部定高,左右两侧定宽,中间自适应 1. flex布局 2. 定位 3. f
阅读全文
摘要: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
阅读全文
摘要:code: sample:
阅读全文
摘要:.scroll-table { table tbody { display: block; max-height: 120px; overflow-y: scroll; } table thead,tbody tr { display: table; width: 100%; ...
阅读全文