git地址:https://github.com/fengyuanchen/cropper
官方演示地址:https://fengyuanchen.github.io/cropper/
1、下载:npm install cropperjs
2、main.js中引入:import Cropper from 'cropperjs'
3、初始化:
<img src="https://fengyuanchen.github.io/cropper/images/picture.jpg" alt="" id="image">
//初始化这个裁剪框
methods:{
init(){
let image = document.getElementById('image')