release/2.15.2.2409.01

This commit is contained in:
黎永顺 2024-10-09 18:12:06 +08:00
parent 01ef84368d
commit ab7d0c1f7f
1 changed files with 19 additions and 0 deletions

View File

@ -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 (
<WeaLocaleProvider>{this.props.children}</WeaLocaleProvider>