From f999cb4080b7d9b914afbc33d4ac82fc297c09c5 Mon Sep 17 00:00:00 2001 From: royalpioneer Date: Fri, 29 Nov 2024 17:00:06 +0800 Subject: [PATCH] =?UTF-8?q?fix(frontend):=20tendbcluster=E3=80=81doris?= =?UTF-8?q?=E7=9A=84tab=E7=BC=BA=E5=A4=B1=20#8175=20#=20Reviewed,=20transa?= =?UTF-8?q?ction=20id:=2025387?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/editable-info/index.vue | 2 +- .../views/db-configure/components/DetailsBase.vue | 14 +++++++++----- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/dbm-ui/frontend/src/components/editable-info/index.vue b/dbm-ui/frontend/src/components/editable-info/index.vue index 9c372f4e1a..408a20cfc5 100644 --- a/dbm-ui/frontend/src/components/editable-info/index.vue +++ b/dbm-ui/frontend/src/components/editable-info/index.vue @@ -100,7 +100,7 @@ isEdit?: boolean; isCopy?: boolean; isRequired?: boolean; - render?: (data: Record) => VNode | string | null; + render?: () => VNode | string | null; }; export type EditEmitData = { diff --git a/dbm-ui/frontend/src/views/db-configure/components/DetailsBase.vue b/dbm-ui/frontend/src/views/db-configure/components/DetailsBase.vue index e3034ac034..ba051fc053 100644 --- a/dbm-ui/frontend/src/views/db-configure/components/DetailsBase.vue +++ b/dbm-ui/frontend/src/views/db-configure/components/DetailsBase.vue @@ -130,9 +130,9 @@ extraParametersCards: () => [], routeParams: () => ({}), deployInfo: () => - ({ - conf_items: [] as DetailData['conf_items'], - }), + ({ + conf_items: [] as DetailData['conf_items'], + }), }); const emits = defineEmits(); @@ -208,7 +208,11 @@ { label: t('主从方式'), key: 'sync_type', - render: (data) => {data.sync_type === 'mirroring' ? t('镜像') : data.sync_type} + render: () => { + detailData.value.sync_type === 'mirroring' + ? t('镜像') + : detailData.value.sync_type + } }, ], ); @@ -231,7 +235,7 @@ if (isSqlServer.value) { return { ...props.data, - ...props.deployInfo.conf_items.reduce>((acc, item) => { + ...props.deployInfo.conf_items!.reduce>((acc, item) => { acc[item.conf_name] = item.conf_value!; return acc; }, {}),