diff --git a/core/core-frontend/src/components/data-visualization/canvas/Shape.vue b/core/core-frontend/src/components/data-visualization/canvas/Shape.vue index eb8e840b42..cebb5d13e4 100644 --- a/core/core-frontend/src/components/data-visualization/canvas/Shape.vue +++ b/core/core-frontend/src/components/data-visualization/canvas/Shape.vue @@ -131,7 +131,12 @@ import Icon from '@/components/icon-custom/src/Icon.vue' import ComponentEditBar from '@/components/visualization/ComponentEditBar.vue' import { useEmitt } from '@/hooks/web/useEmitt' import ComposeShow from '@/components/data-visualization/canvas/ComposeShow.vue' -import { groupSizeStyleAdaptor, groupStyleRevert, groupStyleRevertBatch } from '@/utils/style' +import { + groupSizeStyleAdaptor, + groupStyleRevert, + groupStyleRevertBatch, + tabInnerStyleRevert +} from '@/utils/style' import { isDashboard, isGroupCanvas, isMainCanvas, isTabCanvas } from '@/utils/canvasUtils' import Board from '@/components/de-board/Board.vue' import { activeWatermarkCheckUser, removeActiveWatermark } from '@/components/watermark/watermark' @@ -789,6 +794,12 @@ const handleMouseDownOnPoint = (point, e) => { } const up = () => { + // 如果内部组件保持尺寸时,这里在鼠标抬起时,重新计算一下内部组件占比 + if (['DeTabs'].includes(element.value.component) && element.value.resizeInnerKeep) { + console.log('===test3==') + tabInnerStyleRevert(element.value) + } + dashboardActive.value && emit('onMouseUp') element.value['resizing'] = false document.removeEventListener('mousemove', move) @@ -982,6 +993,7 @@ const tabMoveInCheck = async () => { for (const item of nodes) { if ( item.className !== undefined && + typeof item.className === 'string' && item.className.split(' ').includes('shape') && item.getAttribute('component-id') !== domId.value && // 去掉当前 item.getAttribute('tab-is-check') !== null && diff --git a/core/core-frontend/src/custom-component/common/CommonAttr.vue b/core/core-frontend/src/custom-component/common/CommonAttr.vue index 2016d359df..c4bc31860d 100644 --- a/core/core-frontend/src/custom-component/common/CommonAttr.vue +++ b/core/core-frontend/src/custom-component/common/CommonAttr.vue @@ -89,6 +89,14 @@ const backgroundCustomShow = computed(() => { !['CanvasBoard', 'CanvasIcon', 'CircleShape', 'RectShape'].includes(element.value.component)) ) }) +const tabTitleShow = computed(() => { + return element.value && element.value.style && element.value.component === 'DeTabs' +}) + +const styleShow = computed(() => { + return element.value && element.value.style && element.value.component !== 'DeTabs' +}) + onMounted(() => { const erd = elementResizeDetectorMaker() containerWidth.value = containerRef.value?.offsetWidth @@ -122,8 +130,23 @@ onMounted(() => { /> + + + (() => element.value.style) const state = reactive({ fontSize: [], @@ -508,13 +503,6 @@ const styleOptionKeyArray = [ width: '90px', icon: dvStyleOpacity }, - { - value: 'titleHide', - label: '标题样式', - customOption: titleHideList, - width: '90px', - icon: dvStyleTabHead - }, { value: 'backdropFilter', label: '背景模糊', diff --git a/core/core-frontend/src/custom-component/component-list.ts b/core/core-frontend/src/custom-component/component-list.ts index 748b692b4a..73e5a4491d 100644 --- a/core/core-frontend/src/custom-component/component-list.ts +++ b/core/core-frontend/src/custom-component/component-list.ts @@ -554,7 +554,8 @@ const list = [ headHorizontalPosition: 'left', headFontColor: '#000000', headFontActiveColor: '#000000', - titleHide: false + titleHide: false, + showTabTitle: true } }, { diff --git a/core/core-frontend/src/custom-component/de-tabs/Component.vue b/core/core-frontend/src/custom-component/de-tabs/Component.vue index 1fd447001b..8f60470351 100644 --- a/core/core-frontend/src/custom-component/de-tabs/Component.vue +++ b/core/core-frontend/src/custom-component/de-tabs/Component.vue @@ -5,8 +5,8 @@ :class="[ headClass, `ed-tabs-${curThemes}`, - { 'title-hidde-tab': hideTitle }, - { 'title-show-tab': !hideTitle } + { 'title-hidde-tab': !showTabTitleFlag }, + { 'title-show-tab': showTabTitleFlag } ]" class="custom-tabs-head" ref="tabComponentRef" @@ -19,7 +19,7 @@ :active-color="activeColor" :border-color="noBorderColor" :border-active-color="borderActiveColor" - :hide-title="hideTitle" + :hide-title="!showTabTitleFlag" >