From 7871086349bdc018421f47bd93196e798f8ab4cd Mon Sep 17 00:00:00 2001 From: yangchch6 Date: Tue, 17 Dec 2019 11:28:06 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E5=BC=82=E6=AD=A5=E5=8A=A0=E8=BD=BDdata?= =?UTF-8?q?=EF=BC=8C=E5=9B=BA=E5=AE=9A=E5=88=97=E9=94=99=E8=A1=8C=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build/Table.js | 13 +++++-------- src/Table.js | 13 +++++-------- 2 files changed, 10 insertions(+), 16 deletions(-) diff --git a/build/Table.js b/build/Table.js index 114aa2e..3cb42f0 100644 --- a/build/Table.js +++ b/build/Table.js @@ -434,20 +434,17 @@ var Table = function (_Component) { if (this.scrollbarWidth <= 0 && this.props.scroll.y) { this.scrollbarWidth = (0, _utils.measureScrollbar)(); } - if (this.columnManager.isAnyColumnsFixed()) { - this.syncFixedTableRowHeight(); - } // console.log('this.scrollTop**********',this.scrollTop); }; Table.prototype.componentDidUpdate = function componentDidUpdate(prevProps, prevState) { - // 展开行后追加了新的DOM,必须在此阶段同步高度并重新渲染 - if (this.state.expandedRowKeys.length > 0) { - if (this.columnManager.isAnyColumnsFixed()) { - this.syncFixedTableRowHeight(); - } + // todo: IE 大数据渲染,行高不固定,且设置了 heightConsistent={true} 时,滚动加载操作会导致 ie11 浏览器崩溃 + // https://github.com/tinper-bee/bee-table/commit/bd2092cdbaad236ff89477304e58dea93325bf09 + if (this.columnManager.isAnyColumnsFixed()) { + this.syncFixedTableRowHeight(); } + //适应模态框中表格、以及父容器宽度变化的情况 if (typeof this.props.scroll.x !== 'number' && this.contentTable.getBoundingClientRect().width !== this.contentDomWidth && this.firstDid) { this.computeTableWidth(); diff --git a/src/Table.js b/src/Table.js index 20eecbc..c2d13fc 100644 --- a/src/Table.js +++ b/src/Table.js @@ -235,21 +235,18 @@ class Table extends Component { if(this.scrollbarWidth<=0 && this.props.scroll.y){ this.scrollbarWidth = measureScrollbar(); } - if (this.columnManager.isAnyColumnsFixed()) { - this.syncFixedTableRowHeight(); - } // console.log('this.scrollTop**********',this.scrollTop); } componentDidUpdate(prevProps, prevState) { - // 展开行后追加了新的DOM,必须在此阶段同步高度并重新渲染 - if (this.state.expandedRowKeys.length > 0) { - if(this.columnManager.isAnyColumnsFixed()) { - this.syncFixedTableRowHeight(); - } + // todo: IE 大数据渲染,行高不固定,且设置了 heightConsistent={true} 时,滚动加载操作会导致 ie11 浏览器崩溃 + // https://github.com/tinper-bee/bee-table/commit/bd2092cdbaad236ff89477304e58dea93325bf09 + if(this.columnManager.isAnyColumnsFixed()) { + this.syncFixedTableRowHeight(); } + //适应模态框中表格、以及父容器宽度变化的情况 if (typeof (this.props.scroll.x) !== 'number' && this.contentTable.getBoundingClientRect().width !== this.contentDomWidth && this.firstDid) { this.computeTableWidth();