feat(数据大屏): 组件支持3d设置

This commit is contained in:
wangjiahao
2024-08-05 13:14:29 +08:00
parent 31d727a7c1
commit 6362fef337
6 changed files with 105 additions and 4 deletions

View File

@@ -5,6 +5,12 @@ export const positionData = [
{ key: 'height', label: 'H', min: 10, max: 20000, step: 10 }
]
export const multiDimensionalData = [
{ key: 'x', label: 'X', min: -360, max: 360, step: 1 },
{ key: 'y', label: 'W', min: -360, max: 360, step: 1 },
{ key: 'z', label: 'Y', min: -360, max: 360, step: 1 }
]
export const styleData = [
{ key: 'lineHeight', label: '行高', min: 0, max: 50, step: 1 },
{ key: 'opacity', label: '不透明度', min: 0, max: 1, step: 0.1 },

View File

@@ -3,7 +3,8 @@ import componentList, {
ACTION_SELECTION,
BASE_EVENTS,
COMMON_COMPONENT_BACKGROUND_DARK,
COMMON_COMPONENT_BACKGROUND_LIGHT
COMMON_COMPONENT_BACKGROUND_LIGHT,
MULTI_DIMENSIONAL
} from '@/custom-component/component-list'
import eventBus from '@/utils/eventBus'
import { dvMainStoreWithOut } from '@/store/modules/data-visualization/dvMain'
@@ -153,6 +154,8 @@ export function historyAdaptor(
componentItem.style['adaptation'] = componentItem.style['adaptation'] || 'adaptation'
}
componentItem['maintainRadio'] = componentItem['maintainRadio'] || false
componentItem['multiDimensional'] =
componentItem['multiDimensional'] || deepCopy(MULTI_DIMENSIONAL)
componentItem['aspectRatio'] = componentItem['aspectRatio'] || 1
if (componentItem.component === 'UserView') {
componentItem.actionSelection = componentItem.actionSelection || deepCopy(ACTION_SELECTION)