上一页 1 ··· 7 8 9 10 11 12 13 下一页
摘要: function conver(limit){ var size = ""; if( limit < 0.1 * 1024 ){ //如果小于0.1KB转化成B size = limit.toFixed(2) + "B"; }else if(limit < 0.1 * 1024 * 1024 ){ 阅读全文
posted @ 2018-02-08 11:45 大耳朵小虎 阅读(346) 评论(0) 推荐(0) 编辑
摘要: 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 大耳朵小虎 阅读(91) 评论(0) 推荐(0) 编辑
摘要: 1. https : https 部署 通过letsencrypt(https://letsencrypt.org/)获取的免费https证书。不是正规的渠道获取https证书 浏览器上会出现安全问题无法跳转 阅读全文
posted @ 2018-01-26 17:18 大耳朵小虎 阅读(94) 评论(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 大耳朵小虎 阅读(137) 评论(0) 推荐(0) 编辑
摘要: 1. 被更新时触发 componentDidUpdate(prevProps, prevState){ const typrval = this.props.typrval; if (typrval prevProps.typrval) { return } (需要执行的函数) }2. 基本顺序 c 阅读全文
posted @ 2018-01-16 18:35 大耳朵小虎 阅读(99) 评论(0) 推荐(0) 编辑
摘要: 1. document.activeElement.blur(); 苹果下会出现一个完成的tab,去掉方法如下: <input id="job" onfocus="this.blur()"> 输入框添加:onfocus="this.blur()" 阅读全文
posted @ 2018-01-16 18:32 大耳朵小虎 阅读(120) 评论(0) 推荐(0) 编辑
摘要: 1. 父组件如何获取子组件的方法以及属性? 1.)父组件: render( ){ console.log( this.refs.getmethod ); return ( <div> <children ref="getmethod" /> </div> ) } 2.)子组件: 属性 方法 阅读全文
posted @ 2018-01-16 15:12 大耳朵小虎 阅读(97) 评论(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 大耳朵小虎 阅读(88) 评论(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 大耳朵小虎 阅读(183) 评论(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 大耳朵小虎 阅读(633) 评论(0) 推荐(0) 编辑
上一页 1 ··· 7 8 9 10 11 12 13 下一页