02 2022 档案

摘要:防抖v-throttle自定义指令实现 // 1.设置v-throttle自定义指令 Vue.directive('throttle', { bind: (el, binding) => { let throttleTime = binding.value; // 防抖时间 if (!throttl 阅读全文
posted @ 2022-02-25 10:47 吃饭七分饱 阅读(378) 评论(0) 推荐(0)
摘要:关于计算首屏时间 利用performance.timing提供的数据: 通过DOMContentLoad或者performance来计算出首屏时间 // 方案一: document.addEventListener('DOMContentLoaded', (event) => { console.l 阅读全文
posted @ 2022-02-20 20:53 吃饭七分饱 阅读(2104) 评论(0) 推荐(0)
摘要:一级路由配置方法 二级路由配置方法 location /h5 { if ($request_filename ~* .*\.(?:htm|html)$) { add_header Cache-Control "private, no-store, no-cache, must-revalidate, 阅读全文
posted @ 2022-02-14 14:19 吃饭七分饱 阅读(154) 评论(0) 推荐(0)
摘要:将img标签改为div 通过背景图片设置即可 阅读全文
posted @ 2022-02-13 16:07 吃饭七分饱 阅读(932) 评论(0) 推荐(0)