refactor: 优化Tab移除操作,修复组件操作按钮区域可能被遮挡问题

This commit is contained in:
wangjiahao 2023-11-01 15:27:24 +08:00
parent 0c5d8362dc
commit 0d140ed37e
2 changed files with 11 additions and 9 deletions

View File

@ -287,7 +287,7 @@ const showEditPosition = computed(() => {
if (showPosition.value === 'canvas') {
const baseLeft = element.value.x - 1
const baseRight = pcMatrixCount.value.x - (element.value.x + element.value.sizeX - 1)
if (baseLeft === 0 && baseRight === 0) {
if ((baseLeft === 0 && baseRight === 0) || baseRight < 0) {
return 'bar-main-right-inner'
} else if (baseRight === 0) {
return 'bar-main-left-outer'

View File

@ -175,14 +175,16 @@ const addItemBox = component => {
}
const moveOutFromTab = component => {
component.canvasId = canvasId.value
dvMainStore.addComponent({
component,
index: undefined,
isFromGroup: true,
componentData: componentData.value
})
addItemBox(component)
setTimeout(() => {
component.canvasId = canvasId.value
dvMainStore.addComponent({
component,
index: undefined,
isFromGroup: true,
componentData: componentData.value
})
addItemBox(component)
}, 500)
}
//