摘要: // 部分为网上借用,以方便本人复查使用。 // 数字格式化 如: 123,456.78 function formatter_k(num) { const str = num.toString(); // 转字符串 const val = str.replace(/\d+/, (n) => { r 阅读全文
posted @ 2023-09-10 17:49 半遮 阅读(1) 评论(0) 推荐(0) 编辑
摘要: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <script src="htt 阅读全文
posted @ 2023-09-10 17:44 半遮 阅读(61) 评论(0) 推荐(0) 编辑
摘要: const intersectionObserver = new IntersectionObserver((entries) => { // 如果 intersectionRatio 为 0,则目标在视野外, // 我们不需要做任何事情。 if (entries[0].intersectionRa 阅读全文
posted @ 2023-04-27 17:27 半遮 阅读(60) 评论(0) 推荐(0) 编辑
摘要: ![](https://img2023.cnblogs.com/blog/1087005/202304/1087005-20230424095359931-4837081.jpg) 阅读全文
posted @ 2023-04-24 09:55 半遮 阅读(11) 评论(0) 推荐(0) 编辑
摘要: // 数字格式化 如: 123,456.78 ; function formatter_k(num) { const str = num.toString(); // 转字符串 const val = str.replace(/\d+/, (n) => { return n.replace(/(\d 阅读全文
posted @ 2023-04-10 11:22 半遮 阅读(38) 评论(0) 推荐(0) 编辑
摘要: //使用递归的方式实现数组、对象的深拷贝 function deepClone1(obj) { //判断拷贝的要进行深拷贝的是数组还是对象,是数组的话进行数组拷贝,对象的话进行对象拷贝 var objClone = Array.isArray(obj) ? [] : {}; //进行深拷贝的不能为空 阅读全文
posted @ 2023-02-03 15:10 半遮 阅读(43) 评论(0) 推荐(0) 编辑
摘要: 第1种方式:复制文本的功能_原生js方法直接用 navigator.clipboard.writeText('123456') 第2种方式:使用插件 【 clipboard.js 】 <template> <div id="index-page"> <div class="text" @click= 阅读全文
posted @ 2023-02-03 15:08 半遮 阅读(97) 评论(0) 推荐(0) 编辑
摘要: { "en": { "a0": "Monthly Champions", "a1": "Wealth", "a2": "Charm", "a3": "Billionaire", "a4": "Room", "a5": "Hall of Fame", "a6": "Last Month", " 阅读全文
posted @ 2022-07-11 10:37 半遮 阅读(18) 评论(0) 推荐(0) 编辑
摘要: //https://docs.google.com/spreadsheets/d/1mvs4JNnz7p1sBNLh6KhyiLifUQczqjOKg1XxPRgadSs/edit?usp=sharing var common = { en: { //可复用文案 "common_0": "Fight 阅读全文
posted @ 2022-06-08 13:52 半遮 阅读(17) 评论(0) 推荐(0) 编辑
摘要: background: #847a50; background: linear-gradient(90deg, #94672a00 0%, #847a50 50%, #94672a00 100%); background: -moz-linear-gradient(left, #94672a00, 阅读全文
posted @ 2022-05-27 14:32 半遮 阅读(81) 评论(0) 推荐(0) 编辑