Commit 55a1f750 by 陈玉桐

test

parent 4d033061
<template> <template>
<div id="tool"> <div id="tool">
<div class="cropper"> <div class="cropper" v-show="cropperShow">
<vueCropper <vueCropper
ref="cropper" ref="cropper"
:img="option.img" :img="option.img"
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
@realTime="realTime" @realTime="realTime"
@imgLoad="imgLoad" @imgLoad="imgLoad"
></vueCropper> ></vueCropper>
<div @click="cropperShow=false">完成</div>
</div> </div>
<div class="preview-box"> <div class="preview-box">
<div>预览:</div> <div>预览:</div>
...@@ -215,6 +216,7 @@ export default { ...@@ -215,6 +216,7 @@ export default {
fixedBox: false // 截图框固定大小 fixedBox: false // 截图框固定大小
}, },
previews: {}, previews: {},
cropperShow: false,
posterUrl: '', posterUrl: '',
...@@ -481,9 +483,11 @@ export default { ...@@ -481,9 +483,11 @@ export default {
me.uploadPic = 'data:image;base64,' + res.localData me.uploadPic = 'data:image;base64,' + res.localData
me.option.img = me.uploadPic me.option.img = me.uploadPic
this.cropperShow = true
}else{ }else{
me.uploadPic = res.localData // localData是图片的base64数据,可以用img标签显示 me.uploadPic = res.localData // localData是图片的base64数据,可以用img标签显示
this.cropperShow = true
me.option.img = me.uploadPic me.option.img = me.uploadPic
} }
} }
...@@ -558,6 +562,14 @@ export default { ...@@ -558,6 +562,14 @@ export default {
width: 100%; width: 100%;
} }
} }
.cropper{
position: fixed;
left: 0;
top: 0;
right: 0;
bottom: 0;
z-index: 9999;
}
} }
#posterCon{ #posterCon{
padding: 10px 35.5px 0; 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