Elements-SY

Merge branch 'test' into fix-issues

...@@ -245,7 +245,7 @@ export function debounce(func, wait, immediate) { ...@@ -245,7 +245,7 @@ export function debounce(func, wait, immediate) {
245 return function (...args) { 245 return function (...args) {
246 context = this; 246 context = this;
247 timestamp = +new Date(); 247 timestamp = +new Date();
248 - data = args; 248 + data = args; // 把实参作为防抖回调函数的返回值
249 const callNow = immediate && !timeout; 249 const callNow = immediate && !timeout;
250 // 如果延时不存在,重新设定延时 250 // 如果延时不存在,重新设定延时
251 if (!timeout) timeout = setTimeout(later, wait); 251 if (!timeout) timeout = setTimeout(later, wait);
......