摘要: react 项目中 引入 和离开页面注销 echarts import * as echarts from 'echarts'; let equipEchart: any = null; let BarEchartsTimer: any = null; // 定时器 useEffect(() => 阅读全文
posted @ 2022-08-10 16:45 cielw 阅读(1367) 评论(0) 推荐(0)
摘要: 最近做了一个日历列表, 如上图所示 下面是两种实现方法 import moment from 'moment'; const getData = (optDate, arr) => { let _list = []; let currentWeekday = moment(optDate).date 阅读全文
posted @ 2022-06-22 11:43 cielw 阅读(1126) 评论(1) 推荐(0)
摘要: react 项目中用antd 的table 实现 上拉加载的效果 给 table 一个最大高度 scroll={{ y: 560 }} 调用接口中 判断, 如果是第一页 =>直接赋值, 不是=> 拼接数组 获取 table 的body 添加滚动事件 document.getElementsByCla 阅读全文
posted @ 2022-02-22 18:59 cielw 阅读(551) 评论(0) 推荐(0)
摘要: vue 项目中 文件对比 刚开始是用的 vue-code-diff 安装 npm install vue-code-diff 使用 <code-diff v-if="oldValue&&newValue" :old-string="oldValue" :new-string="newValue" : 阅读全文
posted @ 2022-02-09 18:10 cielw 阅读(1694) 评论(0) 推荐(0)
摘要: 修改过的打印方法 1 // 打印类属性、方法定义 2 /* eslint-disable */ 3 const Print = function (dom, options) { 4 if (!(this instanceof Print)) return new Print(dom, option 阅读全文
posted @ 2022-02-09 17:16 cielw 阅读(560) 评论(0) 推荐(0)
摘要: 浏览器事件封装 //全屏 // 打开浏览器全屏模式 /** * screenChange <Function> 为窗口变化的 的回调函数 参数为当前是否为全屏状态 */ const init = ()=>{ // 取值17是为了处理页面内容出现滚动条的情况 let isFull = window.s 阅读全文
posted @ 2021-12-17 14:34 cielw 阅读(238) 评论(0) 推荐(0)
摘要: 主要是 伪类和伪元素 起作用 :empty::after :empty 选择器匹配没有子元素(包括文本节点)的每个元素。 先选中 没有子元素的 格子添加 一个伪元素 ::after内容为 content: '--'; vue项目中 在写在了 app.vue 文件中 /* 给所有表格空项加上-- */ 阅读全文
posted @ 2021-10-29 18:39 cielw 阅读(2811) 评论(0) 推荐(0)
摘要: 导出下载接口传参 是 需要qs 序列化的 qs是一个npm仓库所管理的包,可通过npm install qs命令进行安装. 1. qs.parse()将URL解析成对象的形式 2. qs.stringify()将对象 序列化成URL的形式,以&进行拼接 qs.parse qs.stringify是用 阅读全文
posted @ 2021-10-28 15:18 cielw 阅读(126) 评论(0) 推荐(0)
摘要: import { TimePicker } from 'antd'; 引入 import moment from 'moment'; moment().hours() 获取当前小时 moment('2021-08-05 11:07:05').hours() // 11 携带年月日 time[0].f 阅读全文
posted @ 2021-10-20 17:45 cielw 阅读(2488) 评论(0) 推荐(0)
摘要: 近期一直在使用 echarts , 对里面的常用配置做一个记录 通常的 react 项目中引用 import echarts from 'echarts'; var myChart = null; myChart = echarts.init(document.getElementById('id' 阅读全文
posted @ 2021-09-28 15:29 cielw 阅读(4143) 评论(0) 推荐(1)