feat(数据大屏): Tab组件数据大屏适配

This commit is contained in:
wangjiahao 2024-08-15 13:24:20 +08:00
parent 04f04fc986
commit 45dd2c9a17
3 changed files with 8 additions and 3 deletions

View File

@ -31,7 +31,8 @@ import {
isDashboard, isDashboard,
isGroupCanvas, isGroupCanvas,
isMainCanvas, isMainCanvas,
isSameCanvas isSameCanvas,
isTabCanvas
} from '@/utils/canvasUtils' } from '@/utils/canvasUtils'
import { guid } from '@/views/visualized/data/dataset/form/util' import { guid } from '@/views/visualized/data/dataset/form/util'
import { snapshotStoreWithOut } from '@/store/modules/data-visualization/snapshot' import { snapshotStoreWithOut } from '@/store/modules/data-visualization/snapshot'
@ -569,7 +570,7 @@ const getTextareaHeight = (element, text) => {
} }
const editStyle = computed(() => { const editStyle = computed(() => {
if (dashboardActive.value || isGroupCanvas(canvasId.value)) { if (dashboardActive.value || isGroupCanvas(canvasId.value) || isTabCanvas(canvasId.value)) {
return { return {
width: '100%', width: '100%',
height: '100%' height: '100%'

View File

@ -493,6 +493,10 @@ export function isGroupCanvas(canvasId) {
return canvasId && canvasId.includes('Group') return canvasId && canvasId.includes('Group')
} }
export function isTabCanvas(canvasId) {
return canvasId && canvasId.includes('tab')
}
export function findComponentIndexById(componentId, componentDataMatch = componentData.value) { export function findComponentIndexById(componentId, componentDataMatch = componentData.value) {
let indexResult = -1 let indexResult = -1
componentDataMatch.forEach((component, index) => { componentDataMatch.forEach((component, index) => {

View File

@ -182,7 +182,7 @@ export function getComponentRotatedStyle(style) {
return style return style
} }
export function getCanvasStyle(canvasStyleData, canvasId = 'canvasMain') { export function getCanvasStyle(canvasStyleData, canvasId = 'canvas-main') {
const { const {
backgroundColorSelect, backgroundColorSelect,
background, background,