文中的:
1 2 3 | public void selectWithCrop(int aspectX, int aspectY, Promise promise ) { getCrop().selectWithCrop( aspectX, aspectY, promise ); } |
其中的promise是一个入参,但是我看你在JS调用的时候并没有使用它,它的返回值也并非promise,如何可以这样使用:
1 2 3 4 5 | ImageCrop.selectWithCrop(parseInt(x), parseInt(y)).then((result: any) => { setRestult(result[ 'imageUrl' ] ? result[ 'imageUrl' ] : result) }). catch ((e: any) => { setRestult(e); }); |