diff --git a/dbm-ui/frontend/src/types/auto-imports.d.ts b/dbm-ui/frontend/src/types/auto-imports.d.ts index d0c217f6f1..7021ac5101 100644 --- a/dbm-ui/frontend/src/types/auto-imports.d.ts +++ b/dbm-ui/frontend/src/types/auto-imports.d.ts @@ -71,6 +71,6 @@ declare global { // for type re-export declare global { // @ts-ignore - export type { Component, ComponentPublicInstance, ComputedRef, DirectiveBinding, ExtractDefaultPropTypes, ExtractPropTypes, ExtractPublicPropTypes, InjectionKey, PropType, Ref, MaybeRef, MaybeRefOrGetter, VNode, WritableComputedRef } from 'vue' + export type { Component, ComponentPublicInstance, ComputedRef, ExtractDefaultPropTypes, ExtractPropTypes, ExtractPublicPropTypes, InjectionKey, PropType, Ref, VNode, WritableComputedRef } from 'vue' import('vue') } diff --git a/dbm-ui/frontend/src/views/db-manage/mysql/rollback/pages/page1/components/render-row/components/RenderClusterInputSelect.vue b/dbm-ui/frontend/src/views/db-manage/mysql/rollback/pages/page1/components/render-row/components/RenderClusterInputSelect.vue index b1ec3d5030..f3fba99b71 100644 --- a/dbm-ui/frontend/src/views/db-manage/mysql/rollback/pages/page1/components/render-row/components/RenderClusterInputSelect.vue +++ b/dbm-ui/frontend/src/views/db-manage/mysql/rollback/pages/page1/components/render-row/components/RenderClusterInputSelect.vue @@ -97,7 +97,7 @@ message: t('目标集群不能为空'), }, { - validator: (value: string) => value.split(',').every((domain) => domainRegex.test(domain)), + validator: (value: string) => domainRegex.test(value), message: t('目标集群输入格式有误'), }, { @@ -110,6 +110,7 @@ bk_biz_id: window.PROJECT_CONFIG.BIZ_ID, }).then((data) => { if (data.length === list.length) { + localClusterId.value = data[0].id; return true; } return false; @@ -129,6 +130,7 @@ bk_biz_id: window.PROJECT_CONFIG.BIZ_ID, }).then((data) => { if (data) { + localClusterId.value = data[0].id; localClusterDomain.value = data[0].master_domain; } }); diff --git a/dbm-ui/frontend/src/views/db-manage/tendb-cluster/rollback/pages/page1/components/render-row/components/RenderClusterInputSelect.vue b/dbm-ui/frontend/src/views/db-manage/tendb-cluster/rollback/pages/page1/components/render-row/components/RenderClusterInputSelect.vue index aa3c8f005b..cba08d2e3a 100644 --- a/dbm-ui/frontend/src/views/db-manage/tendb-cluster/rollback/pages/page1/components/render-row/components/RenderClusterInputSelect.vue +++ b/dbm-ui/frontend/src/views/db-manage/tendb-cluster/rollback/pages/page1/components/render-row/components/RenderClusterInputSelect.vue @@ -85,7 +85,7 @@ message: t('目标集群不能为空'), }, { - validator: (value: string) => value.split(',').every((domain) => domainRegex.test(domain)), + validator: (value: string) => domainRegex.test(value), message: t('目标集群输入格式有误'), }, { @@ -98,6 +98,7 @@ bk_biz_id: window.PROJECT_CONFIG.BIZ_ID, }).then((data) => { if (data.length === list.length) { + localClusterId.value = data[0].id; return true; } return false; @@ -112,6 +113,7 @@ cluster_ids: [id], }).then((data) => { if (data?.results.length > 0) { + localClusterId.value = data.results[0]?.id; localClusterDomain.value = data.results[0]?.master_domain; } });