上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 29 下一页
摘要: div滚动条可以做多个区块的多内容展示 使用方式: import Scrollbar from '../common/scrollbar' <Scrollbar className={styles.body} scroll={this.onScroll}> {内部内容} </Scrollbar> 引 阅读全文
posted @ 2020-09-15 15:34 herry菌 阅读(507) 评论(0) 推荐(0) 编辑
摘要: 项目中我一般用的还是react15的比较多,偶尔接触react16,目前使用的大多是生命周期的区别,16新增了几个生命周期。 static getDerivedStateFromProps:用于代替componentReceiveProps。是个静态方法。 父组件传入子组件的属性更新时,同步更新子组 阅读全文
posted @ 2020-09-13 17:19 herry菌 阅读(894) 评论(0) 推荐(0) 编辑
摘要: 子组件要调用父组件的方法: 父组件传入子组件要调的方法 <Child fun={this.fun.bind(this)}> 子组件可通过props直接调用 this.props.fun(xx) 父组件要调用子组件的方法: 父组件中给子组件设置onRef事件,并设置调用名=ref <Child onR 阅读全文
posted @ 2020-09-12 13:59 herry菌 阅读(218) 评论(0) 推荐(0) 编辑
摘要: 头部引入国际化组件和zh_CN import {ConfigProvider} from 'antd'; import zh_CN from 'antd/es/locale/zh_CN'; 在组件外层放上 <ConfigProvider locale={zh_CN}></ConfigProvider 阅读全文
posted @ 2020-08-10 18:40 herry菌 阅读(1471) 评论(0) 推荐(0) 编辑
摘要: 需要2层div,外层是下方半透明的,内层是不透明的进度 外层css background-image: linear-gradient(90deg, rgba(1, 255, 255, 0.25) 60%, transparent 0); background-size: 0.20833vw; 内层 阅读全文
posted @ 2020-07-17 11:12 herry菌 阅读(371) 评论(0) 推荐(0) 编辑
摘要: 在项目的根目录,右键选择 Git Bash 进入命令行; 在命令行输入: touch .gitignore 生成 .gitignore 文件; 在文件中输入过滤信息,过滤规则如下: node_modules/ 表示过滤这个文件夹 *.zip 过滤zip后缀文件 demo.html 过滤该文件 我的项 阅读全文
posted @ 2020-07-12 18:29 herry菌 阅读(394) 评论(0) 推荐(0) 编辑
摘要: 整改中:目前项目使用umi.js+插件的方式,还未上线:git:https://gitee.com/wuhairui1/wuhairui/tree/bilibili/ git地址:https://e.coding.net/a18969054220/herry/bilibili_Time_SC.git 阅读全文
posted @ 2020-07-12 16:59 herry菌 阅读(321) 评论(0) 推荐(0) 编辑
摘要: 随机生成多个名字,从echarts官方案例看到的,也是echarts图例过多的一种处理方式:https://echarts.apache.org/examples/zh/editor.html?c=pie-legend&edit=1&reset=1 function genData(count) { 阅读全文
posted @ 2020-07-03 11:47 herry菌 阅读(543) 评论(0) 推荐(0) 编辑
摘要: 创建一个从0开始的顺序数组 [...new Array(5).keys()] //[0,1,2,3,4] 数组反向 [0,1,2,3,4,5].reverse() //[4,3,2,1,0] 取选中月最后一天日期 getLastDay(year,month){ var new_year = year 阅读全文
posted @ 2020-07-03 10:21 herry菌 阅读(158) 评论(0) 推荐(0) 编辑
摘要: 首先安装increase-memory-limit cnpm install -g increase-memory-limit 重启cmd,并在项目跟目录中运行一下 increase-memory-limit 然后打开项目的package.json,修改scripts的内容 在build运行的命令后 阅读全文
posted @ 2020-06-29 18:52 herry菌 阅读(857) 评论(0) 推荐(0) 编辑
上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 29 下一页