From 3b03f87a02458f719e2eb4bf112a13441b427d14 Mon Sep 17 00:00:00 2001 From: ‘chensiAb’ <‘chenchenco03@163.com’> Date: Tue, 25 Mar 2025 13:54:34 +0800 Subject: [PATCH] Merge branch 'master' of ssh://dev.zhiheiot.com:29418/mob-components --- forms/checkbox/CCheckBox.vue | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-) diff --git a/forms/checkbox/CCheckBox.vue b/forms/checkbox/CCheckBox.vue index ef4718d..aa9c01a 100644 --- a/forms/checkbox/CCheckBox.vue +++ b/forms/checkbox/CCheckBox.vue @@ -1,5 +1,8 @@ /** * CCheckBox + * 复选框组件,用于在表单中提供多选或单选功能 + * 支持两种显示模式:直接显示模式和弹窗选择模式 + * 支持两种选择类型:多选和单选 * @author Tevin */ @@ -142,9 +145,8 @@ return; } const selectedIndex = this.options.findIndex( - opt => opt.value === item + opt => opt.value === item, ); - console.log(item, selectedIndex); if (selectedIndex < 0) { return; } @@ -155,7 +157,7 @@ // 单选 else if (this.boxType === 'radio') { const next = evt[evt.length - 1]; - const selectedIndex = this.options.find(opt => opt.value === item); + const selectedIndex = this.options.findIndex(opt => opt.value === next); if (selectedIndex < 0) { this.itemRes.onChange(''); } else { -- Gitblit v1.9.1