2021年7月15日
摘要: 安装 npm安装 npm install xlsx 例子 handleDownload = () => { let arr =[ ['主要信息', null, null, '其它信息'], ['姓名', '性别', '年龄', '注册时间'], ['张三', '男', 18, new Date()] 阅读全文
posted @ 2021-07-15 16:30 ai柠檬 阅读(181) 评论(0) 推荐(0)
  2021年3月3日
摘要: 将加号放在指定列 <Table dataSource={dataSource} columns={ahStockColumn} bordered size="small" pagination={false} expandIconAsCell={false} // 将树形展开 icon 与第一列数据 阅读全文
posted @ 2021-03-03 09:43 ai柠檬 阅读(3759) 评论(0) 推荐(0)
  2021年2月1日
摘要: 点击事件绑定 click事件 onChartClick=(param,echarts)=>{ console.log(param) } render(){ let onEvents={ 'click': this.onChartClick } return( <ReactEcharts option 阅读全文
posted @ 2021-02-01 14:06 ai柠檬 阅读(1209) 评论(0) 推荐(0)
  2021年1月22日
摘要: 防止冒泡和捕获 w3c的方法是e.stopPropagation(),IE则是使用e.cancelBubble = true 当需要停止冒泡行为时,可以使用 function stopBubble(e) { //如果提供了事件对象,则这是一个非IE浏览器 if ( e && e.stopPropag 阅读全文
posted @ 2021-01-22 10:45 ai柠檬 阅读(114) 评论(0) 推荐(0)
  2020年12月14日
摘要: 查看commit提交记录详情 具体步骤:1、首先,需要通过git log打印所有commit记录2、找到你想查看的那次commit的commitid。3、查看修改。git show commitId4、查看某次commit中具体某个文件的修改:git show commitId fileName场景 阅读全文
posted @ 2020-12-14 10:07 ai柠檬 阅读(63) 评论(0) 推荐(0)
  2020年11月5日
摘要: 因为项目中使用iframe嵌入页面,所以需要监听message事件,但是发现无法removeEventListener,写法如下: componentDidMount() { window.addEventListener("message", this.receiveMessage.bind(th 阅读全文
posted @ 2020-11-05 11:13 ai柠檬 阅读(1792) 评论(0) 推荐(0)
  2020年10月14日
摘要: value.toFixed(2).toString().indexOf('.') != -1 ? value.toFixed(2).toString().replace(/(\d)(?=(\d{3})+\.)/g, ($0, $1) => ($1 + ",")) : value.toFixed(2) 阅读全文
posted @ 2020-10-14 13:13 ai柠檬 阅读(381) 评论(0) 推荐(0)
  2020年9月17日
摘要: 因为项目需要,所以基于antd封装一个双击单元格可以编辑内容的表格,废话不多说,直接看代码: 首先,在项目中创建一个EditTable.tsx的文件;在文件中引入需要的模块; import React from 'react'; import { Table } from 'antd'; impor 阅读全文
posted @ 2020-09-17 14:54 ai柠檬 阅读(4137) 评论(3) 推荐(2)