From 6338006e0f85af8d4915abfbe67696b2b17dd6ce Mon Sep 17 00:00:00 2001
From: Tevin <tingquanren@163.com>
Date: Thu, 13 May 2021 21:10:19 +0800
Subject: [PATCH] Merge branch 'master' of ssh://dev.zhiheiot.com:29418/mob-components

---
 forms/input/CInput.vue |   21 +++++++++++++--------
 1 files changed, 13 insertions(+), 8 deletions(-)

diff --git a/forms/input/CInput.vue b/forms/input/CInput.vue
index c09081c..c6f16c8 100644
--- a/forms/input/CInput.vue
+++ b/forms/input/CInput.vue
@@ -1,18 +1,18 @@
 /**
- * CInput
+ * CInput - 表单项,文本输入框
  * @author Tevin
  */
 
 <template>
     <AtInput
-        :name="itemData.name"
-        :title="itemData.label"
+        :name="itemRes.name"
+        :title="itemRes.label"
         :type="type"
         :placeholder="placeholder"
-        :required="itemData.required"
-        :error="itemData.error"
-        :value="itemData.formData[itemData.name]"
-        :onChange="evt=>itemData.onChange(evt)"
+        :required="itemRes.required"
+        :error="itemRes.error"
+        :value="itemRes.formData[itemRes.name]"
+        :onChange="evt=>itemRes.onChange(evt)"
     >
         <slot />
     </AtInput>
@@ -20,6 +20,7 @@
 
 <script>
 import { AtInput } from 'taro-ui-vue';
+import './cInput.scss';
 
 export default {
     name: 'CInput',
@@ -27,9 +28,13 @@
         AtInput,
     },
     props: {
+        // 表单数据资源(表单组件内部机制专用)
+        itemRes: Object,
+        // 输入框类型,text、number、password、phone、idcard、digit
         type: String,
+        // 占位提示
         placeholder: String,
-        itemData: Object,
     },
+    mounted() {},
 };
 </script>
\ No newline at end of file

--
Gitblit v1.9.1