import { Accessor, For, Match, Show, Switch } from "solid-js" import { Cell } from "./Cell"; import { useTableContext } from "."; import { TableStore, ColumnProps } from '.'; type BodyProps = { data: TableStore, } type RowProps = { store: TableStore, data: any, index: number } export function Row (props: RowProps) { const ctx: any = useTableContext(); const onRowClick = () => { if (props.data._type === 'expandChildren') { return; } // 设置了highlight属性才能进行高亮 if (ctx && ctx.highlight) { ctx.onSelectRow(props.data); } } const classList = () => ({ 'cm-table-row': true, 'cm-table-row-selected': props.data._highlight }) const rowStyle = () => ({ display: props.data._show ? '' : 'none' }) return