From 8a3a1dcf7615b7462ebffe092998de09c784d2ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com> Date: Thu, 2 Nov 2023 09:18:16 +0800 Subject: [PATCH] =?UTF-8?q?feature/2.9.42310.02-=E7=A4=BE=E4=BF=9D?= =?UTF-8?q?=E7=A6=8F=E5=88=A9=E6=A1=A3=E6=A1=88=E9=A1=B5=E9=9D=A2=E9=87=8D?= =?UTF-8?q?=E6=9E=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/welfareTableList/index.js | 13 ++++++++++++- .../welfareArchive/index.less | 2 -- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareTableList/index.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareTableList/index.js index 60cb2d50..b520db28 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareTableList/index.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareTableList/index.js @@ -29,10 +29,16 @@ class Index extends Component { componentDidMount() { window.addEventListener("message", this.handleReceive, false); + window.addEventListener("resize", this.handleResize, false); } + handleResize = () => { + this.forceUpdate(); + }; + componentWillUnmount() { window.removeEventListener("message", this.handleReceive, false); + window.removeEventListener("resize", this.handleResize, false); } componentWillReceiveProps(nextProps, nextContext) { @@ -107,8 +113,13 @@ class Index extends Component { render() { const { loading, dataSource } = this.state; + const dom = document.querySelector(".wea-new-top-req-content"); + let height = 280; + if (dom && dataSource.length > 0) { + height = (parseFloat(dom.style.height) > 620 && dataSource.length === 10) ? dataSource.length * 39 + 113 : parseFloat(dom.style.height) - 170; + } return ( -
+