From 4198316b1bc037800f9ece46227c5bdd7c97863f Mon Sep 17 00:00:00 2001 From: izbz wh <731215820@qq.com> Date: Tue, 9 Apr 2019 15:56:33 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20headerScrol=3Dtrue=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E9=87=8F=E5=A4=A7=E6=97=B6=EF=BC=8C=E8=A1=A8=E5=A4=B4=E5=92=8C?= =?UTF-8?q?=E8=A1=A8=E4=BD=93=E6=BB=9A=E5=8A=A8=E6=9D=A1=E9=95=BF=E5=BA=A6?= =?UTF-8?q?=E4=B8=8D=E4=B8=80=E8=87=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build/Table.js | 9 ++++----- demo/demolist/Demo2.js | 2 +- demo/demolist/Demo5.js | 2 +- demo/index.js | 2 +- dist/demo.js | 30 +++++++++++++++--------------- dist/demo.js.map | 2 +- src/Table.js | 11 +++++------ 7 files changed, 28 insertions(+), 30 deletions(-) diff --git a/build/Table.js b/build/Table.js index 39274f8..bdb1100 100644 --- a/build/Table.js +++ b/build/Table.js @@ -387,11 +387,10 @@ var Table = function (_Component) { var bodyH = this.refs.bodyTable.clientHeight; var bodyContentH = this.refs.bodyTable.querySelector('table').clientHeight; var rightBodyTable = this.refs.fixedColumnsBodyRight; - if (bodyContentH <= bodyH) { - this.refs.bodyTable.style.overflowY = 'auto'; - this.refs.headTable.style.overflowY = 'auto'; - rightBodyTable && (rightBodyTable.style.overflowY = 'auto'); - } + var overflowy = bodyContentH <= bodyH ? 'auto' : 'scroll'; + this.refs.bodyTable.style.overflowY = overflowy; + this.refs.headTable.style.overflowY = overflowy; + rightBodyTable && (rightBodyTable.style.overflowY = overflowy); } }; diff --git a/demo/demolist/Demo2.js b/demo/demolist/Demo2.js index fa5a03c..fd9d1f1 100644 --- a/demo/demolist/Demo2.js +++ b/demo/demolist/Demo2.js @@ -63,7 +63,7 @@ class Demo12 extends Component { getSelectedDataFunc = (selectedList,record,index) => { console.log("selectedList", selectedList,"index",index); // 如果在回调中增加setState逻辑,需要同步data中的_checked属性。即下面的代码 - const allChecked = selectedList.length == 0?false:true; + // const allChecked = selectedList.length == 0?false:true; // record为undefind则为全选或者全不选 // if(!record){ // data12.forEach(item=>{ diff --git a/demo/demolist/Demo5.js b/demo/demolist/Demo5.js index aede220..32572a3 100644 --- a/demo/demolist/Demo5.js +++ b/demo/demolist/Demo5.js @@ -53,7 +53,7 @@ const data5 = [ class Demo5 extends Component { render() { - return
{ title }
\n{ desc }
\n 查看源码 \n\n { code }
\n
\n {!!scss_code ?\n { scss_code }
\n
: null }\n