Get the App
SLTechnology News&Howtos  ›  Development  › 

How to realize the function of cropping pictures with cropperjs

Shulou Source: shulou.com Published: 2022-06-01 12:47:03 10月03日 Update

Most people do not understand the knowledge points of this article "cropperjs how to achieve the function of cropping pictures", so the editor summarizes the following contents, detailed contents, clear steps, and has a certain reference value. I hope you can get something after reading this article. Let's take a look at this "how to achieve cropping pictures in cropperjs" article.

Cropperjs (crop Picture)

Vue version

/ / download / / npm install cropperjs-save// uses / / 1.0 to introduce import Cropper from 'cropperjs'// 2.0 initialization cropping box data () {return {croppable: false / / Control upload explicit}}, methods: {var _ this= this; var image = document.getElementById (' image') This.cropper = new Cropper (image, {aspectRatio: 1, viewMode: 1, background:false, zoomable:false, ready: function () {_ this.croppable = true;}});}

Jq version

Select Picture

Select Picture

Tags: Picture content function size movement region image form article version knowledge article redirection selection between ninth house value address most object Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno NVidia Shulou Technology Microsoft OPPO Reno macOS