refactor(数据填报): 名称长度校验修改

This commit is contained in:
wangjiahao 2024-09-19 19:53:33 +08:00
parent 8eae08e3f8
commit e0babb77b8
5 changed files with 9 additions and 8 deletions

View File

@ -466,6 +466,7 @@ export default {
input_limit_2_25: '{0}-{1}字符', input_limit_2_25: '{0}-{1}字符',
input_limit_2_50: '2-50字符', input_limit_2_50: '2-50字符',
input_limit_2_64: '2-64字符', input_limit_2_64: '2-64字符',
input_limit_1_64: '1-64字符',
data_source_configuration: '数据源配置', data_source_configuration: '数据源配置',
data_source_table: '数据源表', data_source_table: '数据源表',
auth_method: '认证方式', auth_method: '认证方式',

View File

@ -189,9 +189,9 @@ const createInit = (type, data: Tree, exec, name: string) => {
trigger: 'blur' trigger: 'blur'
}, },
{ {
min: 2, min: 1,
max: 64, max: 64,
message: t('datasource.input_limit_2_25', [2, 64]), message: t('datasource.input_limit_1_64', [1, 64]),
trigger: 'blur' trigger: 'blur'
} }
], ],

View File

@ -1321,8 +1321,8 @@ const handleDatasetName = () => {
errorTips.value = t('commons.input_content') errorTips.value = t('commons.input_content')
} }
if (datasetName.value.trim().length < 2) { if (datasetName.value.trim().length < 1) {
errorTips.value = t('datasource.input_limit_2_25', [2, 64]) errorTips.value = t('datasource.input_limit_1_64', [1, 64])
} }
showInput.value = !!errorTips.value showInput.value = !!errorTips.value
} }

View File

@ -177,9 +177,9 @@ const createInit = (type, data: Tree, exec, name: string) => {
trigger: 'blur' trigger: 'blur'
}, },
{ {
min: 2, min: 1,
max: 64, max: 64,
message: t('datasource.input_limit_2_64', [2, 64]), message: t('datasource.input_limit_1_64', [1, 64]),
trigger: 'blur' trigger: 'blur'
} }
], ],

View File

@ -79,9 +79,9 @@ const defaultRule = {
trigger: 'blur' trigger: 'blur'
}, },
{ {
min: 2, min: 1,
max: 64, max: 64,
message: t('datasource.input_limit_2_25', [2, 64]), message: t('datasource.input_limit_1_64', [1, 64]),
trigger: 'blur' trigger: 'blur'
} }
] ]