摘要: 一个组件需要请求远程得参数,暴露出对应得promise函数 ```ts export type ProductList = { total: number; list:Array } export type RequestData = { pageInfo:{currentPage:number,p 阅读全文
posted @ 2023-05-22 11:31 zeal666 阅读(9) 评论(0) 推荐(0) 编辑
摘要: 通过canvas生成一个base64的字符串对于设备、操作系统、浏览器生成的 function uuid() { const canvas = document.createElement('canvas'); const ctx = canvas.getContext('2d'); const t 阅读全文
posted @ 2023-04-26 22:49 zeal666 阅读(20) 评论(0) 推荐(0) 编辑
摘要: a-ffix是一个固钉 阅读全文
posted @ 2023-04-23 20:43 zeal666 阅读(7) 评论(0) 推荐(0) 编辑
摘要: https://github.com/f/awesome-chatgpt-prompts javascript学习 Let’s roleplay. You are an online JavaScript course. Your task is to quickly assess the stud 阅读全文
posted @ 2023-03-28 10:23 zeal666 阅读(157) 评论(0) 推荐(0) 编辑
摘要: ###工厂模式 function createPerson(name, age, job) { let o = new Object(); o.name = name; o.age = age; o.job = job; o.sayName = function() { console.log(th 阅读全文
posted @ 2023-03-09 19:37 zeal666 阅读(16) 评论(0) 推荐(0) 编辑
摘要: /** * 每个csv文件转成一个person对象,然后根据父子关系构建树 */ const transferTree = () => { interface Person { name: string age: number parent: string | null children?: Per 阅读全文
posted @ 2023-03-09 13:45 zeal666 阅读(79) 评论(0) 推荐(0) 编辑
摘要: You can use the following code to detect the different browsers: // Check for Chrome var isChrome = /Chrome/.test(navigator.userAgent) && /Google Inc/ 阅读全文
posted @ 2023-03-01 15:16 zeal666 阅读(21) 评论(0) 推荐(0) 编辑
摘要: eruda是一个移动端调试得工具 const script = document.createElement('script') script.type = 'text/javascript' script.src = '//unpkg.zhimg.com/eruda' script.onload 阅读全文
posted @ 2023-02-28 16:56 zeal666 阅读(69) 评论(0) 推荐(0) 编辑
摘要: const equals = (a,b) =>{ if(a b) return true; if(a instanceof Date && b instanceof Date){ return a.getTime() b.getTime() } if(!a || !b || (typeof a != 阅读全文
posted @ 2023-02-21 17:13 zeal666 阅读(156) 评论(0) 推荐(0) 编辑
摘要: convertCurrency(money) { //汉字的数字 const cnNums = ['零', '壹', '贰', '叁', '肆', '伍', '陆', '柒', '捌', '玖']; //基本单位 const cnIntRadice = ['', '拾', '佰', '仟']; // 阅读全文
posted @ 2023-02-21 13:43 zeal666 阅读(41) 评论(0) 推荐(0) 编辑
点击右上角即可分享
微信分享提示