setTimeout 报错 undefined, 求解答
onPageScroll(e) { if ( this .Sid){ clearTimeout( this .Sid); }; let st = flag => { this .setData({ isShowBackTop: flag }) } this .Sid = setTimeout(() => { let top = this .data.isShowBackTop; if (e && e.scrollTop > 400){ !top && st( true ); } else { top && st( false ); } },500); }, |
错误样例: undefined;at page/hotel/pages/inland/promotions/bargain/index onPageScroll function;at setTimeout callback function
纠结了很久 就是找不到错误原因那!!!! 求官方解答。