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

浙公网安备 33010602011771号