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 () => (