Commit fcdce906 authored by chenshouchao's avatar chenshouchao

fix: 解决组件迁移造成的报错

parent 71901d71
...@@ -11681,7 +11681,7 @@ ...@@ -11681,7 +11681,7 @@
}, },
"webpack-dev-server": { "webpack-dev-server": {
"version": "4.9.0", "version": "4.9.0",
"resolved": "https://registry.npmmirror.com/webpack-dev-server/-/webpack-dev-server-4.9.0.tgz", "resolved": "https://registry.npmjs.org/webpack-dev-server/-/webpack-dev-server-4.9.0.tgz",
"integrity": "sha512-+Nlb39iQSOSsFv0lWUuUTim3jDQO8nhK3E68f//J2r5rIcp4lULHXz2oZ0UVdEeWXEh5lSzYUlzarZhDAeAVQw==", "integrity": "sha512-+Nlb39iQSOSsFv0lWUuUTim3jDQO8nhK3E68f//J2r5rIcp4lULHXz2oZ0UVdEeWXEh5lSzYUlzarZhDAeAVQw==",
"requires": { "requires": {
"@types/bonjour": "^3.5.9", "@types/bonjour": "^3.5.9",
......
...@@ -165,7 +165,7 @@ export default function EnhancedTable(props) { ...@@ -165,7 +165,7 @@ export default function EnhancedTable(props) {
style={{ width: CellWidth, textAlign: item.numeric ? "right" : "left", paddingRight: item.sort && item.numeric ? "40px" : "", boxSizing: "border-box" }} style={{ width: CellWidth, textAlign: item.numeric ? "right" : "left", paddingRight: item.sort && item.numeric ? "40px" : "", boxSizing: "border-box" }}
scope="row" scope="row"
rowSpan={(row[item.id] === 'merge') ? (rows.length - (index)) : 1} rowSpan={(row[item.id] === 'merge') ? (rows.length - (index)) : 1}
padding={item.disablePadding ? "none" : "default"} padding={item.disablePadding ? "none" : "normal"}
classes={{ classes={{
body: bodyTableCellStyle || classes.bodyTableCell, body: bodyTableCellStyle || classes.bodyTableCell,
}} }}
......
...@@ -97,7 +97,7 @@ export default function EnhancedTable(props) { ...@@ -97,7 +97,7 @@ export default function EnhancedTable(props) {
<TableContainer style={{ ...tableContainerStyle }}> <TableContainer style={{ ...tableContainerStyle }}>
<Table stickyHeader={stickyheader || false} className={classes.table} style={{ ...tableStyle }} aria-labelledby="tableTitle" size={size || "medium"} aria-label="cloudam table header" > <Table stickyHeader={stickyheader || false} className={classes.table} style={{ ...tableStyle }} aria-labelledby="tableTitle" size={size || "medium"} aria-label="cloudam table header" >
<EnhancedTableHeadComponent <EnhancedTableHeadComponent
classes={classes} classes={classes()}
{...props} {...props}
numSelected={selected.length} numSelected={selected.length}
headTableCellCheckbox={headTableCellCheckbox} headTableCellCheckbox={headTableCellCheckbox}
...@@ -143,7 +143,7 @@ export default function EnhancedTable(props) { ...@@ -143,7 +143,7 @@ export default function EnhancedTable(props) {
role="checkbox" role="checkbox"
aria-checked={isItemSelected} aria-checked={isItemSelected}
tabIndex={-1} tabIndex={-1}
key={row[param || "id"]} key={row[param || "id"] || index}
selected={isItemSelected} selected={isItemSelected}
> >
{ {
...@@ -158,7 +158,7 @@ export default function EnhancedTable(props) { ...@@ -158,7 +158,7 @@ export default function EnhancedTable(props) {
// align={} // align={}
style={{ width:CellWidth, textAlign: item.numeric ? "right" : "left", paddingRight: item.sort && item.numeric ? "40px" : "",border:tablecellstyle }} style={{ width:CellWidth, textAlign: item.numeric ? "right" : "left", paddingRight: item.sort && item.numeric ? "40px" : "",border:tablecellstyle }}
scope="row" scope="row"
padding={item.disablePadding ? "none" : "default"} padding={item.disablePadding ? "none" : "normal"}
classes={{ classes={{
body: props.bodyTableCell || classes.bodyTableCell body: props.bodyTableCell || classes.bodyTableCell
}} }}
......
...@@ -40,7 +40,7 @@ const EnhancedTableHead = (props) => { ...@@ -40,7 +40,7 @@ const EnhancedTableHead = (props) => {
<TableCell <TableCell
key={headCell.id} key={headCell.id}
style={{ width: headCell.width ? headCell.width : "", textAlign: headCell.numeric ? "right" : "left", display: headCell.id !== "checkbox" ? "" : "none" }} style={{ width: headCell.width ? headCell.width : "", textAlign: headCell.numeric ? "right" : "left", display: headCell.id !== "checkbox" ? "" : "none" }}
padding={headCell.disablePadding ? "none" : "default"} padding={headCell.disablePadding ? "none" : "normal"}
sortDirection={orderBy === headCell.id ? order : false} sortDirection={orderBy === headCell.id ? order : false}
classes={{ head:( k && headTableCell) || classes.headTableCell }} classes={{ head:( k && headTableCell) || classes.headTableCell }}
> >
......
...@@ -248,7 +248,7 @@ export default function EnhancedTable(props) { ...@@ -248,7 +248,7 @@ export default function EnhancedTable(props) {
key={k} component="th" id={labelId + k} key={k} component="th" id={labelId + k}
style={{ width:item.width || '',maxWidth:item.width || '',textAlign: item.numeric ? "right" : "left", paddingRight: item.sort && item.numeric ? "40px" : "", boxSizing: "border-box", display: item.id !== "checkbox" ? "" : "none" }} style={{ width:item.width || '',maxWidth:item.width || '',textAlign: item.numeric ? "right" : "left", paddingRight: item.sort && item.numeric ? "40px" : "", boxSizing: "border-box", display: item.id !== "checkbox" ? "" : "none" }}
scope="row" scope="row"
padding={item.disablePadding ? "none" : "default"} padding={item.disablePadding ? "none" : "normal"}
classes={{ body: props.bodyTableCell || classes.bodyTableCell }} classes={{ body: props.bodyTableCell || classes.bodyTableCell }}
> {row[item.id]} </TableCell> > {row[item.id]} </TableCell>
) )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment