会员
周边
新闻
博问
闪存
众包
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
lrtroot
博客园
首页
新随笔
联系
订阅
管理
2023年8月16日
离屏渲染
摘要: //首先声明Com用来获取组件信息 const { component: Com } = //routerConfig对应路由信息 routerConfig.find((item) => //matchPath方法首先通过path-to-regexp的方法来获取Route上定义的path对应的正则,
阅读全文
posted @ 2023-08-16 15:15 lrt-web
阅读(36)
评论(0)
推荐(0)
2023年2月14日
react 函数组件 防抖操作
摘要: 1 function deBounce(fn: { apply: (value: any, arg1: any) => void }, t?: number) { 2 let timeId: any = null; 3 const delay = t || 500; 4 return functio
阅读全文
posted @ 2023-02-14 14:50 lrt-web
阅读(39)
评论(0)
推荐(0)
2022年10月12日
copy
摘要: 1 export const copy = (text) => { 2 const textArea = document.createElement('textarea'); 3 4 textArea.style.position = 'fixed'; 5 textArea.style.top =
阅读全文
posted @ 2022-10-12 17:24 lrt-web
阅读(27)
评论(0)
推荐(0)
替换 url 参数
摘要: 4 export const replaceURLParam = (params: object = {}, location?: any, hasReset?: boolean, pathname?: string) => { 5 const loca = !isEmpty(location) ?
阅读全文
posted @ 2022-10-12 17:21 lrt-web
阅读(34)
评论(0)
推荐(0)
随机颜色
摘要: 1 /** 2 * 随机颜色 3 * @param: colorMap {颜色: true} 生成不在该数据内的color 4 */ 5 export const getRgbColorRandom = (colorMap = {}, transparency = 0.1) => { 6 const
阅读全文
posted @ 2022-10-12 17:13 lrt-web
阅读(268)
评论(0)
推荐(0)
文件下载 数据流方法
摘要: 1 /** 2 * get blob 下载文件方法 3 * @param {Number} time 4 * @return {String} 5 * @returns {Object} {time: Number, unit: any} 6 */ 7 export function getDown
阅读全文
posted @ 2022-10-12 17:13 lrt-web
阅读(38)
评论(0)
推荐(0)
公告