fix
This commit is contained in:
@@ -65,7 +65,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
v-if="key != 'moodboardPosition'"
|
||||
v-if="key != 'moodboardPosition' && key != 'colorBoards'"
|
||||
class="exportCanvasBox_item"
|
||||
v-for="imgItem in item"
|
||||
:class="[key == 'disposeMoodboard'?'exportCanvasBox_item_dispose':'',imgItem?.upScaleChecked?'active':'']"
|
||||
@@ -2394,7 +2394,7 @@ export default defineComponent({
|
||||
margin-bottom: 2rem;
|
||||
img {
|
||||
max-width: 7rem;
|
||||
max-height: 7rem;
|
||||
max-height: 14rem;
|
||||
object-fit: contain;
|
||||
|
||||
}
|
||||
|
||||
@@ -41,6 +41,7 @@
|
||||
<span style="text-align: center;">{{ $t('Generate.referenceImage') }}</span>
|
||||
|
||||
</template>
|
||||
|
||||
<span v-if="item.label">{{ item.label }}</span>
|
||||
<span v-else>{{ item.name }}</span>
|
||||
</a-popover>
|
||||
@@ -187,7 +188,7 @@ import { message, Upload, Modal } from "ant-design-vue";
|
||||
}
|
||||
});
|
||||
</script>
|
||||
<style>
|
||||
<style lang="less">
|
||||
.ant-popover-inner-content{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
@@ -229,6 +230,10 @@ import { message, Upload, Modal } from "ant-design-vue";
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
padding: 0 calc(1rem*1.2);
|
||||
span{
|
||||
display: block;
|
||||
width: 100%;
|
||||
}
|
||||
&.active{
|
||||
// opacity: .4;
|
||||
pointer-events: none;
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
</div> -->
|
||||
<i class="icon iconfont icon-chehui" @click="historyState('')"></i>
|
||||
<i class="icon iconfont icon-fanchehui" @click="historyState('reverse')"></i>
|
||||
<i class="icon iconfont icon-move" @click="setOperation('move')" :class="{active:canvasState == 'move'}"></i>
|
||||
<!-- <i class="icon iconfont icon-move" @click="setOperation('move')" :class="{active:canvasState == 'move'}"></i> -->
|
||||
<i class="icon iconfont icon-bianji" @click="setOperation('pencil')" :class="{active:canvasState == 'pencil'}"></i>
|
||||
<i class="icon iconfont icon-xiangpi_huaban1" @click="setOperation('eraser')" :class="{active:canvasState == 'eraser'}"></i>
|
||||
<!-- <i class="icon iconfont icon-IC-yehua" @click="setOperation('liquidation')"></i> -->
|
||||
@@ -177,6 +177,7 @@ export default defineComponent({
|
||||
width:canvasWH.value * wScale,
|
||||
height:canvasWH.value * hScale,
|
||||
})
|
||||
canvas.selection = false;
|
||||
scale = img.height/canvas.height
|
||||
pencilbtnStyle.value.background = canvasBtn.canvasPencilColor
|
||||
|
||||
@@ -278,17 +279,23 @@ export default defineComponent({
|
||||
}
|
||||
let setOperation = (str)=>{
|
||||
canvasBtn.canvasState = str
|
||||
let canvasCenterBox = document.querySelector(".generalMiniCanvas .exportCanvasBox_center_box");
|
||||
let classList = canvasCenterBox.className.split(' ');
|
||||
if(str == 'move'){
|
||||
setMove()
|
||||
pencilbtnStyle.value.display = `none`
|
||||
if(classList.indexOf('cursorNone')>-1) canvasCenterBox.classList.remove('cursorNone')
|
||||
}else if(str == 'pencil'){
|
||||
setPencil()
|
||||
pencilbtnStyle.value.display = `block`
|
||||
if(classList.indexOf('cursorNone') == -1) canvasCenterBox.classList.add('cursorNone')
|
||||
}else if(str == 'eraser'){
|
||||
setEraser()
|
||||
pencilbtnStyle.value.display = `block`
|
||||
if(classList.indexOf('cursorNone') == -1) canvasCenterBox.classList.add('cursorNone')
|
||||
}else if(str == 'liquidation'){
|
||||
canvas.isDrawingMode = false
|
||||
if(classList.indexOf('cursorNone') == -1) canvasCenterBox.classList.add('cursorNone')
|
||||
}
|
||||
}
|
||||
let setMove = ()=>{
|
||||
@@ -427,11 +434,9 @@ export default defineComponent({
|
||||
)
|
||||
exportCanvas.add(obj)
|
||||
})
|
||||
|
||||
let data = canvas.toDataURL({
|
||||
format: 'png',
|
||||
quality: 1 // 质量参数,范围 0.0 - 1.0
|
||||
});
|
||||
console.log(canvas.toDataURL("image/png"));
|
||||
|
||||
let data = canvas.toDataURL("image/png");
|
||||
if(liquefation){
|
||||
return resolve(data)
|
||||
}
|
||||
@@ -635,7 +640,8 @@ export default defineComponent({
|
||||
overflow: hidden;
|
||||
width: 100%;
|
||||
background: #e6e6e6;
|
||||
&:hover{
|
||||
cursor: inherit;
|
||||
&.cursorNone:hover{
|
||||
cursor: none;
|
||||
}
|
||||
.editFrontBack_pencilbtn{
|
||||
|
||||
Reference in New Issue
Block a user