Merge pull request #13708 from dataease/pr@dev-v2@fix_batch-set

fix: 修复批量设置部分组件没有背景色选项
This commit is contained in:
王嘉豪
2024-12-01 18:51:40 +08:00
committed by GitHub
3 changed files with 17 additions and 3 deletions

View File

@@ -94,7 +94,12 @@ const tabTitleShow = computed(() => {
})
const styleShow = computed(() => {
return element.value && element.value.style && element.value.component !== 'DeTabs'
return (
element.value &&
element.value.style &&
element.value.component !== 'DeTabs' &&
Object.keys(element.value.style).length > 0
)
})
onMounted(() => {

View File

@@ -643,7 +643,11 @@ export const dvMainStore = defineStore('dataVisualization', {
if (this.batchOptComponentType !== 'UserView') {
this.batchOptComponentInfo = {
collapseName: 'background',
commonBackground: deepCopy(COMMON_COMPONENT_BACKGROUND_BASE),
commonBackground: deepCopy(
this.curOriginThemes === 'light'
? COMMON_COMPONENT_BACKGROUND_LIGHT
: COMMON_COMPONENT_BACKGROUND_DARK
),
style: {}
}
@@ -678,7 +682,11 @@ export const dvMainStore = defineStore('dataVisualization', {
} else {
this.batchOptComponentInfo = {
collapseName: 'background',
commonBackground: deepCopy(COMMON_COMPONENT_BACKGROUND_BASE),
commonBackground: deepCopy(
this.curOriginThemes === 'light'
? COMMON_COMPONENT_BACKGROUND_LIGHT
: COMMON_COMPONENT_BACKGROUND_DARK
),
style: {}
}
this.mixPropertiesInner['common-style']?.forEach(styleKey => {

View File

@@ -371,6 +371,7 @@ const save = () => {
.mobile-config-panel {
height: 100vh;
width: 100vw;
overflow: hidden;
position: relative;
background: #f5f6f7;