接入语音
This commit is contained in:
@@ -43,3 +43,9 @@ export const addJs = url => {
|
||||
script.src = url
|
||||
document.body.appendChild(script)
|
||||
}
|
||||
|
||||
export const throttle = (fn, delay = 1000) => {
|
||||
if (typeof fn != "function") return;
|
||||
if (window.throttleTimer) clearTimeout(window.throttleTimer)
|
||||
window.throttleTimer = setTimeout(() => fn.call(), delay)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user