From 1dec0bf8a1a65ce28158a124d82b9fe970e16d22 Mon Sep 17 00:00:00 2001 From: wangjiahao <1522128093@qq.com> Date: Mon, 10 Feb 2025 16:59:17 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E4=BB=AA=E8=A1=A8=E6=9D=BF=E3=80=81?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E5=A4=A7=E5=B1=8F):=20Tab=E7=BB=84=E4=BB=B6?= =?UTF-8?q?=E6=A0=87=E9=A2=98=E6=94=AF=E6=8C=81=E8=AE=BE=E7=BD=AE=E8=83=8C?= =?UTF-8?q?=E6=99=AF=20#13384?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../custom-component/common/CommonAttr.vue | 34 +++++++++++ .../src/custom-component/component-list.ts | 8 +++ .../custom-component/de-tabs/Component.vue | 4 +- .../de-tabs/TabBackgroundOverall.vue | 59 +++++++++++++++++++ core/core-frontend/src/locales/en.ts | 4 ++ core/core-frontend/src/locales/tw.ts | 4 ++ core/core-frontend/src/locales/zh-CN.ts | 4 ++ 7 files changed, 116 insertions(+), 1 deletion(-) create mode 100644 core/core-frontend/src/custom-component/de-tabs/TabBackgroundOverall.vue 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" /> + + + +