Loading [MathJax]/jax/element/mml/optable/GeneralPunctuation.js

01 2018 档案

摘要:1. 测试点击的是否是span 标签 <span onClick={this.select.bind(this)}>点击</span> select( e ){ console.log(e.target.matches(`{'span'}`)) } 注:` `位EMC5字符串模板 `{xx}($ 阅读全文
posted @ 2018-01-31 10:29 大耳朵小虎 阅读(92) 评论(0) 推荐(0) 编辑
摘要:1. https : https 部署 通过letsencrypt(https://letsencrypt.org/)获取的免费https证书。不是正规的渠道获取https证书 浏览器上会出现安全问题无法跳转 阅读全文
posted @ 2018-01-26 17:18 大耳朵小虎 阅读(96) 评论(0) 推荐(0) 编辑
摘要:1. 自身的hover div :hover{ :hover前要有空格 } 2.hover指向子元素 father:hover .childer { :hover前不能有空格 } 3.hover指向相邻元素 .pre:hover +.nex { :hover前不能有空格 } 阅读全文
posted @ 2018-01-23 18:08 大耳朵小虎 阅读(142) 评论(0) 推荐(0) 编辑
摘要:1. 被更新时触发 componentDidUpdate(prevProps, prevState){ const typrval = this.props.typrval; if (typrval prevProps.typrval) { return } (需要执行的函数) }2. 基本顺序 c 阅读全文
posted @ 2018-01-16 18:35 大耳朵小虎 阅读(100) 评论(0) 推荐(0) 编辑
摘要:1. document.activeElement.blur(); 苹果下会出现一个完成的tab,去掉方法如下: <input id="job" onfocus="this.blur()"> 输入框添加:onfocus="this.blur()" 阅读全文
posted @ 2018-01-16 18:32 大耳朵小虎 阅读(123) 评论(0) 推荐(0) 编辑
摘要:1. 父组件如何获取子组件的方法以及属性? 1.)父组件: render( ){ console.log( this.refs.getmethod ); return ( <div> <children ref="getmethod" /> </div> ) } 2.)子组件: 属性 方法 阅读全文
posted @ 2018-01-16 15:12 大耳朵小虎 阅读(98) 评论(0) 推荐(0) 编辑
摘要:1. 字体间距 1.)word-spacing: 2.)letter-spacing: 3.)text-indent 4.)text-align-last: justify; 和 text-align: justify; 两端对齐 2.textarea textarea 标签彻底禁用拖动(推荐)re 阅读全文
posted @ 2018-01-12 18:29 大耳朵小虎 阅读(92) 评论(0) 推荐(0) 编辑
摘要:1. filter( ) var arr = [5,4,3,2,1]; newarr = arr.filter((item)=>{ return item<3 }) ; // => [2,1] 2. every( ) 和 some( ) var arr = [5,4,3,2,1]; newarr = 阅读全文
posted @ 2018-01-12 17:10 大耳朵小虎 阅读(188) 评论(0) 推荐(0) 编辑
摘要:1.JS跳转路由(需要拿到父组件的history) clickHandle(){ let history = this.props.history; history.push( '/home') } 2.刷新页面(需要拿到父组件的history) clickHandle(){ let history 阅读全文
posted @ 2018-01-11 14:39 大耳朵小虎 阅读(638) 评论(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 大耳朵小虎 阅读(264) 评论(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 大耳朵小虎 阅读(110) 评论(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 大耳朵小虎 阅读(140) 评论(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 大耳朵小虎 阅读(90) 评论(0) 推荐(0) 编辑
摘要:1.申明函数: function preventBackgroundScroll(e: React.WheelEvent){ const target = e.currentTarget if ( (e.deltaY 0 && target.scrollHeight target.clientHei 阅读全文
posted @ 2018-01-10 18:39 大耳朵小虎 阅读(244) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示