From f62ee66cb4b0627760a37013d8e6c98b6327c674 Mon Sep 17 00:00:00 2001 From: zhangdaiscott Date: Thu, 31 Aug 2023 10:20:13 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90issues/726=E3=80=91JPopup=E7=BB=84?= =?UTF-8?q?=E4=BB=B6=E9=87=8C=E7=9A=84=E8=A1=A8=E6=A0=BC=E5=85=A8=E9=80=89?= =?UTF-8?q?=E6=B2=A1=E6=9C=89=E9=80=89=E4=B8=AD=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/jeecg/OnLine/hooks/usePopBiz.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/components/jeecg/OnLine/hooks/usePopBiz.ts b/src/components/jeecg/OnLine/hooks/usePopBiz.ts index e8e70de..eb733e7 100644 --- a/src/components/jeecg/OnLine/hooks/usePopBiz.ts +++ b/src/components/jeecg/OnLine/hooks/usePopBiz.ts @@ -69,12 +69,12 @@ export function usePopBiz(ob, tableRef?) { /** * 选择列配置 */ - const rowSelection = reactive({ + const rowSelection = { fixed: true, selectedRowKeys: checkedKeys, selectionRows: selectRows, onChange: onSelectChange, - }); + }; /** * 序号列配置 @@ -114,18 +114,20 @@ export function usePopBiz(ob, tableRef?) { if (!selectedRowKeys || selectedRowKeys.length == 0) { selectRows.value = []; } else { + // update-begin--author:liaozhiyang---date:20230830---for:【issues/726】JPopup组件里的表格全选没有选中数据 + selectRows.value = []; for (let i = 0; i < selectedRowKeys.length; i++) { let combineKey = combineRowKey(getRowByKey(selectedRowKeys[i])); let keys = unref(checkedKeys); - if (combineKey && keys.indexOf(combineKey) < 0) { + if (combineKey && keys.indexOf(combineKey) != -1) { let row = getRowByKey(selectedRowKeys[i]); row && selectRows.value.push(row); } } + // update-end--author:liaozhiyang---date:20230830---for:【issues/726】JPopup组件里的表格全选没有选中数据 } checkedKeys.value = selectedRowKeys; } - /** * 过滤没用选项 * @param selectedRowKeys