Skip to content

Commit

Permalink
fix(frontend): tendbcluster、doris的tab缺失 TencentBlueKing#8175
Browse files Browse the repository at this point in the history
# Reviewed, transaction id: 25386
  • Loading branch information
royalpioneer committed Nov 29, 2024
1 parent ca6091e commit 976923a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
4 changes: 2 additions & 2 deletions dbm-ui/frontend/src/components/editable-info/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
v-overflow-tips
class="base-info__value text-overflow">
<Component
:is="config.render(data)"
:is="config.render"
v-if="config.render" />
<template v-else>{{ data[config.key] || '--' }}</template>
</span>
Expand Down Expand Up @@ -100,7 +100,7 @@
isEdit?: boolean;
isCopy?: boolean;
isRequired?: boolean;
render?: (data: Record<string, any>) => VNode | string | null;
render?: () => VNode | string | null;
};

export type EditEmitData = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,9 +130,9 @@
extraParametersCards: () => [],
routeParams: () => ({}),
deployInfo: () =>
({
conf_items: [] as DetailData['conf_items'],
}),
({
conf_items: [] as DetailData['conf_items'],
}),
});

const emits = defineEmits<Emits>();
Expand Down Expand Up @@ -208,7 +208,11 @@
{
label: t('主从方式'),
key: 'sync_type',
render: (data) => <span> {data.sync_type === 'mirroring' ? t('镜像') : data.sync_type} </span>
render: () => <span> {
detailData.value.sync_type === 'mirroring'
? t('镜像')
: detailData.value.sync_type
} </span>
},
],
);
Expand All @@ -231,7 +235,7 @@
if (isSqlServer.value) {
return {
...props.data,
...props.deployInfo.conf_items.reduce<Record<string, string>>((acc, item) => {
...props.deployInfo.conf_items!.reduce<Record<string, string>>((acc, item) => {
acc[item.conf_name] = item.conf_value!;
return acc;
}, {}),
Expand Down

0 comments on commit 976923a

Please sign in to comment.