querySelector容错处理

This commit is contained in:
yangchch6 2019-07-10 16:44:53 +08:00
parent 41d077f9b8
commit 26a6b94041
4 changed files with 41993 additions and 43106 deletions

View File

@ -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");
}
}

85093
dist/demo.js vendored

File diff suppressed because one or more lines are too long

2
dist/demo.js.map vendored

File diff suppressed because one or more lines are too long

View File

@ -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");
}
}