Skip to content

tuxingsheng/cropbox

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

cropbox

配置参数说明

    this.defaults = {
        // crop选择器
        el: '#crop',
        // 触发器
        cp: '#cropImg',
        // crop背景色
        cropBgColor: 'rgba(0, 0, 0, .4)',
        // crop img地址
        imgSrc: '',
        // 不用修改
        imageBox: '.crop-wrap-content',
        thumbBox: '.crop-wrap-thum',
        spinner: '.crop-wrap-spinner',
        // 返回裁剪之后图片的base64和blob二进制
        callback: function (dataURL, dataBlob) {
            console.log(dataURL, dataBlob);
        }
    };

About

原生Js的图片裁剪

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published