Merge pull request #6478 from dataease/pr@dev-v2@refactor_panel-tab

refactor: 优化Tab移除操作,修复组件操作按钮区域可能被遮挡问题
This commit is contained in:
王嘉豪 2023-11-01 15:29:17 +08:00 committed by GitHub
commit a0e3be4f2e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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)
}
//