update ruoyi-ui/src/utils/index.js.

修复前端防抖函数在返回的函数中传参无法传到延时执行函数的问题
pull/158/head
赤诚的心 4 years ago committed by Gitee
parent 04706403d3
commit e8019dae1f
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

@ -235,9 +235,10 @@ export function debounce(func, wait, immediate) {
}
}
return function(...args) {
return function(...args1) {
context = this
timestamp = +new Date()
args = args1
const callNow = immediate && !timeout
// 如果延时不存在,重新设定延时
if (!timeout) timeout = setTimeout(later, wait)

Loading…
Cancel
Save