diff --git a/src/table/hooks/useRowSelect.tsx b/src/table/hooks/useRowSelect.tsx index 59a8d2ee01..3d40794479 100644 --- a/src/table/hooks/useRowSelect.tsx +++ b/src/table/hooks/useRowSelect.tsx @@ -24,7 +24,7 @@ export default function useRowSelect( props: TdPrimaryTableProps, tableSelectedClasses: TableClassName['tableSelectedClasses'], ) { - const { selectedRowKeys, columns, rowKey, data, pagination, reserveSelectedRowOnPaginate } = toRefs(props); + const { selectedRowKeys, columns, rowKey, data, reserveSelectedRowOnPaginate } = toRefs(props); const currentPaginateData = ref(data.value); const selectedRowClassNames = ref(); const [tSelectedRowKeys, setTSelectedRowKeys] = useDefaultValue( @@ -54,18 +54,6 @@ export default function useRowSelect( return singleSelectCol.checkProps.allowUncheck; }); - watch( - [data, pagination, reserveSelectedRowOnPaginate], - () => { - if (reserveSelectedRowOnPaginate.value) return; - const { pageSize, current, defaultPageSize, defaultCurrent } = pagination.value; - const tPageSize = pageSize || defaultPageSize; - const tCurrent = current || defaultCurrent; - currentPaginateData.value = data.value.slice(tPageSize * (tCurrent - 1), tPageSize * tCurrent); - }, - { immediate: true }, - ); - watch( [data, columns, tSelectedRowKeys, selectColumn, rowKey], () => { diff --git a/src/table/thead.tsx b/src/table/thead.tsx index d02a09e060..a3416560db 100644 --- a/src/table/thead.tsx +++ b/src/table/thead.tsx @@ -144,6 +144,7 @@ export default defineComponent({ const thClasses = [ thStyles.classes, customClasses, + col.thClassName, { // 受 rowspan 影响,部分 tr > th:first-child 需要补足左边框 [this.tableHeaderClasses.thBordered]: thBorderMap.get(col),