Skip to content

fix: table multiple=false 时单选框勾选状态不显示#961

Merged
winixt merged 1 commit into
mainfrom
fix/table-single-select-checkbox
Apr 29, 2026
Merged

fix: table multiple=false 时单选框勾选状态不显示#961
winixt merged 1 commit into
mainfrom
fix/table-single-select-checkbox

Conversation

@wanchun
Copy link
Copy Markdown
Collaborator

@wanchun wanchun commented Apr 21, 2026

修复内容

问题:Table 组件在 multiple=false 时,单选框不会显示勾选状态。

根因useTableSelect.tsclearSelect() 函数使用 .length = 0 直接修改数组,绕过了 Vue 响应式系统。

修复:改为赋值空数组 currentCheckedKeys.value = [] 触发响应式更新。

文件components/table/useTableSelect.ts


测试

  • 本地验证修复后单选框勾选状态正确显示

@winixt winixt merged commit 46d6f24 into main Apr 29, 2026
1 check passed
@winixt winixt deleted the fix/table-single-select-checkbox branch April 29, 2026 06:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants