|
|
@@ -324,11 +324,17 @@ export default {
|
|
|
|
|
|
// 委托给选择管理器处理
|
|
|
if (selectionManager && this.lifecycleManager) {
|
|
|
+ // 1. 先移除当前页面的所有选择
|
|
|
+ const currentPageIds = this.data.map(item => item.id);
|
|
|
+ currentPageIds.forEach(id => {
|
|
|
+ selectionManager.removeSelection(id);
|
|
|
+ });
|
|
|
+
|
|
|
+ // 2. 然后重新添加当前页的选择
|
|
|
selectionManager.mergeWithCurrentPage(list);
|
|
|
this.updateSelectionUI();
|
|
|
|
|
|
-
|
|
|
- // 【新增保护】当当前页选择为空时,确保avue-crud状态同步
|
|
|
+ // 当当前页选择为空时,确保avue-crud状态同步
|
|
|
if (list.length === 0) {
|
|
|
this.$nextTick(() => {
|
|
|
// 延迟检查,确保选择管理器已处理完成
|