我正在尝试使标准Material UI Table变小,或者使Material UI团队将其称为致密表。基本上,我想减小所有线条之间的距离。
如表说明中所建议,存在一个size
参数,该参数允许密集所有行。建议是这样的:
<Table size="small">
// more stuff here
</Table>
这虽然不起作用。我收到错误消息,指出Table
标记中不存在该参数。我使用NPM从Material UI中加载所有我需要的东西,这些是我正在使用的版本:
"dependencies": {
"@material-ui/core": "4.0.0",
"@material-ui/icons": "4.0.0",
"@types/jquery": "3.3.29",
"@types/material-ui": "0.21.6",
"@types/react": "16.8.7",
"@types/react-dom": "16.8.2",
"jquery": "3.3.1",
"react": "16.8.4",
"react-dom": "16.8.4",
"react-hot-loader": "4.8.0",
"tslib": "1.9.3"
},
"devDependencies": {
"babel-plugin-transform-async-to-generator": "6.24.1",
"babel-preset-env": "1.7.0",
"babel-preset-react": "6.24.1",
"typescript": "3.4.5"
}
是否确实缺少大小参数?或者是否已经建议使用一种方法来压缩表行?