2 Commits

Author SHA1 Message Date
赤诚的心
0d720c0682 Pre Merge pull request !158 from 赤诚的心/N/A 2025-03-06 03:09:58 +00:00
赤诚的心
e8019dae1f update ruoyi-ui/src/utils/index.js.
修复前端防抖函数在返回的函数中传参无法传到延时执行函数的问题
2022-02-25 08:11:07 +00:00

View File

@@ -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)