From fdeb869c386da95150a087bc22bcebc4e57d0f76 Mon Sep 17 00:00:00 2001 From: Tevin <tingquanren@163.com> Date: Tue, 18 Mar 2025 18:16:32 +0800 Subject: [PATCH] 更新所有表单组件文档和头注释 --- 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