From 0396d398bea811f5650d04ce5b55a232b4f58b98 Mon Sep 17 00:00:00 2001 From: Tevin <tingquanren@163.com> Date: Thu, 27 Mar 2025 17:07:52 +0800 Subject: [PATCH] 移除 link-rules --- forms/input/CInput.vue | 11 +++++++---- 1 files changed, 7 insertions(+), 4 deletions(-) diff --git a/forms/input/CInput.vue b/forms/input/CInput.vue index 7c8d604..d20866e 100644 --- a/forms/input/CInput.vue +++ b/forms/input/CInput.vue @@ -1,12 +1,14 @@ /** * CInput - 表单项,文本输入框 + * 用于在表单中收集用户的文本输入 + * 支持多种输入类型,可以设置占位提示文本,并且支持显示单位标识 * @author Tevin */ <template> <view class="c-input" - :class="[unit?'c-input-unit':'', readOnly ? 'read-only':'']" + :class="[unit?'c-input-unit':'', readOnly?'read-only':'']" > <AtInput :name="itemRes.name" @@ -16,8 +18,9 @@ :required="itemRes.required" :error="itemRes.error" :cursorSpacing="0" + :cursor="-1" :value="value" - :onChange="evt => hanldeChange(evt)" + :onChange="evt => handleChange(evt)" > <slot v-if="!unit" /> <text @@ -56,12 +59,12 @@ value() { return ((this.itemRes.formData[this.itemRes.name] || '') + '').replace( /[\n\r]/g, - '' + '', ); }, }, methods: { - hanldeChange(evt) { + handleChange(evt) { // 去除首尾空格,小程序中还可以粘贴换行符进来 const changeValue = ((evt || '') + '') .replace(/^\s+|\s+$/g, '') -- Gitblit v1.9.1