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 f0dd01f948..761e74d869 100644 --- a/core/core-frontend/src/custom-component/de-tabs/Component.vue +++ b/core/core-frontend/src/custom-component/de-tabs/Component.vue @@ -30,34 +30,54 @@ > @@ -150,6 +170,7 @@ import { deepCopyTabItemHelper } from '@/store/modules/data-visualization/copy' import { snapshotStoreWithOut } from '@/store/modules/data-visualization/snapshot' import { useI18n } from '@/hooks/web/useI18n' import { imgUrlTrans } from '@/utils/imgUtils' +import Board from '@/components/de-board/Board.vue' const dvMainStore = dvMainStoreWithOut() const snapshotStore = snapshotStoreWithOut() const { tabMoveInActiveId, bashMatrixInfo, editMode, mobileInPc } = storeToRefs(dvMainStore) @@ -216,6 +237,37 @@ const { searchCount } = toRefs(props) +const titleBackgroundActiveSvgInner = computed(() => { + return element.value.titleBackground.active.innerImage.replace('board/', '').replace('.svg', '') +}) + +const titleBackgroundInActiveSvgInner = computed(() => { + return element.value.titleBackground.inActive.innerImage.replace('board/', '').replace('.svg', '') +}) + +const svgInnerInActiveEnable = itemName => { + const { backgroundImageEnable, backgroundType, innerImage } = + element.value.titleBackground.inActive + return ( + editableTabsValue.value !== itemName && + element.value.titleBackground?.enable && + backgroundImageEnable && + backgroundType === 'innerImage' && + typeof innerImage === 'string' + ) +} + +const svgInnerActiveEnable = itemName => { + const { backgroundImageEnable, backgroundType, innerImage } = element.value.titleBackground.active + return ( + editableTabsValue.value === itemName && + element.value.titleBackground?.enable && + backgroundImageEnable && + backgroundType === 'innerImage' && + typeof innerImage === 'string' + ) +} + const handleMouseEnter = () => { state.hoverFlag = true } @@ -475,7 +527,8 @@ const titleStyle = itemName => { textDecoration: element.value.style.textDecoration, fontStyle: element.value.style.fontStyle, fontWeight: element.value.style.fontWeight, - fontSize: (element.value.style.activeFontSize || 18) * scale.value + 'px' + fontSize: (element.value.style.activeFontSize || 18) * scale.value + 'px', + lineHeight: (element.value.style.activeFontSize || 18) * scale.value + 'px' } if (element.value.titleBackground?.enable) { style = { @@ -488,7 +541,8 @@ const titleStyle = itemName => { textDecoration: element.value.style.textDecoration, fontStyle: element.value.style.fontStyle, fontWeight: element.value.style.fontWeight, - fontSize: (element.value.style.fontSize || 16) * scale.value + 'px' + fontSize: (element.value.style.fontSize || 16) * scale.value + 'px', + lineHeight: (element.value.style.fontSize || 16) * scale.value + 'px' } if (element.value.titleBackground?.enable) { style = { @@ -635,6 +689,7 @@ onBeforeMount(() => { } :deep(.ed-tabs__item) { font-family: inherit; + padding-right: 0 !important; } } @@ -688,7 +743,11 @@ onBeforeMount(() => { } .custom-tab-title { .title-inner { + position: relative; background-size: 100% 100% !important; } + :deep(.ed-dropdown) { + vertical-align: middle !important; + } } diff --git a/core/core-frontend/src/custom-component/de-tabs/TabBackgroundOverall.vue b/core/core-frontend/src/custom-component/de-tabs/TabBackgroundOverall.vue index 2bff95637a..08ddaa767b 100644 --- a/core/core-frontend/src/custom-component/de-tabs/TabBackgroundOverall.vue +++ b/core/core-frontend/src/custom-component/de-tabs/TabBackgroundOverall.vue @@ -1,9 +1,10 @@