Compare commits

...

2 Commits

Author SHA1 Message Date
LiuJiaNan 45bcba0f77 优化FormBuilder 2025-12-26 13:50:53 +08:00
LiuJiaNan 2b7da6d088 1.1.3 2025-12-26 13:36:51 +08:00
2 changed files with 9 additions and 4 deletions

View File

@ -1,7 +1,7 @@
{
"name": "zy-react-library",
"private": false,
"version": "1.1.2",
"version": "1.1.3",
"type": "module",
"description": "",
"author": "LiuJiaNan",

View File

@ -37,12 +37,17 @@ const FormBuilder = (props) => {
const timer = setTimeout(() => {
getPageWidth();
}, 0);
window.addEventListener("resize", getPageWidth);
if (showActionButtons) {
window.addEventListener("resize", getPageWidth);
}
return () => {
window.removeEventListener("resize", getPageWidth);
if (showActionButtons) {
window.removeEventListener("resize", getPageWidth);
}
clearTimeout(timer);
};
}, []);
}, [showActionButtons]);
const handleCancel = () => {
window.history.back();