소스 검색

chore(useCustomRow): 消除find tr函数类型错误

invalid w 1 년 전
부모
커밋
ba5809669d
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      src/components/Table/src/hooks/useCustomRow.ts

+ 2 - 2
src/components/Table/src/hooks/useCustomRow.ts

@@ -47,9 +47,9 @@ export function useCustomRow(
           const isCheckbox = rowSelection.type === 'checkbox';
           if (isCheckbox) {
             // 找到tr
-            const tr: HTMLElement = (e as MouseEvent)
+            const tr = (e as MouseEvent)
               .composedPath?.()
-              .find((dom: HTMLElement) => dom.tagName === 'TR') as HTMLElement;
+              .find((dom) => (dom as HTMLElement).tagName === 'TR') as HTMLElement;
             if (!tr) return;
             // 找到Checkbox,检查是否为disabled
             const checkBox = tr.querySelector('input[type=checkbox]');