From 9e652696d2544bcca8885ce92776d07c08f426b8 Mon Sep 17 00:00:00 2001 From: dataeaseShu Date: Fri, 27 Sep 2024 10:51:51 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E6=9F=A5=E8=AF=A2=E7=BB=84=E4=BB=B6):=20?= =?UTF-8?q?=E8=BF=87=E6=BB=A4=E7=BB=84=E4=BB=B6=E4=BC=98=E5=8C=96=20#11696?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../custom-component/v-query/Component.vue | 17 ++++++++-- .../modules/data-visualization/dvMain.ts | 1 + .../editor/editor-style/VQueryChartStyle.vue | 32 +++++++++++++------ 3 files changed, 38 insertions(+), 12 deletions(-) diff --git a/core/core-frontend/src/custom-component/v-query/Component.vue b/core/core-frontend/src/custom-component/v-query/Component.vue index ad74d6b265..36c96eaeb0 100644 --- a/core/core-frontend/src/custom-component/v-query/Component.vue +++ b/core/core-frontend/src/custom-component/v-query/Component.vue @@ -18,7 +18,8 @@ import { onBeforeMount, CSSProperties, shallowRef, - provide + provide, + nextTick } from 'vue' import { storeToRefs } from 'pinia' import { useI18n } from '@/hooks/web/useI18n' @@ -57,6 +58,7 @@ const props = defineProps({ }) const { element, view, scale } = toRefs(props) const { t } = useI18n() +const vQueryRef = ref() const dvMainStore = dvMainStoreWithOut() const { curComponent, canvasViewInfo, mobileInPc, firstLoadMap } = storeToRefs(dvMainStore) const canEdit = ref(false) @@ -64,6 +66,7 @@ const queryConfig = ref() const defaultStyle = { border: '', placeholder: '请选择', + placeholderSize: 14, placeholderShow: true, background: '', text: '', @@ -166,6 +169,7 @@ const setCustomStyle = val => { labelColorBtn, btnColor, placeholder, + placeholderSize, placeholderShow, labelShow } = val @@ -174,6 +178,14 @@ const setCustomStyle = val => { customStyle.btnList = [...btnList] customStyle.layout = layout customStyle.placeholderShow = placeholderShow ?? true + customStyle.placeholderSize = placeholderSize ?? 14 + nextTick(() => { + vQueryRef.value.style.setProperty('--ed-font-size-base', `${customStyle.placeholderSize}px`) + vQueryRef.value.style.setProperty( + '--ed-component-size', + `${customStyle.placeholderSize + 18}px` + ) + }) customStyle.placeholder = placeholder ?? '请选择' customStyle.titleShow = titleShow customStyle.titleColor = titleColor @@ -577,7 +589,7 @@ const autoStyle = computed(() => {