react兼容ie

使用最新版本的 create-react-app(v2.1.0)创建 react 项目时,在 IE 9 & IE 10 中碰到了"Map未定义"的报错: 很明显,这是 IE9 对 ES6 的兼容性问题。首先尝试了两种方式: 使用 create-react-app 官方提供的 react-app-poly...

react fetch封装

reruest.js: /** * 让fetch也可以timeout * timeout不是请求连接超时的含义,它表示请求的response时间,包括请求的连接、服务器处理及服务器响应回来的时间 * fetch的timeout即使超时发生了,本次请求也不会被abort丢弃掉,它在后台仍然会发送到服务器端...

react使用antd设置menu

构建menu组件: import React from 'react' import {Link,withRouter} from 'react-router-dom' import {Menu, Icon} from 'antd' //此组件的意义就是将数据抽离出来,通过传递数据去渲染 @withRo...

react 上线相对路径

package.json: 加入 "homepage" : "." , npm run eject 之后在config里面path.js 37行 路径改为相对路径,如下 envPublicUrl || (publicUrl ? url . parse (publicUrl). pathname : '....