From c27e413f71c4beb1318237fedf585770702fe3a4 Mon Sep 17 00:00:00 2001 From: Tevin <tingquanren@163.com> Date: Thu, 13 Mar 2025 10:13:57 +0800 Subject: [PATCH] 知识库文档,添加表单组件文档 --- forms/input/CInput.vue | 9 +++++---- 1 files changed, 5 insertions(+), 4 deletions(-) diff --git a/forms/input/CInput.vue b/forms/input/CInput.vue index 7c8d604..ef6e805 100644 --- a/forms/input/CInput.vue +++ b/forms/input/CInput.vue @@ -6,7 +6,7 @@ <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 +16,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 +57,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