fix: 优化隐藏自己横向占满整个区域时,隐藏按钮和操作按钮重叠问题

This commit is contained in:
wangjiahao 2025-02-17 18:17:24 +08:00 committed by 王嘉豪
parent e287db4846
commit 425b8c961e
2 changed files with 13 additions and 3 deletions

View File

@ -1588,7 +1588,6 @@ defineExpose({
:style="editStyle" :style="editStyle"
@contextmenu="handleContextMenu" @contextmenu="handleContextMenu"
> >
---{{ componentData[componentData.length - 1].component }}
<slot name="canvasDragTips" /> <slot name="canvasDragTips" />
<drag-info v-if="dragInfoShow"></drag-info> <drag-info v-if="dragInfoShow"></drag-info>
<canvas-opt-bar <canvas-opt-bar

View File

@ -363,7 +363,8 @@ const {
canvasViewInfo, canvasViewInfo,
mobileInPc, mobileInPc,
dvInfo, dvInfo,
isIframe isIframe,
hiddenListStatus
} = storeToRefs(dvMainStore) } = storeToRefs(dvMainStore)
const state = reactive({ const state = reactive({
@ -384,6 +385,7 @@ const state = reactive({
viewXArray: [], viewXArray: [],
batchOptCheckModel: false batchOptCheckModel: false
}) })
const showHiddenIcon = computed(() => hiddenListStatus.value && isMainCanvas(canvasId.value))
const tabSort = () => { const tabSort = () => {
customTabsSortRef.value.sortInit(element.value) customTabsSortRef.value.sortInit(element.value)
@ -406,7 +408,11 @@ const showEditPosition = computed(() => {
const baseLeft = element.value.x - 1 const baseLeft = element.value.x - 1
const baseRight = pcMatrixCount.value.x - (element.value.x + element.value.sizeX - 1) const baseRight = pcMatrixCount.value.x - (element.value.x + element.value.sizeX - 1)
if ((baseLeft === 0 && baseRight === 0) || baseRight < 0) { if ((baseLeft === 0 && baseRight === 0) || baseRight < 0) {
return 'bar-main-right-inner' if (showHiddenIcon.value) {
return 'bar-main-left-inner'
} else {
return 'bar-main-right-inner'
}
} else if (baseRight === 0) { } else if (baseRight === 0) {
return 'bar-main-left-outer' return 'bar-main-left-outer'
} else { } else {
@ -694,6 +700,11 @@ watch(
right: 0px; right: 0px;
} }
.bar-main-left-inner {
width: 24px;
left: 0px;
}
.bar-main-left-outer { .bar-main-left-outer {
width: 24px; width: 24px;
left: -26px; left: -26px;