From db8dce39ed0f314551d0f65a1a99f6ce2407ecaa Mon Sep 17 00:00:00 2001 From: Tevin <tingquanren@163.com> Date: Wed, 31 Mar 2021 19:48:22 +0800 Subject: [PATCH] 调整筛选组件api --- 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