1.0.2 • Published 4 years ago

skcropper v1.0.2

Weekly downloads
-
License
ISC
Repository
-
Last release
4 years ago

欢迎使用 imgCropper


整合图片裁剪,可手动裁剪也可根据坐标点位裁剪图片指定区域

##使用方法 1 下载安装包 npm install --save skcropper yarn add --save skcropper

2 安装依赖 npm | yarn

案例

    <ImgCropper
    onSlice={handleSlice}
    cropperStyle={{width: 472,height:285}}
    src="https://i.loli.net/2020/07/27/3K6Vz41axEuAWRC.png",
    detectList = [{
        objBottom: "154"
        objLeft: "358"
        objRight: "459"
        objTop: "21"
    }]

  />

cmd-markdown-logo


7.参事说明

参数类型说明必填
onSlicefunc裁剪后的 url(base64)
widthnumber容器宽度
widthnumber容器宽度
imgWnumber图片宽度
imgHnumber图片宽度
borderWnumber边线宽度
selectIndnumber默认框选
isHandbool切换(点击坐标或手动裁剪)
selectColorstring选中颜色
defaultColorstring默认颜色
detectListarray{objTop, objBottom, objLeft, objRight}坐标字段必有
1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago