摘要: 1.JS跳转路由(需要拿到父组件的history) clickHandle(){ let history = this.props.history; history.push( '/home') } 2.刷新页面(需要拿到父组件的history) clickHandle(){ let history 阅读全文
posted @ 2018-01-11 14:39 大耳朵小虎 阅读(633) 评论(0) 推荐(0) 编辑
摘要: 1. 在项目中安装 npm install react-intl --save 2.兼容Safari各个版本需要安装intl npm install intl --save 3.编写语言包 1.)新建 en_US.js const = en_US = { hello: "Hello world !" 阅读全文
posted @ 2018-01-11 14:28 大耳朵小虎 阅读(244) 评论(0) 推荐(0) 编辑
摘要: PC: antd(蚂蚁金服)https://ant.design/index-cn 移动: mobile-antd(蚂蚁金服)https://mobile.ant.design 1. react-lazyimg-component (关于img动画效果,摘自:http://react-china.o 阅读全文
posted @ 2018-01-11 14:10 大耳朵小虎 阅读(107) 评论(0) 推荐(0) 编辑
摘要: 1.函数 preventBackgroundScroll(e: React.WheelEvent<HTMLDivElement>){ const target = e.currentTarget if ((e.deltaY < 0 && target.scrollTop <= 0) ||(e.del 阅读全文
posted @ 2018-01-11 14:05 大耳朵小虎 阅读(132) 评论(1) 推荐(0) 编辑
摘要: jQuery 1. 引入 <script src="http://libs.baidu.com/jquery/2.0.0/jquery.js"></script> 2.事件选择器 $('.btn').click(function(){ if ($('.input-code').val() == "" 阅读全文
posted @ 2018-01-11 14:02 大耳朵小虎 阅读(89) 评论(0) 推荐(0) 编辑