fix: retain pending Toast and Table fidelity corrections

This commit is contained in:
maoyingjie
2026-10-25 21:24:09 +08:00
parent 2ce80b17da
commit a2ca6ed0b8
42 changed files with 2153 additions and 260 deletions
+23 -1
View File
@@ -122,6 +122,23 @@ function initials(name: string) {
.map((n) => n[0])
.join("");
}
const selectableIds = computed(() =>
sortedUsers.value.map((u) => String(u.id)),
);
const allChecked = computed(
() =>
selectableIds.value.length > 0 &&
selectableIds.value.every((id) => selectedKeys.value.includes(id)),
);
const someChecked = computed(
() =>
!allChecked.value &&
selectableIds.value.some((id) => selectedKeys.value.includes(id)),
);
function toggleAll() {
selectedKeys.value = allChecked.value ? [] : [...selectableIds.value];
}
</script>
<template>
@@ -138,7 +155,12 @@ function initials(name: string) {
>
<TableHeader>
<TableColumn class="pe-0">
<Checkbox aria-label="全选">
<Checkbox
aria-label="全选"
:is-selected="allChecked"
:is-indeterminate="someChecked"
@update:checked="toggleAll"
>
<CheckboxContent>
<CheckboxControl>
<CheckboxIndicator />