React图像裁剪

时间:2021-06-08 15:25:25
【文件属性】:
文件名称:React图像裁剪
文件大小:283KB
文件格式:ZIP
更新时间:2021-06-08 15:25:25
Image manipulation 合作者希望我几乎没有时间改进这个项目,需要合作者进行项目维护。 React Image Cropper A React.JS Image Cropper Touch 支持 看演示 自定义:初始裁剪框位置帧宽度、高度、比例裁剪事件 热使用 import {Cropper} from 'react-image-cropper' 样式都是内联定义裁剪器的src 和 ref 执行裁剪方法 { this.cropper = ref }} /> 裁剪并获取图像 url image.src = this.cropper.crop() 获取裁剪值:const values = this.cropper.values() values: { // 显示值 display: { width, // 框宽 height, // 框高 x, // 原 x 位置 y, // 原 y 位置 imgWidth, // img 宽度 imgHeight, // img 高度 }, // 原值 original: { width, / / frame width height, // frame height x, /
【文件预览】:
react-image-cropper-master
----.babelrc(36B)
----index.js(100B)
----package.json(2KB)
----component()
--------Cropper.js(27KB)
----server.js(773B)
----index.html(389B)
----LICENSE(1KB)
----package-lock.json(303KB)
----dist()
--------image()
--------app.js(196KB)
----.eslintrc.js(162B)
----.gitignore(47B)
----webpack.config.js(3KB)
----lib()
--------Cropper.js(31KB)
----demo()
--------demo.js(6KB)
--------demo.less(87B)
----README.md(2KB)
----.jshintrc(579B)

网友评论