Skip to content

H5图片裁剪,可处理拍照图片旋转的问题

Notifications You must be signed in to change notification settings

DWYW/mobile-clip

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

引入方式

npm install mobile_clip

import CLIP from 'mobile_clip'

new CLIP(options).show('image file')
options: 配置如下
    ratio: 1, // 截图的宽高比 Number
    expect: 'base64', // 期待返回的类型 ['blob', 'file', 'base64']
    orientation: 1, // 图片的orientation信息,可以通过exif.js获取,用于处理图片的旋转问题
    zIndex: 999, // 弹出层的层级问题
    clipColor: '#ffffff', 
    backgroundColor: 'rgba(0, 0, 0, 1)',
    btnTheme: '#1f1f1f',
    save: null, // 确定回调
    beforeDestroy: null, // 取消回调
    error: null // 错误回调

About

H5图片裁剪,可处理拍照图片旋转的问题

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published