WebApp【公共组件库】@前端(For Git Submodule)
Tevin
2025-03-27 0396d398bea811f5650d04ce5b55a232b4f58b98
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 {