[backend] fix: 修复异常处理和类型转换问题

This commit is contained in:
xsl
2026-01-26 11:53:40 +08:00
parent 7ccc2a6ac6
commit 83e05bf85f
28639 changed files with 2506458 additions and 93 deletions
+13
View File
@@ -0,0 +1,13 @@
import warning from "rc-util/es/warning";
import canUseDom from "rc-util/es/Dom/canUseDom";
export function parseWidthHeight(value) {
if (typeof value === 'string' && String(Number(value)) === value) {
warning(false, 'Invalid value type of `width` or `height` which should be number type instead.');
return Number(value);
}
return value;
}
export function warnCheck(props) {
warning(!('wrapperClassName' in props), "'wrapperClassName' is removed. Please use 'rootClassName' instead.");
warning(canUseDom() || !props.open, "Drawer with 'open' in SSR is not work since no place to createPortal. Please move to 'useEffect' instead.");
}