gulp自动给css,js批量添加版本号,解决缓存 每次css或js文件修改之后,浏览器因有缓存而无法及时的呈现最新的页面内容。 解决方法:用gulp自动给html引入的css,js文件批量添加版本号 原html效果: <link rel="st...
node递归获取文件夹下所有文件 var path = require("path"); var fs = require("fs"); console.log(dirname) let components = []; var ar...
form表单提交不跳转 方案一 <html> <body> <form action="" method="post" target="nmiframe"> <input type=...
react兼容ie 使用最新版本的 create-react-app(v2.1.0)创建 react 项目时,在 IE 9 & IE 10 中碰到了"Map未定义"的报错: 很明显,这是 IE9 对 ES6 的兼...
react fetch封装 reruest.js: / 让fetch也可以timeout timeout不是请求连接超时的含义,它表示请求的response时间,包括请求的连接、服务器处理及服务器响应回来的时间 fetch的ti...
react根元素添加元素 body添加元素 import React from 'react'; import ReactDOM from 'react-dom'; class NewPortal extends React.Component...
react使用antd设置menu 构建menu组件: import React from 'react' import {Link,withRouter} from 'react-router-dom' import {Menu, I...
react实现柱状图点击阴影 react echarts阴影点击 render(){ return( <div> <EchartsReact option={option} ref={(e) => { this.echartsReactRef...
原 React 监听屏幕尺寸变化 1.在componentDidMount()中加入监听器 componentDidMount() { this.screenChange(); } screen...
react 上线相对路径 package.json: 加入 "homepage":".", npm run eject 之后在config里面path.js 37行 路径改为相对路径,如下 envPublicUrl || (p...