diff --git a/core/core-frontend/src/custom-component/common/CommonAttr.vue b/core/core-frontend/src/custom-component/common/CommonAttr.vue index 71ce524ce2..952ee96436 100644 --- a/core/core-frontend/src/custom-component/common/CommonAttr.vue +++ b/core/core-frontend/src/custom-component/common/CommonAttr.vue @@ -12,6 +12,7 @@ import CommonEvent from '@/custom-component/common/CommonEvent.vue' import CarouselSetting from '@/custom-component/common/CarouselSetting.vue' import CommonBorderSetting from '@/custom-component/common/CommonBorderSetting.vue' import CollapseSwitchItem from '../../components/collapse-switch-item/src/CollapseSwitchItem.vue' +import TabBackgroundOverall from '@/custom-component/de-tabs/TabBackgroundOverall.vue' const snapshotStore = snapshotStoreWithOut() const { t } = useI18n() @@ -57,6 +58,18 @@ const onBackgroundChange = val => { emits('onAttrChange', { custom: 'commonBackground' }) } +const onTitleBackgroundEnableChange = val => { + element.value.titleBackground.enable = val + snapshotStore.recordSnapshotCacheToMobile('titleBackground') + emits('onAttrChange', { custom: 'titleBackground' }) +} + +const onTitleBackgroundChange = val => { + element.value.titleBackground = val + snapshotStore.recordSnapshotCacheToMobile('titleBackground') + emits('onAttrChange', { custom: 'titleBackground' }) +} + const onStyleAttrChange = ({ key, value }) => { snapshotStore.recordSnapshotCacheToMobile('style') emits('onAttrChange', { custom: 'style', property: key, value: value }) @@ -89,6 +102,11 @@ const backgroundCustomShow = computed(() => { !['CanvasBoard', 'CanvasIcon', 'CircleShape', 'RectShape'].includes(element.value.component)) ) }) + +const titleBackgroundShow = computed( + () => ['DeTabs'].includes(element.value.component) && element.value.titleBackground +) + const tabTitleShow = computed(() => { return element.value && element.value.style && element.value.component === 'DeTabs' }) @@ -139,6 +157,22 @@ onMounted(() => { :background-border-select-width="backgroundBorderSelectWidth" /> + + onTitleBackgroundEnableChange(val)" + v-if="element && titleBackgroundShow" + > + + - + {{ tabItem.title }} { width: 100%; height: 100%; } +.custom-tab-title { +} diff --git a/core/core-frontend/src/custom-component/de-tabs/TabBackgroundOverall.vue b/core/core-frontend/src/custom-component/de-tabs/TabBackgroundOverall.vue new file mode 100644 index 0000000000..46bff45a8c --- /dev/null +++ b/core/core-frontend/src/custom-component/de-tabs/TabBackgroundOverall.vue @@ -0,0 +1,59 @@ + + + + + {{ t('visualization.active_title_background') }} + + + {{ t('visualization.inactive_title_background') }} + + + + + + diff --git a/core/core-frontend/src/locales/en.ts b/core/core-frontend/src/locales/en.ts index 78ba795ea9..3369891608 100644 --- a/core/core-frontend/src/locales/en.ts +++ b/core/core-frontend/src/locales/en.ts @@ -2815,6 +2815,10 @@ Scatter chart (bubble) chart: {a} (series name), {b} (data name), {c} (value arr column_name: 'Field name' }, visualization: { + title_background: 'Title Background', + active_title_background: 'Active Title Background', + multiply_active_title_background: 'Reuse Active Title Background', + inactive_title_background: 'Inactive Title Background', no_hidden_components: 'No Hidden Components', hidden_components: 'Hidden Components', dashboard_adaptor: 'Zoom Mode', diff --git a/core/core-frontend/src/locales/tw.ts b/core/core-frontend/src/locales/tw.ts index 719c4397d4..850200bed0 100644 --- a/core/core-frontend/src/locales/tw.ts +++ b/core/core-frontend/src/locales/tw.ts @@ -2743,6 +2743,10 @@ export default { column_name: '欄位名稱' }, visualization: { + title_background: '標題背景', + active_title_background: '激活標題背景', + multiply_active_title_background: '復用激活標題背景', + inactive_title_background: '非激活標題背景', no_hidden_components: '當前無隱藏組件', hidden_components: '已隱藏的組件', dashboard_adaptor: '縮放模式', diff --git a/core/core-frontend/src/locales/zh-CN.ts b/core/core-frontend/src/locales/zh-CN.ts index 9babc2cd34..54c8140cd6 100644 --- a/core/core-frontend/src/locales/zh-CN.ts +++ b/core/core-frontend/src/locales/zh-CN.ts @@ -2745,6 +2745,10 @@ export default { column_name: '字段名称' }, visualization: { + title_background: '标题背景', + active_title_background: '激活标题背景', + multiply_active_title_background: '复用激活标题背景', + inactive_title_background: '非激活标题背景', no_hidden_components: '当前无隐藏组件', hidden_components: '已隐藏的组件', dashboard_adaptor: '缩放模式',