Browse Source

[Fix][UI] Fix in the Chinese state, there is a problem with the multi-language support of the form. (#10066)

3.1.0-release
songjianet 2 years ago committed by GitHub
parent
commit
359300380b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 9
      dolphinscheduler-ui/src/views/security/tenant-manage/components/use-modalData.ts

9
dolphinscheduler-ui/src/views/security/tenant-manage/components/use-modalData.ts

@ -23,11 +23,13 @@ import {
createTenant, createTenant,
updateTenant updateTenant
} from '@/service/modules/tenants' } from '@/service/modules/tenants'
import { useI18n } from 'vue-i18n'
export function useModalData( export function useModalData(
props: any, props: any,
ctx: SetupContext<('cancelModal' | 'confirmModal')[]> ctx: SetupContext<('cancelModal' | 'confirmModal')[]>
) { ) {
const { t } = useI18n()
const variables = reactive({ const variables = reactive({
tenantFormRef: ref(), tenantFormRef: ref(),
model: { model: {
@ -40,7 +42,12 @@ export function useModalData(
saving: false, saving: false,
rules: { rules: {
tenantCode: { tenantCode: {
required: true required: true,
validator() {
if (!variables.model.tenantCode) {
return new Error(t('security.tenant.tenant_code_tips'))
}
}
}, },
queueId: { queueId: {
required: true required: true

Loading…
Cancel
Save