摘要: for (let idx = 40; idx >0; idx--) { if (idx % 12 0) { // break; // 终止 // return; // 终止 continue; // 跳过 } console.log(idx); } 阅读全文
posted @ 2023-07-17 13:26 冰凝^ 阅读(25) 评论(0) 推荐(0) 编辑
摘要: html: <ng-template #popTpl> <div> <p>title</p> <p>content</p> </div> </ng-template> ts: @ViewChild("popTpl") popTpl; constructor(private viewRef: View 阅读全文
posted @ 2023-07-13 13:45 冰凝^ 阅读(28) 评论(0) 推荐(0) 编辑
摘要: // 双击全屏 全屏状态双击取消 window.addEventListener('dblclick', () => { if (document.fullscreenElement) { document.exitFullscreen(); } else { documnet.querySelec 阅读全文
posted @ 2023-05-06 16:55 冰凝^ 阅读(9) 评论(0) 推荐(0) 编辑
摘要: web 浏览器页面实现滚屏效果 window 对象提供了执行动画的方法 window.requestAnimationFrame() 场景:固定位置显示多项内容列表 需要自动滚屏展示 demo: /** * 设置文本滚屏效果 */ setTextScroll(): void { const ulBo 阅读全文
posted @ 2023-04-10 15:42 冰凝^ 阅读(20) 评论(0) 推荐(0) 编辑
摘要: // new Date(2023, 5, 0).getDate();// 31const date = new Date();const length = new Date(date.getFullYear(), date.getMonth(), 0).getDate(); 阅读全文
posted @ 2023-04-06 16:48 冰凝^ 阅读(555) 评论(0) 推荐(0) 编辑
摘要: chrome浏览器网页保存的账号突然没了,如何找回? 实现方法: 1、打开网址:chrome://flags/#password-import-export 2、将 Password import 设置为 Enable 阅读全文
posted @ 2023-03-22 09:59 冰凝^ 阅读(2466) 评论(0) 推荐(0) 编辑
摘要: 检查对象 Object 中是否含有某属性,可以用 in 验证,例如 const obj = { name: 'a', age: 3 }console.log('name' in obj); // trueconsole.log('sex' in obj); // false 阅读全文
posted @ 2023-03-21 17:06 冰凝^ 阅读(20) 评论(0) 推荐(0) 编辑
摘要: function(str: string): string { return str.slice(0,1).toUpperCase() + str.slice(1); } 阅读全文
posted @ 2023-03-20 17:06 冰凝^ 阅读(12) 评论(0) 推荐(0) 编辑
摘要: mac安装指定版本遇到的问题总结 起因:mac安装最新版node,运行旧版本的项目时报错,需要将版本退回到低版本。 过程: 安装node最新版本地址:https://nodejs.org/en/ 卸载node: 首先在应用程序中把node‘移动到废纸篓’, 然后担心卸载不彻底,网上查找卸载教程:ht 阅读全文
posted @ 2023-03-02 13:43 冰凝^ 阅读(2782) 评论(0) 推荐(0) 编辑
摘要: ⭐️:mac 现实隐藏文件: 在访达(目录)中使用快捷键(command + shift + 。)现实隐藏文件,重新使用快捷键可以隐藏隐藏文件。 阅读全文
posted @ 2023-03-02 10:13 冰凝^ 阅读(13) 评论(0) 推荐(0) 编辑