From ac39a7b17e33b38a9430a16a5ffa2d2c6cb90f1d Mon Sep 17 00:00:00 2001 From: wangyufei <2267742828@qq.com> Date: Wed, 19 Jun 2024 17:38:56 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=A1=E5=88=92=E5=A4=96=E5=85=A5=E5=BA=93?= =?UTF-8?q?=E3=80=81=E3=80=81=E4=BE=9B=E5=BA=94=E5=95=86=E5=8F=91=E7=A5=A8?= =?UTF-8?q?=E5=8B=BE=E9=80=89=E9=A2=9C=E8=89=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Table/src/Table.vue | 14 +++++++++++++- .../unplannedreceiptRequestMain/index.vue | 3 +++ .../supplierinvoiceRequestMain/index.vue | 1 + 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/src/components/Table/src/Table.vue b/src/components/Table/src/Table.vue index 66d3e644e..ba06a3cce 100644 --- a/src/components/Table/src/Table.vue +++ b/src/components/Table/src/Table.vue @@ -61,6 +61,7 @@ export default defineComponent({ default: () => [] }, searchTableSelectionsList:[],//回显列表 + selectionColor: propTypes.bool.def(false), }, emits: ['update:pageSize', 'update:currentPage', 'register', 'update:sort','getSelectionRows'], setup(props, { attrs, slots, emit, expose }) { @@ -369,6 +370,13 @@ export default defineComponent({ ) } + const selectionBg = ({row}) => { + if (unref(getProps).selectionColor&&elTableRef.value?.getSelectionRows().includes(row)) { + return 'selectionRow' + } + return 'tableRow' + } + return () => (