标签:VID let bsp 链接 strong eth deb style settime
mounted() {
const refresh = this.debounce(this.$refs.scroll.refresh, 500);
this.$bus.$on("imgLoad", () => {
refresh();
});
},
methods: {
/**
* 防抖函数
*/
debounce(fun, delay) {
let timer = null;
return function(...args) {
if (timer) clearTimeout(timer);
timer = setTimeout(() => {
fun.apply(this, args);
}, delay);
};
},
}
B站视频链接:https://www.bilibili.com/video/BV15741177Eh?p=174
标签:VID let bsp 链接 strong eth deb style settime
原文地址:https://www.cnblogs.com/wayhome123/p/13382967.html