From 045b88b31958b2b639c2cb6a8476960ad5293007 Mon Sep 17 00:00:00 2001
From: Tevin <tingquanren@163.com>
Date: Thu, 25 Mar 2021 08:58:48 +0800
Subject: [PATCH] Merge branch 'master' of ssh://dev.zhiheiot.com:29418/mob-components

---
 forms/form/CFormItem.vue |   13 +++++++------
 1 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/forms/form/CFormItem.vue b/forms/form/CFormItem.vue
index 2d0ed74..6a2fbdf 100644
--- a/forms/form/CFormItem.vue
+++ b/forms/form/CFormItem.vue
@@ -36,7 +36,7 @@
                 label: this.label,
                 required: this.isRequired,
                 error: this.error,
-                onChange: (evt) => this.onChange(evt),
+                onChange: evt => this.onChange(evt),
             };
         },
         isRequired() {
@@ -66,8 +66,9 @@
                     !hasOwn.call(evt, 'constructor') &&
                     !hasOwn.call(evt.constructor.prototype, 'isPrototypeOf')
                 ) {
-                    throw new Error('错误的表单项 onChange 参数类型!(At: ' + this.name + ')');
-                    return;
+                    throw new Error(
+                        '错误的表单项 onChange 参数类型!(At: ' + this.name + ')'
+                    );
                 }
             }
             // 未改变值不触发
@@ -83,7 +84,7 @@
         this.$nextTick(() => {
             // 未设置验证
             if (!this.required && !this.rules) {
-                this.formRes.$regItemValidator(this.name, (validateType) => {
+                this.formRes.$regItemValidator(this.name, validateType => {
                     this.error = false;
                     return Promise.resolve({
                         name: this.name,
@@ -105,13 +106,13 @@
                 validator.messages(validateMsgs);
                 // 注册验证
                 let errTimer = null;
-                this.formRes.$regItemValidator(this.name, (validateType) => {
+                this.formRes.$regItemValidator(this.name, validateType => {
                     return validator
                         .validate({
                             [this.name]: this.formRes.formData[this.name],
                         })
                         .then(
-                            (res) => {
+                            res => {
                                 this.error = false;
                                 return {
                                     name: this.name,

--
Gitblit v1.9.1