Skip to content

Commit

Permalink
fix: calHeight 报 Cannot read property of undefined 错误
Browse files Browse the repository at this point in the history
  • Loading branch information
Robin-front committed Jan 6, 2020
1 parent 24ebf7c commit b4a6393
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/table.vue
Original file line number Diff line number Diff line change
Expand Up @@ -550,7 +550,9 @@ export default {
if (!this.height) { return; }
const $refs = this.$refs;
const $tableFoot = $refs.tableFoot;
const $tableBodyTr = $refs.tableBody.$el.querySelector('.flex-table-tr');
const $tableBody = $refs.tableBody;
if (!$tableBody) { reutrn; }
const $tableBodyTr = $tableBody.$el.querySelector('.flex-table-tr');
const headerH = $refs.tableHeader.$el.offsetHeight;
const bodyH = $tableBodyTr ? $tableBodyTr.offsetHeight : 0;
const footH = $tableFoot ? $tableFoot.$el.offsetHeight : 0;
Expand Down

0 comments on commit b4a6393

Please sign in to comment.