06 2021 档案

摘要:background: linear-gradient(180deg, #ff5289 0%, #f7f7f8 100%), #f7f7f8; background-repeat: no-repeat; background-size: 100% 1.8rem; 高度为1.8rem的linear-g 阅读全文
posted @ 2021-06-30 17:46 瑞瑞大人 阅读(543) 评论(0) 推荐(0)
摘要:在后退的界面上添加 判断是否是返回window.addEventListener('pageshow', function (e) { if(e.persisted || (window.performance && window.performance.navigation.type == 2)) 阅读全文
posted @ 2021-06-30 11:19 瑞瑞大人 阅读(349) 评论(0) 推荐(0)
摘要:generator和函数不同的是,generator由function*定义(注意多出的*号)除了return语句,还可以用yield返回多次 function* test() { let x = 1 yield x + 1; yield x + 2; return x + 3; } const g 阅读全文
posted @ 2021-06-29 17:44 瑞瑞大人 阅读(270) 评论(0) 推荐(0)
摘要:监听页面返回 popstate 当活动历史记录条目更改时,将触发popstate事件。如果被激活的历史记录条目是通过对history.pushState()的调用创建的,或者受到对history.replaceState()的调用的影响,popstate事件的state属性包含历史条目的状态对象的副 阅读全文
posted @ 2021-06-28 10:39 瑞瑞大人 阅读(568) 评论(0) 推荐(0)
摘要:interface File { type: 'js'|'css'; url: string; } type libKey = 'mtstatSdk'|'elementUI'|'weChatJSSDK'; const libMap: Record<libKey, { files: File[]; l 阅读全文
posted @ 2021-06-25 10:55 瑞瑞大人 阅读(122) 评论(0) 推荐(0)
摘要:export function getItemKeyList(): Array<string> { const keyList = []; for (let i = 0; i < localStorage.length; i += 1) { const key = localStorage.key( 阅读全文
posted @ 2021-06-25 10:52 瑞瑞大人 阅读(139) 评论(0) 推荐(0)
摘要:一行 overflow: hidden; white-space: nowrap; text-overflow: ellipsis; 多行 display: -webkit-box; overflow: hidden; text-overflow: ellipsis; word-break: bre 阅读全文
posted @ 2021-06-21 14:05 瑞瑞大人 阅读(110) 评论(0) 推荐(0)