feat(仪表板、数据大屏): 图片组件支持绑定数据集

This commit is contained in:
wangjiahao
2024-09-12 17:09:59 +08:00
parent a24f1eb7c6
commit c5e2eac8c3
10 changed files with 93 additions and 20 deletions

View File

@@ -61,6 +61,9 @@ export function findNewComponent(componentName, innerType, staticMap?) {
textValue: ''
}
}
if (newComponent.innerType === 'Picture') {
newComponent.style['adaptation'] = 'adaptation'
}
if (dvMainStore.curOriginThemes === 'light') {
newComponent['commonBackground'] = cloneDeep(COMMON_COMPONENT_BACKGROUND_LIGHT)
} else {

View File

@@ -78,3 +78,11 @@ export const componentsMap = {
export default function findComponent(key) {
return componentsMap[key]
}
export function findComponentAttr(component) {
const key =
component.component === 'UserView' && component.innerType === 'Picture'
? 'PictureAttr'
: component.component + 'Attr'
return componentsMap[key]
}