From 5718e102ce51a156caa351ca8b8f2f580c18c117 Mon Sep 17 00:00:00 2001 From: taorui Date: Thu, 7 Nov 2024 14:36:25 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E8=BD=BB=E9=87=8F=E7=BA=A7PR=E3=80=91?= =?UTF-8?q?spelling=20errors?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/commonChart/index.vue | 2 +- src/utils/validate.js | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/components/commonChart/index.vue b/src/components/commonChart/index.vue index 42bffb4..aa942b0 100644 --- a/src/components/commonChart/index.vue +++ b/src/components/commonChart/index.vue @@ -35,7 +35,7 @@ export default { }); } }, - // 代表在wacth里声明了 立即先去执行handler方法 + // 代表在watch里声明了 立即先去执行handler方法 immediate: true, deep: true, }, diff --git a/src/utils/validate.js b/src/utils/validate.js index 6439af9..781b5b1 100644 --- a/src/utils/validate.js +++ b/src/utils/validate.js @@ -10,11 +10,11 @@ const rules = { int_n: /^-[1-9]\d*$/, // 负整数 int_p0: /^[1-9]\d*|0$/, // 非负整数(正整数 + 0) int_n0: /^-[1-9]\d*|0$/, // 非正整数(负整数 + 0) - folat: /^-?([1-9]\d*\.\d*|0\.\d*[1-9]\d*|0?\.0+|0)$/, // 匹配浮点数 - folat_p: /^[1-9]\d*\.\d*|0\.\d*[1-9]\d*$/, // 匹配正浮点数 - folat_n: /^-([1-9]\d*\.\d*|0\.\d*[1-9]\d*)$/, // 匹配负浮点数 - folat_p0: /^[1-9]\d*\.\d*|0\.\d*[1-9]\d*|0?\.0+|0$/, // 匹配非负浮点数(正浮点数 + 0) - folat_n0: /^(-([1-9]\d*\.\d*|0\.\d*[1-9]\d*))|0?\.0+|0$/, // 匹配非正浮点数(负浮点数 + 0) + float: /^-?([1-9]\d*\.\d*|0\.\d*[1-9]\d*|0?\.0+|0)$/, // 匹配浮点数 + float_p: /^[1-9]\d*\.\d*|0\.\d*[1-9]\d*$/, // 匹配正浮点数 + float_n: /^-([1-9]\d*\.\d*|0\.\d*[1-9]\d*)$/, // 匹配负浮点数 + float_p0: /^[1-9]\d*\.\d*|0\.\d*[1-9]\d*|0?\.0+|0$/, // 匹配非负浮点数(正浮点数 + 0) + float_n0: /^(-([1-9]\d*\.\d*|0\.\d*[1-9]\d*))|0?\.0+|0$/, // 匹配非正浮点数(负浮点数 + 0) password_en_num: /(?!^\d+$)(?!^[a-zA-Z]+$)[0-9a-zA-Z]{4,23}/, // 英文字母、数字的组合 en_num: /^[a-z0-9]+$/i, // 英文字母、数字的组合 -- Gitee