Commit e96cbc3b by 陈玉桐

fix

parent 058e7cd0
......@@ -18,7 +18,10 @@
@realTime="realTime"
@imgLoad="imgLoad"
></vueCropper>
<div @click="cropperShow=false">完成</div>
<div class="cropperOpt">
<span @click="cropperShow=false">取消</span>
<span @click="croppSure">完成</span>
</div>
</div>
<div class="preview-box">
<div>预览:</div>
......@@ -351,6 +354,11 @@ export default {
console.log('imgLoad')
console.log(msg)
},
croppSure() {//裁剪完成
this.uploadPic = this.option.img
this.cropperShow = false
},
create() {
// 使input失去焦点
document.getElementById("currentDayInput").blur()
......@@ -480,12 +488,12 @@ export default {
localId: res.localIds[0], // 图片的localID
success: function (res) {
if (res.localData.substr(0, 5) != 'data:') {
me.uploadPic = 'data:image;base64,' + res.localData
// me.uploadPic = 'data:image;base64,' + res.localData
me.option.img = me.uploadPic
me.option.img = 'data:image;base64,' + res.localData
me.cropperShow = true
}else{
me.uploadPic = res.localData // localData是图片的base64数据,可以用img标签显示
// me.uploadPic = res.localData // localData是图片的base64数据,可以用img标签显示
me.cropperShow = true
me.option.img = me.uploadPic
......@@ -568,8 +576,20 @@ export default {
top: 0;
right: 0;
bottom: 0;
z-index: 9999;
z-index: 10000;
.cropperOpt{
position: absolute;
bottom: 0;
width: 100%;
display: flex;
justify-content: space-between;
align-items: center;
span{
padding: 15px 20px;
}
}
}
}
#posterCon{
padding: 10px 35.5px 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment