js回调函数 this.test((res)=>{ console.log(res);//接受的回调参数 }) test(callback){ if(true){ callback("Y"); }else{ callback("N") } }