👋🏼 Hi I'm JuLiZhanZhan
✨ A front-end beginner who keeps learning ✨
h5的万能裁剪框,基于vue,样式类似微信,超好用!走过路过,请留下你们的小星星
License: MIT License
this.$refs.cropper.loadFile 提示is not a function
在ios上直接拍照的图片旋转了90度
@getbase64Data="getbase64Data" 安卓机子上传图片后 会黑屏10秒后 才出现图片 和裁剪框 和图片
SPA大行其道,现在应该很少有人用CDN方式使用组件了,但是作为一个前后端都要干的技术员,还是觉得jQuery那套引入就用真香,这个组件我试了一下非常棒,也支持cdn方式使用,直接使用dist/index.js即可,但是有个问题,部分情况会导致内置事件无响应,未经过其他场景验证,临时解决方案如下:
1、打开dist/index.js搜索关键词“getbase64Data”、“getblobData”并替换成小写,我直接替换成了base64和blob这样就可以响应事件了。
2、如遇到组件无法原样输出未渲染的情况,可以将标签改为小写-的形式
<h5-cropper :option="option" @base64="getbase64Data" @blob="getblobData"></h5-cropper>
引用:
组件源码:
源码中定义了两个获取裁剪后File对象的方法:“getFile”和“get-file”,由于vue模板语法自动转换,“@getfile”和“@get-file”写法不敏感,会重复触发
最近上线的情况部分用户反馈选图后一直是黑框,但是手头没有测试机,暂时不清楚什么原因
问题已放gitee上了
页面有canvas 加载图片就很慢 一直黑屏 要吧canvas删掉才快 这个怎么解决
建议在emit个取消按钮的事件
在使用getFile获取截图后的图片时,生成的文件名是随机的吗?格式目前是固定成png,可以实现跟传入图片的格式同步吗
iphone11自带浏览器 裁图界面的操作按钮显示不出来
cnpm install 不下来怎么办,一直重试
⠦ [0/1] Installing vue-cropper@git+https://github.com/2277419213/vue-cropper.git#master[npminstall:get] retry GET https://github.com/2277419213/vue-cropper/tarball/master after 400ms, retry left 1, error: ResponseError: write EPROTO 4371340736:error:1409442E:SSL routines:ssl3_read_bytes:tlsv1 alert protocol version:../deps/openssl/openssl/ssl/record/rec_layer_s3.c:1407:SSL alert number 70
, GET https://github.com/2277419213/vue-cropper/tarball/master -1 (connected: true, keepalive socket: false, agent status: {"createSocketCount":6,"createSocketErrorCount":0,"closeSocketCount":5,"errorSocketCount":0,"timeoutSocketCount":2,"requestCount":4,"freeSockets":{},"sockets":{"github.com:443::::::::false:::::::134217728:":1},"requests":{}}, socketHandledRequests: 1, socketHandledResponses: 0)
headers: {}, status: -1, headers: {},
stack: Error: write EPROTO 4371340736:error:1409442E:SSL routines:ssl3_read_bytes:tlsv1 alert protocol version:../deps/openssl/openssl/ssl/record/rec_layer_s3.c:1407:SSL alert number 70
at WriteWrap.afterWrite [as oncomplete] (net.js:782:14)
⠇ [0/1] Installing vue-cropper@git+https://github.com/2277419213/vue-cropper.git#masterdownload tarball failed: write EPROTO 4371340736:error:1409442E:SSL routines:ssl3_read_bytes:tlsv1 alert protocol version:../deps/openssl/openssl/ssl/record/rec_layer_s3.c:1407:SSL alert number 70
, GET https://github.com/2277419213/vue-cropper/tarball/master -1 (connected: true, keepalive socket: false, agent status: {"createSocketCount":7,"createSocketErrorCount":0,"closeSocketCount":6,"errorSocketCount":0,"timeoutSocketCount":2,"requestCount":4,"freeSockets":{},"sockets":{"github.com:443::::::::false:::::::134217728:":1},"requests":{}}, socketHandledRequests: 1, socketHandledResponses: 0)
headers: {}, try to clone repository now.
git clone https://github.com/2277419213/vue-cropper.git /Users/lidope/Desktop/其他/node_modules/.tmp/d7140f74-d321-42e7-a898-796eff52260c
接口 那栏目的咋么使用啊
感谢大佬的插件,我开发的时候遇到一个问题,本意是使用vue-copper-h5封装一个可以裁剪上传的组件,在一个页面中,我使用了两次这个组件,但是发现第二个组件文件上传之后会将结果渲染到第一个组件中,一番排查之后发现一个奇怪的问题,我在第二个组件操作的时候,发现在getFile方法中this中的信息竟然指向了第一个组件中的信息;百思不得其解,求大佬指点迷津;
子组件:
`
<h5-cropper
:key="emitKey"
ref="copper"
class="hidden-copper"
:hide-input="false"
:option="copperOption"
@getFile="getFile"
>
</h5-cropper>
父组件使用:
.wrapper{
height: calc(100vh - 21.333vw -50px);
}
这个好像没有处理浏览器底部选择栏问题,导致运行h5用浏览器打开项目后 底部按钮区域被浏览器底部tabbar遮盖住了
为什么裁剪后的图片 那么模糊了。。
我上传1082px6744px 截图出来的base64 就是很糊 上面的文字都看不清 但是 我上传1080px1500px 截图出来的就是很清晰
仔细看了下 我上传1082px*6744px 是上传以后 生成的blob图片宽度和高度等比例缩小了 变成宽度320了
https://github.com/imsnif/synp
synp 可以同步 yarn.lock 和 package-lock.json
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.