From b22223dd84a729174a5973971c08cc48d039bd1d Mon Sep 17 00:00:00 2001 From: Tevin <tingquanren@163.com> Date: Thu, 14 Apr 2022 20:44:20 +0800 Subject: [PATCH] 强化日期格式化识别能力,优化开关组件显示 --- forms/input/CInput.vue | 12 ++++++++++-- 1 files changed, 10 insertions(+), 2 deletions(-) diff --git a/forms/input/CInput.vue b/forms/input/CInput.vue index d6ea19d..ca251f7 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':''" + :class="[unit?'c-input-unit':'', readOnly ? 'read-only':'']" > <AtInput :name="itemRes.name" @@ -46,10 +46,18 @@ placeholder: String, // 输入框单位 unit: String, + // 只读模式 + readOnly: { + type: Boolean, + default: false, + }, }, computed: { value() { - return (itemRes.formData[itemRes.name] || '').replace(/[\n\r]/g, ''); + return (this.itemRes.formData[this.itemRes.name] || '').replace( + /[\n\r]/g, + '' + ); }, }, methods: { -- Gitblit v1.9.1