// 防抖函数实现
export function YtDebounce(del: () => void, delay: number) {
  let timer: number | null = null;
  return () => {
    if (timer) {
      clearTimeout(timer);
    }
    timer = setTimeout(del, delay);
  };
}