摘要: 首先了解一个过程,redux 肯定是通过在组件中出发一个方法(事件),我们可以实现一个简单的例子播放和停止播放(写到这今日心情不好,下次继续) redux需要安装 以下依赖:cnpm install redux --savecnpm install react-redux --savecnpm in 阅读全文
posted @ 2019-01-09 20:43 国服第一李师师 阅读(147) 评论(0) 推荐(0)
摘要: 首先说明一点constructor中的只会渲染一次。 父组建是两个点击按钮,点击一个传过来bar,和一个line,子组件也就是当前组建通过this.props.type接收。 渲染是通过;;;;;;this.state.option 这里要用到一个监听props变化的方法 componentWill 阅读全文
posted @ 2019-01-05 20:02 国服第一李师师 阅读(632) 评论(0) 推荐(0)
摘要: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv 阅读全文
posted @ 2018-12-19 00:24 国服第一李师师 阅读(339) 评论(0) 推荐(0)
摘要: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv 阅读全文
posted @ 2018-12-16 12:06 国服第一李师师 阅读(386) 评论(0) 推荐(0)
摘要: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv 阅读全文
posted @ 2018-11-16 18:16 国服第一李师师 阅读(6915) 评论(0) 推荐(1)
摘要: 不过试了下只兼容IE。 <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <met 阅读全文
posted @ 2018-11-13 18:13 国服第一李师师 阅读(1383) 评论(8) 推荐(0)
摘要: Set和Map Set:类似数组 成员的值是唯一的 下有 add(),has(),delete(),clear(),size 等方法 Map:类似于对象 成员的值是唯一的 下有 set(),has(),delete(),clear(),size 等方法 1.set下的方法 const set = n 阅读全文
posted @ 2018-11-06 23:58 国服第一李师师 阅读(184) 评论(2) 推荐(0)
摘要: let arr1=new Set([1,2,3,1,2,3,4,5,3,32,2]);let arr2=new Set([1,4,32,4,3,6,8,9,9,]);let arr3=new Set([...arr1].filter((item)=> arr2.has(item))) ||||||| 阅读全文
posted @ 2018-11-06 21:15 国服第一李师师 阅读(241) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2018-11-05 19:05 国服第一李师师 阅读(136) 评论(1) 推荐(0)
摘要: let obj={name:'li',age:22}var result={}let deepFun=function(source){ for(let key in source){ if(typeof(source[key]) Object){ result[key]=deepFun(sourc 阅读全文
posted @ 2018-11-02 18:28 国服第一李师师 阅读(191) 评论(0) 推荐(0)