摘要: //首先声明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)
摘要: 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)
摘要: 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)
摘要: 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)