Commit d41dd9dd by 陈玉桐

fix

parent 9e8e835c
<template> <template>
<div id="tool"> <div id="tool">
<div class="cropper" v-if="cropperShow"> <div class="cropper" v-if="cropperShow">
<vueCropper <vueCropper
ref="cropper" ref="cropper"
:img="option.img" :img="option.img"
:outputSize="option.size" :outputSize="option.size"
:outputType="option.outputType" :outputType="option.outputType"
:info="option.info" :info="option.info"
:full="option.full" :full="option.full"
:canMove="option.canMove" :canMove="option.canMove"
:canMoveBox="option.canMoveBox" :canMoveBox="option.canMoveBox"
:original="option.original" :original="option.original"
:autoCrop="option.autoCrop" :autoCrop="option.autoCrop"
:autoCropWidth="option.autoCropWidth" :autoCropWidth="option.autoCropWidth"
:autoCropHeight="option.autoCropHeight" :autoCropHeight="option.autoCropHeight"
:fixedBox="option.fixedBox" :fixedBox="option.fixedBox"
@realTime="realTime" ></vueCropper>
@imgLoad="imgLoad" <div class="cropperOpt">
></vueCropper> <span @click="cropperShow=false">取消</span>
<div class="cropperOpt"> <span @click="croppSure">完成</span>
<span @click="cropperShow=false">取消</span> </div>
<span @click="croppSure">完成</span> </div>
</div>
</div>
<!-- 21天模板 --> <!-- 21天模板 -->
<div id="posterCon" class="posterCon_21" v-if="days==21||days==150"> <div id="posterCon" class="posterCon_21" v-if="days==21||days==150">
<div id="posterBox"> <div id="posterBox">
...@@ -198,22 +196,21 @@ import loading from '../components/loading/loading.vue' ...@@ -198,22 +196,21 @@ import loading from '../components/loading/loading.vue'
export default { export default {
data() { data() {
return{ return{
option: { option: {
img: '', // 裁剪图片的地址 img: '', // 裁剪图片的地址
info: true, // 裁剪框的大小信息 info: true, // 裁剪框的大小信息
outputSize: 1, // 剪切后的图片质量(0.1-1) outputSize: 1, // 剪切后的图片质量(0.1-1)
full: true, // 输出原图比例截图 props名full full: true, // 输出原图比例截图 props名full
outputType: 'png', // 裁剪生成额图片的格式 outputType: 'png', // 裁剪生成额图片的格式
canMove: true, // 能否拖动图片 canMove: true, // 能否拖动图片
original: false, // 上传图片是否显示原始宽高 original: false, // 上传图片是否显示原始宽高
canMoveBox: true, // 能否拖动截图框 canMoveBox: true, // 能否拖动截图框
autoCrop: true, // 是否默认生成截图框 autoCrop: true, // 是否默认生成截图框
autoCropWidth: 150, autoCropWidth: 150,
autoCropHeight: 150, autoCropHeight: 150,
fixedBox: false // 截图框固定大小 fixedBox: false // 截图框固定大小
}, },
previews: {}, cropperShow: false,
cropperShow: false,
posterUrl: '', posterUrl: '',
...@@ -339,15 +336,6 @@ export default { ...@@ -339,15 +336,6 @@ export default {
}) })
}, },
methods: { methods: {
// 实时预览函数
realTime(data) {
console.log('realTime')
this.previews = data
},
imgLoad (msg) {
console.log('imgLoad')
console.log(msg)
},
croppSure() {//裁剪完成 croppSure() {//裁剪完成
this.$refs.cropper.getCropData(data=>{ this.$refs.cropper.getCropData(data=>{
this.option.img = '' this.option.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