摘要: 一、校验数字的表达式 1. 数字:^[0-9]*$ 2. n位的数字:^\d{n}$ 3. 至少n位的数字:^\d{n,}$ 4. m-n位的数字:^\d{m,n}$ 5. 零和非零开头的数字:^(0|[1-9][0-9]*)$ 6. 非零开头的最多带两位小数的数字:^([1-9][0-9]*)+( 阅读全文
posted @ 2021-12-09 19:56 lipu1993 阅读(27) 评论(0) 推荐(0) 编辑
摘要: 1、拖入文件在控制台输入: git init 2、输入user name如:git config --global user.name 'xxx' 3、输入user email如:git config --global user.email "xxxxxxxx@xxx.com" 4、输入:git a 阅读全文
posted @ 2021-12-08 22:57 lipu1993 阅读(19) 评论(0) 推荐(0) 编辑
摘要: 1、原型链继承 js的主要继承方式就是通过原型链继承,基本思想就是通过原型继承多个引用的属性和方法(js之所以有原型链这东西估计也就是为了继承而设计的) 所有的构造函数都有一个原型(构造函数通过prototype指向原型,原型又通过constructor指回构造函数) 由构造函数new出来的实例也有 阅读全文
posted @ 2021-07-06 22:46 lipu1993 阅读(115) 评论(0) 推荐(0) 编辑
摘要: 选择将XXXXX重置到这次提交就好 阅读全文
posted @ 2021-07-05 10:53 lipu1993 阅读(20) 评论(0) 推荐(0) 编辑
摘要: { title: formatMessage({ id: 'OPERATE', defaultMessage: '操作' }), dataIndex: 'id', key: 'id', ellipsis: true, render: v => { const obj = { children: <d 阅读全文
posted @ 2021-06-04 10:19 lipu1993 阅读(1049) 评论(0) 推荐(0) 编辑
摘要: // 将数组转成树 export function array2Tree(array, Id, parentId, children) { const data = [...array]; const result = []; const hash = {}; data.forEach(item = 阅读全文
posted @ 2021-05-30 14:21 lipu1993 阅读(36) 评论(0) 推荐(0) 编辑
摘要: <InfiniteScroll initialLoad={false} pageStart={0} threshold={10000} loadMore={() => { this.qryMeteDataTableList(treeNodeInfo, '', false); }} hasMore={ 阅读全文
posted @ 2021-02-02 14:17 lipu1993 阅读(59) 评论(0) 推荐(0) 编辑
摘要: // 去除重复的内容 export function getArrDifference(arr1, arr2, key) { arr1.map(o => { let isTrue = true; let val = {}; arr2.map(v => { if (o[`${key}`] v[`${k 阅读全文
posted @ 2021-01-30 10:31 lipu1993 阅读(90) 评论(0) 推荐(0) 编辑
摘要: // 同环比获取上一阶段日期处理 export const getNextDate = (date: any, type?: any) => { if (!date) return; if (date.length 8) { let newDate = date.slice(0,4)+'-'+dat 阅读全文
posted @ 2021-01-08 14:15 lipu1993 阅读(111) 评论(0) 推荐(0) 编辑
摘要: // 根据对象的value值获取key export const getFindKey = (value: any, obj: any, me: any) => { let objlist = JSON.parse(JSON.stringify(obj)) ; delete objlist.me; 阅读全文
posted @ 2021-01-08 14:06 lipu1993 阅读(5627) 评论(0) 推荐(0) 编辑