Commit e96cbc3b by 陈玉桐

fix

parent 058e7cd0
...@@ -18,7 +18,10 @@ ...@@ -18,7 +18,10 @@
@realTime="realTime" @realTime="realTime"
@imgLoad="imgLoad" @imgLoad="imgLoad"
></vueCropper> ></vueCropper>
<div @click="cropperShow=false">完成</div> <div class="cropperOpt">
<span @click="cropperShow=false">取消</span>
<span @click="croppSure">完成</span>
</div>
</div> </div>
<div class="preview-box"> <div class="preview-box">
<div>预览:</div> <div>预览:</div>
...@@ -351,6 +354,11 @@ export default { ...@@ -351,6 +354,11 @@ export default {
console.log('imgLoad') console.log('imgLoad')
console.log(msg) console.log(msg)
}, },
croppSure() {//裁剪完成
this.uploadPic = this.option.img
this.cropperShow = false
},
create() { create() {
// 使input失去焦点 // 使input失去焦点
document.getElementById("currentDayInput").blur() document.getElementById("currentDayInput").blur()
...@@ -480,12 +488,12 @@ export default { ...@@ -480,12 +488,12 @@ export default {
localId: res.localIds[0], // 图片的localID localId: res.localIds[0], // 图片的localID
success: function (res) { success: function (res) {
if (res.localData.substr(0, 5) != 'data:') { 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 me.cropperShow = true
}else{ }else{
me.uploadPic = res.localData // localData是图片的base64数据,可以用img标签显示 // me.uploadPic = res.localData // localData是图片的base64数据,可以用img标签显示
me.cropperShow = true me.cropperShow = true
me.option.img = me.uploadPic me.option.img = me.uploadPic
...@@ -568,9 +576,21 @@ export default { ...@@ -568,9 +576,21 @@ export default {
top: 0; top: 0;
right: 0; right: 0;
bottom: 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{ #posterCon{
padding: 10px 35.5px 0; padding: 10px 35.5px 0;
>img{ >img{
......
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