feat: add catalog demo

This commit is contained in:
Hufe921
2023-05-11 19:32:05 +08:00
parent 402e448559
commit 9343afe831
7 changed files with 175 additions and 7 deletions
+12
View File
@@ -0,0 +1,12 @@
export function debounce(func: Function, delay: number) {
let timer: number
return function (...args: any) {
if (timer) {
window.clearTimeout(timer)
}
timer = window.setTimeout(() => {
// @ts-ignore
func.apply(this, args)
}, delay)
}
}