diff --git a/components/apolloTable/component/Cell.tsx b/components/apolloTable/component/Cell.tsx index 96c5f8e87dd1e4292a43afa20df6e33a53018a89..9e26664fb1b7f8a7c930233d54bc3b23d818897c 100644 --- a/components/apolloTable/component/Cell.tsx +++ b/components/apolloTable/component/Cell.tsx @@ -5,6 +5,7 @@ import _ from 'lodash'; import { config } from './base/config'; import { getEditComponent, getFormat, setFormat } from './base'; import s from './Cell.less'; +import tableStyle from './Table.less'; import { CellProps, CellDataProps } from './interface'; import FormHelper from '../utils/formHelper'; import firstIcon from '../assets/first.png'; @@ -103,6 +104,20 @@ const Cell = (props: CellProps) => { } setStatus('detail'); }; + // 添加行hover样式 + const onMouseEnter = () => { + const doms = document.querySelectorAll(`.row_${rowIndex}`); + doms.forEach((dom) => { + dom.classList.add(tableStyle.hover); + }); + }; + // 去除行hover样式 + const onMouseLeave = () => { + const doms = document.querySelectorAll(`.row_${rowIndex}`); + doms.forEach((dom) => { + dom.classList.remove(tableStyle.hover); + }); + }; const selfRenderDetailCell = () => { let empty = @@ -169,6 +184,8 @@ const Cell = (props: CellProps) => { const detail = (