摘要:
排查流程图 flowchart TB A --> B --> C --> D --> E subgraph A[认识问题] A1[收集信息] A2[确认问题] A3[复现问题] A4[影响范围] A1 --> A2 --> A3 --> A4 end subgraph B[诊断/确认问题] B1[检 阅读全文
摘要:
方法封装: /** * 获取cookie */ export function getCookie(sKey: string): string { if (!sKey) { return null; } return decodeURIComponent(document.cookie.replac 阅读全文
摘要:
定义: import { useCallback, useEffect, useRef } from 'react'; export interface DebounceRefType { fn: Function; timer?: NodeJS.Timeout; } export type Deb 阅读全文
摘要:
最近需求,要在b端展示上传的pdf文件。实现方式有很多,记录一下我们最常用的pdf.js //安装 "pdfjs-dist": "2.0.402" //引入 import * as pdfjs from 'pdfjs-dist' import * as pdfjsWorker from 'pdfjs 阅读全文
摘要:
用途我们日常开发中,手机抓包或需要将本地编译后的文件代理到线上,预发环境看效果。这时就需要一些抓包代理软件,给大家推荐charles。 下载 官网:https://www.charlesproxy.com/download/ 开始 未破解,可试用30min,然后需要重新。 手机代理配置:1.证书下载 阅读全文
摘要:
CSS属性“overscroll-behavior: contain”指定浏览器应将元素的滚动范围限制在其边界内,防止父级或祖先元素发生滚动。如果用户尝试在元素范围之外滚动,则滚动将停止在元素的边缘处 使用: 在弹窗的最外层元素中,css里加入 overscroll-behavior: contai 阅读全文
摘要:
方法: const imgSrcQueue: Array<HTMLImageElement> = []; export function preloadImageList(names) { return new Promise((resolve) => { let n = 0, img, imgs 阅读全文
摘要:
封装一个可以使用onAppear的<VIew/>组件: import React, { PureComponent } from 'react'; class View extends PureComponent { constructor(props) { super(props); this.t 阅读全文
摘要:
适用范围:支付宝,淘宝小程序 效果: 组件目录结构: 详情: index.axml <!-- [{"value":["3","5"],"style":"","isTime":true},{"value":"秒","style":""}] --> <view class="countdown-main 阅读全文
摘要:
获取一个特定时间的时间戳,我们的选择有很多,dayjs,moment等,但常规的,我们一般用 new Date()来获取; 比如: 但在ios环境下,以上运行获取的为:NaN; 只有将‘-’改为‘/’才能正确获取其对应时间戳。 如 new Date('2023/03/10 23:59:59').ge 阅读全文