Merge pull request #12307 from dataease/pr@dev-v2@fix_name-check

refactor(仪表板、数据大屏): 名称长度校验修改
This commit is contained in:
王嘉豪 2024-09-19 19:20:23 +08:00 committed by GitHub
commit 7b66563387
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 4 deletions

View File

@ -105,8 +105,8 @@ const closeEditCanvasName = () => {
if (inputName.value.trim() === dvInfo.value.name) {
return
}
if (inputName.value.trim().length > 64 || inputName.value.trim().length < 2) {
ElMessage.warning('名称字段长度2-64个字符')
if (inputName.value.trim().length > 64 || inputName.value.trim().length < 1) {
ElMessage.warning('名称字段长度1-64个字符')
editCanvasName()
return
}

View File

@ -76,8 +76,8 @@ const closeEditCanvasName = () => {
if (inputName.value.trim() === dvInfo.value.name) {
return
}
if (inputName.value.trim().length > 64 || inputName.value.trim().length < 2) {
ElMessage.warning('名称字段长度2-64个字符')
if (inputName.value.trim().length > 64 || inputName.value.trim().length < 1) {
ElMessage.warning('名称字段长度1-64个字符')
editCanvasName()
return
}