querySelector容错处理
This commit is contained in:
parent
41d077f9b8
commit
26a6b94041
|
@ -516,7 +516,7 @@ var TableHeader = function (_Component) {
|
|||
table.ths = tableDome.getElementsByTagName("th");
|
||||
table.tr = tableDome.getElementsByTagName("tr");
|
||||
if (contentTable.querySelector('.u-table-scroll .u-table-body')) {
|
||||
table.tableBodyCols = contentTable.querySelector('.u-table-scroll .u-table-body').getElementsByTagName("col");
|
||||
table.tableBodyCols = contentTable.querySelector('.u-table-scroll .u-table-body') && contentTable.querySelector('.u-table-scroll .u-table-body').getElementsByTagName("col");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -77,7 +77,7 @@ class TableHeader extends Component {
|
|||
table.ths = tableDome.getElementsByTagName("th");
|
||||
table.tr = tableDome.getElementsByTagName("tr");
|
||||
if(contentTable.querySelector('.u-table-scroll .u-table-body')){
|
||||
table.tableBodyCols = contentTable.querySelector('.u-table-scroll .u-table-body').getElementsByTagName("col");
|
||||
table.tableBodyCols = contentTable.querySelector('.u-table-scroll .u-table-body') && contentTable.querySelector('.u-table-scroll .u-table-body').getElementsByTagName("col");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue