From ab7d0c1f7fbaef2026342ffde6ac6c6f415d992a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com> Date: Wed, 9 Oct 2024 18:12:06 +0800 Subject: [PATCH] release/2.15.2.2409.01 --- pc4mobx/hrmSalary/layout.js | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/pc4mobx/hrmSalary/layout.js b/pc4mobx/hrmSalary/layout.js index f1ad9a67..fce37671 100644 --- a/pc4mobx/hrmSalary/layout.js +++ b/pc4mobx/hrmSalary/layout.js @@ -30,6 +30,7 @@ class Layout extends Component { } componentDidMount() { + this.checkData(); if (window.e9LibsConfigCustomF && _.some(window.e9LibsConfigCustomF, o => (_.some(o, k => k === "h_hrmSalary")))) { const src = "/spa/hrmSalary/hrmSalaryCalculateDetail/css/iconfont/iconfont.css"; const link = document.createElement("link"); @@ -41,8 +42,26 @@ class Layout extends Component { top.$(".ant-message").remove(); window.location.hash.indexOf("mobilepayroll") === -1 && stores.taxAgentStore.getPermission(); } + window.addEventListener("storage", this.checkData); } + componentWillUnmount() { + window.removeEventListener("storage", this.checkData); + } + + checkData = () => { + const { themeFontSize } = JSON.parse(localStorage.getItem("theme-themeInfo")) || { themeFontSize: "12" }; + if (window.location.href.indexOf("/spa/hrmSalary/") !== -1) { + const src = `/cloudstore/resource/pc/com/font-size/${themeFontSize}px.css`; + const link = document.createElement("link"); + link.setAttribute("rel", "stylesheet"); + link.setAttribute("type", "text/css"); + link.setAttribute("href", src); + let header = document.getElementById("container"); + header.appendChild(link); + } + }; + render() { return ( {this.props.children}