typescript
小小米粒吖
这个作者很懒,什么都没留下…
展开
-
Vue3.0 + TS 防抖
防抖方法: const debounceEvent = ((func, wait = 2000) => { let timer; return function (...args) { if (timer) clearTimeout(timer); let callNow = !timer; timer = setTimeout(() => { timer = null; }, wait) if (callNow) func.app原创 2021-12-28 15:37:12 · 1219 阅读 · 0 评论 -
Object is possibly ‘null‘ 请问怎么解决?
1.把null的情况写入 let Param:string | null= prc.name 2.写成any类型 (window as any).localStorage.getItem('name')原创 2021-04-24 14:45:21 · 2676 阅读 · 0 评论