摘要: 树节点跳转 public toTreeNode(position: string, level: number): void { const e = document.querySelectorAll('.container-compare-tree');// 获取dom const left = 阅读全文
posted @ 2022-04-12 16:57 宇智波copy 阅读(18) 评论(0) 推荐(0) 编辑
摘要: 表同步滚动 public listenerScroll(): void { if (this.isListened) { return; } const e = document.querySelectorAll('.ant-table-body'); const left = e[0];// 左侧 阅读全文
posted @ 2022-04-12 16:56 宇智波copy 阅读(32) 评论(0) 推荐(0) 编辑
摘要: base64转blob // 'data:application/apollo-zstd;version=1.1.1;base64,' 注意一下,后端返回的base64 export function base64ToBlob(base64: string): Blob { if (!base64) 阅读全文
posted @ 2022-04-12 16:55 宇智波copy 阅读(52) 评论(0) 推荐(0) 编辑
摘要: 计算字符串长度 let str = "我的aaaa1"; str.replace(/[\u0391-\uFFE5]/g,"aa").length; 截取字符串 \S:匹配任何非空白字符。 *:匹配前面的子表达式零次或多次。 match方法: const str='/leader-view/hospi 阅读全文
posted @ 2022-04-12 16:52 宇智波copy 阅读(15) 评论(0) 推荐(0) 编辑
摘要: 获取24小时时间 let time=new Date().toLocaleString('chinese',{hour12:false}); 获取当天时间 var now = new Date(); var year = now.getFullYear(); //得到年份 var month = n 阅读全文
posted @ 2022-04-12 16:51 宇智波copy 阅读(27) 评论(0) 推荐(0) 编辑