解决元素重影

This commit is contained in:
wxd
2024-10-13 15:43:27 +08:00
parent 7fffb39b84
commit 608e2ce620
4 changed files with 25 additions and 24 deletions

View File

@@ -959,6 +959,10 @@ li {
.sketchboard_upload_modal .switch_type_list.showEvents * { .sketchboard_upload_modal .switch_type_list.showEvents * {
pointer-events: auto; pointer-events: auto;
} }
.ant-modal-wrap {
height: 100vh;
overflow: hidden;
}
.ant-btn:hover, .ant-btn:hover,
.ant-btn:focus, .ant-btn:focus,
.ant-btn:active, .ant-btn:active,

View File

@@ -1066,9 +1066,10 @@ input:focus{
} }
} }
// .ant-modal-wrap{ .ant-modal-wrap{
// z-index: 10001 ; height: 100vh;
// } overflow: hidden;
}
// .driver-overlay-animated{ // .driver-overlay-animated{
// z-index: 10002 !important; // z-index: 10002 !important;
// } // }

View File

@@ -536,7 +536,7 @@ export default defineComponent({
justify-content: center; justify-content: center;
align-items: center; align-items: center;
width: 100%; width: 100%;
top: 105%; top: 100%;
left: 0; left: 0;
position: absolute; position: absolute;
.nav_left,.nav_right{ .nav_left,.nav_right{

View File

@@ -14,7 +14,7 @@
<span>{{ $t('exportModel.density') }}</span> <span>{{ $t('exportModel.density') }}</span>
<input type="range" @change="routesChange('density')" min="1" max="100" v-model="canvasPencilWidth.density"> <input type="range" @change="routesChange('density')" min="1" max="100" v-model="canvasPencilWidth.density">
</div> </div>
<div class="generalMiniCanvas_input_item" v-show="(canvasState != 'move' && canvasState != 'liquidation')"> <div class="generalMiniCanvas_input_item" v-show=" canvasState == 'pencil'">
<span>{{ $t('exportModel.Color') }}</span> <span>{{ $t('exportModel.Color') }}</span>
<input type="color" @input="setPencilColor" v-model="canvasPencilColor"> <input type="color" @input="setPencilColor" v-model="canvasPencilColor">
</div> </div>
@@ -451,31 +451,26 @@ export default defineComponent({
let liquefactionData = ref(null) let liquefactionData = ref(null)
let liquefaction = ref(null) let liquefaction = ref(null)
let submitLiquefaction = (rv)=>{ let submitLiquefaction = (rv)=>{
const originalWidth = liquefactionData.value.width // 保存原始宽度 // const originalWidth = liquefactionData.value.width // 保存原始宽度
const originalHeight = liquefactionData.value.height; // 保存原始高度 // const originalHeight = liquefactionData.value.height; // 保存原始高度
liquefactionData.value.setSrc(rv, function(img) { fabric.Image.fromURL(rv, function(img) {
let wScale = 1 // 设置背景图对象的宽度和高度与 canvas 相同
let hScale = 1
if(img.width>img.height){
hScale = img.height/img.width
exportWH = img.width
}else{
wScale = img.width/img.height
exportWH = img.height
}
img.scaleToWidth(canvas.width); img.scaleToWidth(canvas.width);
img.scaleToHeight(canvas.height); img.scaleToHeight(canvas.height);
img.set({ img.set({
scaleX: canvas.width / img.width, scaleX: canvas.width / img.width,
scaleY: canvas.height / img.height scaleY: canvas.height / img.height
}); });
// img.set({ // 将背景图添加到 canvas 的底层
// scaleX: 1, canvas.setBackgroundImage(img, canvas.renderAll.bind(canvas));
// scaleY: 1 if(!fabric.Object.prototype.controls.deleteControl){
// }); JSSetRemoveImage(deleteObj)
}else{
canvas.renderAll(); fabric.Object.prototype.controls.deleteControl.mouseUpHandler = deleteObj
}); }
setPencilWidth()
updateCanvasState()
},{ crossOrigin: "Anonymous" });
} }
let setLiquefaction =async ()=>{ let setLiquefaction =async ()=>{
// const activeObjects = canvas.backgroundImage // 获取选中的对象 // const activeObjects = canvas.backgroundImage // 获取选中的对象
@@ -561,6 +556,7 @@ export default defineComponent({
flex-direction: row; flex-direction: row;
align-items: center; align-items: center;
margin-left: 7rem; margin-left: 7rem;
height: 6rem;
.generalMiniCanvas_input_item{ .generalMiniCanvas_input_item{
display: flex; display: flex;
margin-right: 3rem; margin-right: 3rem;