09 2022 档案

摘要:data () { return { // 用于保存防抖的定时器 timeout: null, } } methods: { // 防抖函数 debounce (fn, delay) { if (this.timeout) { clearTimeout(this.timeout) } this.ti 阅读全文
posted @ 2022-09-30 12:25 Ocean- 阅读(269) 评论(0) 推荐(0) 编辑
摘要:window上有两个方法window.onfocus 当进入当前页面时会执行的事件监听window.onblur 当离开当前页面时会执行的事件监听 window.onfocus = function () { document.title = '页面正常了...'; }; window.onblur 阅读全文
posted @ 2022-09-05 15:01 Ocean- 阅读(129) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示