Compare commits
3 Commits
2a7f1326b9
...
85e185bab8
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
85e185bab8 | ||
|
|
88aa1517ef | ||
|
|
c05118c427 |
@@ -66,17 +66,9 @@ function getList() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function handleSelectionChange(selection) {
|
function handleSelectionChange(selection) {
|
||||||
|
// 直接更新选中行数据,不干涉表格UI状态
|
||||||
|
// 这样可以允许用户使用全选框功能
|
||||||
selectedRows.value = selection;
|
selectedRows.value = selection;
|
||||||
|
|
||||||
// 如果选择的行数大于1,只保留最后一行
|
|
||||||
if (selection.length > 1) {
|
|
||||||
// 清除所有选择
|
|
||||||
emrHistoryRef.value?.clearSelection();
|
|
||||||
// 只选择最后一行
|
|
||||||
const lastSelected = selection[selection.length - 1];
|
|
||||||
emrHistoryRef.value?.toggleRowSelection(lastSelected, true);
|
|
||||||
selectedRows.value = [lastSelected];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function clickRow(row) {
|
function clickRow(row) {
|
||||||
|
|||||||
Reference in New Issue
Block a user