From ad8495f08561f36f229d13a80c6ab81e3526118c Mon Sep 17 00:00:00 2001 From: ndbs Date: Thu, 27 Oct 2022 14:23:39 +0800 Subject: [PATCH] =?UTF-8?q?app2.0=20=E6=B7=BB=E5=8A=A0=E6=A0=A1=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../LearunApp-2.2.0/components/learun-app/customform.vue | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/components/learun-app/customform.vue b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/components/learun-app/customform.vue index 9ff9a6f73..3dafa1ce7 100644 --- a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/components/learun-app/customform.vue +++ b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/components/learun-app/customform.vue @@ -194,12 +194,14 @@ export default { // 依次验证表单项,返回一个所有错误提示的数组,如果为空数组则表示无错误 verifyValue() { const errorList = [] - + console.log(this.scheme) this.scheme .filter(t => t.verify) .forEach(schemeItem => { if (schemeItem.table && schemeItem.field) { + console.log(schemeItem.verify,'hemeItem.verify') const verifyFunc = this.verify[schemeItem.verify] + console.log(schemeItem.verify) const verifyResult = verifyFunc(this.getValue(schemeItem.__valuePath__)) if (verifyResult !== true) { errorList.push(`[${schemeItem.title}]: ${verifyResult}`) @@ -304,7 +306,8 @@ export default { MobileOrPhoneOrNull: t => t.length <= 0 || /^1[0-9]{10}$/.test(t) || /^[+0-9- ]*$/.test(t) || '须留空或符合手机/电话号码格式', Uri: t => /^[a-zA-z]+:\/\/[^\s]*$/.test(t) || '须符合网址Url格式', - UriOrNull: t => t.length <= 0 || /^[a-zA-z]+:\/\/[^\s]*$/.test(t) || '须留空或符合网址Url格式' + UriOrNull: t => t.length <= 0 || /^[a-zA-z]+:\/\/[^\s]*$/.test(t) || '须留空或符合网址Url格式', + PositiveFloatint:t=> /^([1-9]\d*|(0|[1-9]\d*)\.\d*[1-9])$/.test(t) || '请输入正确的整数或小数(不能为零和负数)' } } }