From 6bc9141c91388131e26c01bf35d31ba9e57c7a0f Mon Sep 17 00:00:00 2001 From: songjianet <1778651752@qq.com> Date: Tue, 17 May 2022 14:57:04 +0800 Subject: [PATCH] [Fix][UI] Fix in the Chinese state, there is a problem with the multi-language support of the form. (#10066) (cherry picked from commit 359300380b0a2eb469beb0497271bda675860d7d) --- .../security/tenant-manage/components/use-modalData.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/dolphinscheduler-ui/src/views/security/tenant-manage/components/use-modalData.ts b/dolphinscheduler-ui/src/views/security/tenant-manage/components/use-modalData.ts index 331573c56a..bd3c00bfc8 100644 --- a/dolphinscheduler-ui/src/views/security/tenant-manage/components/use-modalData.ts +++ b/dolphinscheduler-ui/src/views/security/tenant-manage/components/use-modalData.ts @@ -23,11 +23,13 @@ import { createTenant, updateTenant } from '@/service/modules/tenants' +import { useI18n } from 'vue-i18n' export function useModalData( props: any, ctx: SetupContext<('cancelModal' | 'confirmModal')[]> ) { + const { t } = useI18n() const variables = reactive({ tenantFormRef: ref(), model: { @@ -40,7 +42,12 @@ export function useModalData( saving: false, rules: { tenantCode: { - required: true + required: true, + validator() { + if (!variables.model.tenantCode) { + return new Error(t('security.tenant.tenant_code_tips')) + } + } }, queueId: { required: true