Sfoglia il codice sorgente

feat(setting): 更新自定义尺寸输入范围至3000

- 将自定义尺寸输入框的占位符文本从2000更新为3000
- 修改handleInput函数中的最大值限制从2000调整为300
- 更新表单验证逻辑中的最大值检查从2000改为3000
- 相应错误提示消息中的数值范围也更新为3000
panqiuyao 2 settimane fa
parent
commit
abc7a292e6
1 ha cambiato i file con 5 aggiunte e 5 eliminazioni
  1. 5 5
      frontend/src/views/Setting/index.vue

+ 5 - 5
frontend/src/views/Setting/index.vue

@@ -49,7 +49,7 @@
                         type="text"
                         v-model.number="customInput"
                         maxlength="4"
-                        placeholder="请输入1-2000的尺寸值"
+                        placeholder="请输入1-3000的尺寸值"
                         class="w-full px-3 py-2 border rounded-md"
                         @keypress="handleKeyPress"
                         @input="handleInput"
@@ -547,8 +547,8 @@ const handleKeyPress = (event) => {
   }
 };
 const handleInput = (value) => {
-  if (value > 2000) {
-    customInput.value = 2000;
+  if (value > 3000) {
+    customInput.value = 3000;
   } else if (value < 1) {
     customInput.value = 1;
   }
@@ -631,8 +631,8 @@ const saveSetting = async (index) => {
 
     if (selectedSizes.includes('custom')) {
       if (!customInput.value || isNaN(customInput.value) ||
-          customInput.value < 1 || customInput.value > 2000) {
-        ElMessage.error('请输入1-2000之间的有效数值');
+          customInput.value < 1 || customInput.value > 3000) {
+        ElMessage.error('请输入1-3000之间的有效数值');
         return false;
       }