|
@ -122,11 +122,6 @@ export class Operator extends Base { |
|
|
this.table.store.location.middleScrollWidth = tableElement.getElementsByClassName('q-table__middle')[0]?.scrollWidth; |
|
|
this.table.store.location.middleScrollWidth = tableElement.getElementsByClassName('q-table__middle')[0]?.scrollWidth; |
|
|
this.table.store.location.columnHeadHeight = tableElement.getElementsByTagName('thead')[0]?.clientHeight; |
|
|
this.table.store.location.columnHeadHeight = tableElement.getElementsByTagName('thead')[0]?.clientHeight; |
|
|
this.table.store.location.hideHeaderNoDataHeight = tableElement.getElementsByClassName('q-table__middle')[0]?.clientHeight; |
|
|
this.table.store.location.hideHeaderNoDataHeight = tableElement.getElementsByClassName('q-table__middle')[0]?.clientHeight; |
|
|
const scrollHeight = tableElement.getElementsByClassName('q-table__middle')[0]?.scrollHeight; |
|
|
|
|
|
if (scrollHeight > this.table.store.location.hideHeaderNoDataHeight) { |
|
|
|
|
|
// 存在纵向滚动条
|
|
|
|
|
|
this.table.store.existYScroll = true; |
|
|
|
|
|
} |
|
|
|
|
|
// 判断是否有数据,没数据修改 middleHeight
|
|
|
// 判断是否有数据,没数据修改 middleHeight
|
|
|
if ((this.table.rows && this.table.rows.length > 0) || this.props.hideBottom) { |
|
|
if ((this.table.rows && this.table.rows.length > 0) || this.props.hideBottom) { |
|
|
this.table.store.location.middleHeight = tableElement.getElementsByClassName('q-table__middle')[0]?.clientHeight; |
|
|
this.table.store.location.middleHeight = tableElement.getElementsByClassName('q-table__middle')[0]?.clientHeight; |
|
@ -134,7 +129,6 @@ export class Operator extends Base { |
|
|
let scrollHeight = 0; |
|
|
let scrollHeight = 0; |
|
|
if (this.table.store.location.middleScrollWidth - this.table.store.location.middleWidth > 0) { |
|
|
if (this.table.store.location.middleScrollWidth - this.table.store.location.middleWidth > 0) { |
|
|
scrollHeight = 15; |
|
|
scrollHeight = 15; |
|
|
this.table.store.existXScroll = true; |
|
|
|
|
|
} |
|
|
} |
|
|
this.table.store.location.middleHeight = this.table.store.location.columnHeadHeight + scrollHeight; |
|
|
this.table.store.location.middleHeight = this.table.store.location.columnHeadHeight + scrollHeight; |
|
|
} |
|
|
} |
|
@ -174,13 +168,6 @@ export class Operator extends Base { |
|
|
this.table.store.location.middleScrollWidth = tableElement.getElementsByClassName('q-table__middle')[0]?.scrollWidth; |
|
|
this.table.store.location.middleScrollWidth = tableElement.getElementsByClassName('q-table__middle')[0]?.scrollWidth; |
|
|
this.table.store.location.columnHeadHeight = tableElement.getElementsByTagName('thead')[0]?.clientHeight; |
|
|
this.table.store.location.columnHeadHeight = tableElement.getElementsByTagName('thead')[0]?.clientHeight; |
|
|
this.table.store.location.hideHeaderNoDataHeight = tableElement.getElementsByClassName('q-table__middle')[0]?.clientHeight; |
|
|
this.table.store.location.hideHeaderNoDataHeight = tableElement.getElementsByClassName('q-table__middle')[0]?.clientHeight; |
|
|
const scrollHeight = tableElement.getElementsByClassName('q-table__middle')[0]?.scrollHeight; |
|
|
|
|
|
if (scrollHeight > this.table.store.location.hideHeaderNoDataHeight) { |
|
|
|
|
|
// 存在纵向滚动条
|
|
|
|
|
|
this.table.store.existYScroll = true; |
|
|
|
|
|
} else { |
|
|
|
|
|
this.table.store.existYScroll = false; |
|
|
|
|
|
} |
|
|
|
|
|
// 判断是否有数据,没数据修改 middleHeight
|
|
|
// 判断是否有数据,没数据修改 middleHeight
|
|
|
if (this.table?.rows?.length > 0 || this.props.hideBottom) { |
|
|
if (this.table?.rows?.length > 0 || this.props.hideBottom) { |
|
|
this.table.store.location.middleHeight = tableElement.getElementsByClassName('q-table__middle')[0]?.clientHeight; |
|
|
this.table.store.location.middleHeight = tableElement.getElementsByClassName('q-table__middle')[0]?.clientHeight; |
|
@ -188,9 +175,6 @@ export class Operator extends Base { |
|
|
let scrollHeight = 0; |
|
|
let scrollHeight = 0; |
|
|
if (this.table.store.location.middleScrollWidth - this.table.store.location.middleWidth > 0) { |
|
|
if (this.table.store.location.middleScrollWidth - this.table.store.location.middleWidth > 0) { |
|
|
scrollHeight = 15; |
|
|
scrollHeight = 15; |
|
|
this.table.store.existXScroll = true; |
|
|
|
|
|
} else { |
|
|
|
|
|
this.table.store.existXScroll = false; |
|
|
|
|
|
} |
|
|
} |
|
|
this.table.store.location.middleHeight = this.table.store.location.columnHeadHeight + scrollHeight; |
|
|
this.table.store.location.middleHeight = this.table.store.location.columnHeadHeight + scrollHeight; |
|
|
} |
|
|
} |
|
|