我尝试了其他帖子中的“解决方案”,但没有成功。 (例如,根和细胞和大小写)
xx.js
export const xxTheme = createTheme({
typography: {
fontFamily: 'xxText',
fontSize: 11,
},
tableRow: {
"&$hover:hover": { backgroundColor: "blue" }
},
tableCell: {
"$hover:hover &": { color: "pink"
}
},
hover: {},
overrides: {
MuiTableCell: {
root:{
color: xxColors.grey2,
'& .MuiCheckbox': { color: xxColors.grey2, },
"&$hover:hover" : { backgroundColor: "blue" }
},
head: {...}
tableRow: { "&$hover:hover": { backgroundColor: "cyan" }
},
},
在xxtabledoby.js
中import {Table, TableContainer} from "@material-ui/core";
import {Checkbox, TableBody, TableCell, TableRow} from "@material-ui/core";
import {xxColors} from "../styles/xx";
<TableRow
key={step.workStepId}
ref={dragProvided.innerRef}
selected={isItemSelected}
aria-checked={isItemSelected}
{...dragProvided.draggableProps}
classes={{'hover':{color:'#7EA55FF'}}}
style={{
...dragProvided.draggableProps.style,
background: snapshot.isDragging ? xxColors.blue1 : "none",
}}
>
<TableCell key={'drag'} align={'left'}>
<div {...dragProvided.dragHandleProps}>
<ReorderIcon/>
</div>
</TableCell>
需要什么需要/修复?
tia通过删除JSS条件“快照。