摘要: 组件传参: 在父组件通过属性传入 类似Vue 在子组件中通过函数的参数接受 阅读全文
posted @ 2019-10-27 14:50 秋风渡明月 阅读(870) 评论(0) 推荐(0) 编辑
摘要: 函数组件的组成 函数体(返回jsx)+名字(首字母必须大写)+使用 阅读全文
posted @ 2019-10-27 14:35 秋风渡明月 阅读(1188) 评论(0) 推荐(0) 编辑
摘要: // 获取当月的天数 function getCountDays() { var curDate = new Date(); /* 获取当前月份 */ var curMonth = curDate.getMonth(); /* 生成实际的月份: 由于curMonth会比实际月份小1, 故需加1 */ curDate.setMonth(curMonth + 1); /* 将日期设置为0, 这里为什么 阅读全文
posted @ 2019-10-26 15:59 秋风渡明月 阅读(2162) 评论(0) 推荐(0) 编辑
摘要: https://segmentfault.com/a/1190000020458087 这是我写的,可以去看看,希望对你们有帮助!!! 阅读全文
posted @ 2019-10-26 15:23 秋风渡明月 阅读(1786) 评论(0) 推荐(0) 编辑
摘要: 使用1、 // js文件,第一部引入React(大写,不然保错) import React from 'react' // 创建数组 const arrList = Array.from({length:60},(_item,index)=>index) const arr = arrList.ma 阅读全文
posted @ 2019-10-26 15:13 秋风渡明月 阅读(203) 评论(0) 推荐(2) 编辑