摘要: 在前端开发中,有时候我们需要确保即使发起了多次相同的请求,也只处理最后一次请求的响应。这种需求在搜索输入提示、自动完成或者连续的数据更新操作中比较常见。 为了实现这个功能,我们可以使用取消之前请求的策略,或者通过标记的方式来确保只处理最后一次请求的结果。以下是使用JavaScript实现这一功能的两 阅读全文
posted @ 2023-11-29 18:18 井凉一一 阅读(316) 评论(0) 推荐(0) 编辑
摘要: 在编程中,事件入栈(Event Pushing)和出栈(Event Popping)通常与事件循环(Event Loop)和消息队列(Message Queue)相关。这些概念在前端开发中尤其重要,特别是在处理异步事件和回调函数时。下面我将解释这些概念,并提供一些代码示例。 事件循环(Event L 阅读全文
posted @ 2023-11-29 17:34 井凉一一 阅读(12) 评论(0) 推荐(0) 编辑
摘要: { type: 'line', ..... endLabel: { show: true, offset: [-18, -10], color: '#ff0000', fontSize:14, formatter: (params) => { return '趋势线' } }, } 阅读全文
posted @ 2022-11-01 15:09 井凉一一 阅读(23) 评论(0) 推荐(0) 编辑
摘要: 如果,想要做y轴label hover后后面出现图表,文字高亮,主要使用的是yAxis.axisLabel.formatter, yAxis.axisLabel.formatter, 配合echarts实例的mouseover mouseout事件,通过设置hover类目的索引,来给对应类目设置激活 阅读全文
posted @ 2022-09-23 18:16 井凉一一 阅读(2061) 评论(0) 推荐(0) 编辑
摘要: 如图,想要做可以点击轴label,触发后续事件,上代码: const ref = useRef() const eChartInstance = useRef<any>() eChartInstance.current.on('click', function (params) { if (para 阅读全文
posted @ 2022-09-23 18:04 井凉一一 阅读(1804) 评论(0) 推荐(0) 编辑
摘要: 如↑图,想要滚动效果,主要使用的是dataZoom属性,上代码: dataZoom = [ { id: 'dataZoomY', yAxisIndex: [0], show: true, //是否显示滑动条,不影响使用 type: 'slider', // 这个 dataZoom 组件是 slide 阅读全文
posted @ 2022-09-23 17:57 井凉一一 阅读(2386) 评论(0) 推荐(0) 编辑
摘要: let dataZoom = [ { id: 'dataZoomY', yAxisIndex: [0], show: true, //是否显示滑动条,不影响使用 type: 'slider', // 这个 dataZoom 组件是 slider 型 dataZoom 组件 startValue: 0 阅读全文
posted @ 2022-09-22 20:11 井凉一一 阅读(1682) 评论(0) 推荐(0) 编辑
摘要: 有时候电脑修改密码后,再使用git进行fetch就是报认证失败,之前是在设置里搜凭证,把git的那个凭证密码改一下, 昨天更新windows系统了,那个设置就找不到了,现在用另一种方法: git config --system --unset credential.helper 然后git fetc 阅读全文
posted @ 2022-08-29 10:50 井凉一一 阅读(43) 评论(0) 推荐(0) 编辑
摘要: 1.在线预览pdf文档 https://mozilla.github.io/pdf.js/web/viewer.html?file=https://xxx.com/xxx.pdf http://view.xdocin.com/xdoc?_xdoc=https://xxx.com/xxx.pdf 把文 阅读全文
posted @ 2022-07-21 18:00 井凉一一 阅读(246) 评论(0) 推荐(0) 编辑
摘要: function warterDocumentSvg(content, container?: any, width?: number, height?: number, opacity?: string, strokeColor?: string, fontSize?: string, zInde 阅读全文
posted @ 2022-07-20 18:55 井凉一一 阅读(103) 评论(0) 推荐(0) 编辑