How to set the width and height of the crop region and the width and height of the picture by cropper.js

what I use now is the cropper.js image clipping plug-in, which is used on the mobile end. I want to set the width of the picture is the width of the screen, and the frame and area of height auto, clipping is also the width of the screen, which is a square. How to set it? I use setCropBoxData and setCanvasData to have no effect. I feel that there is something wrong with my writing, but I don"t know what the problem is. Do you know? wait online

.

this is the code for the instantiation part


cropper.setCropBoxData({
    width: 200,
    height: 200,
    top: 0,
    left: 10
})
Menu