EdisonFan

Results 2 comments of EdisonFan

为什么函数里还要套上一层函数? function wrapWithUsername(wrappedFunc) { let newFunc = () => { let username = localStorage.getItem('username'); wrappedFunc(username); }; return newFunc; } 这样写不行吗? function wrapWithUsername(wrappedFunc) { let username = localStorage.getItem('username'); wrappedFunc(username); }