refactor(仪表板、数据大屏): 名称长度校验修改

This commit is contained in:
wangjiahao 2024-09-19 19:19:43 +08:00
parent 8757637231
commit 8eae08e3f8
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
}