Explorar el Código

fix分数regex

Michael Wang hace 4 años
padre
commit
b16ebe35bd
Se han modificado 1 ficheros con 1 adiciones y 0 borrados
  1. 1 0
      src/features/mark/MarkBoardKeyBoard.vue

+ 1 - 0
src/features/mark/MarkBoardKeyBoard.vue

@@ -209,6 +209,7 @@ export default defineComponent({
         if (
           !(
             scoreStr.value === "0" ||
+            /^0\.[1-9]\d*$/.test(scoreStr.value) ||
             /^[1-9]\d*$/.test(scoreStr.value) ||
             /^[1-9]\d*\.\d*[1-9]$/.test(scoreStr.value)
           )