baseline: 小军 WMS 二开代码原始快照(含 SynOABusiness.cs Debugger.Break)

This commit is contained in:
Gaussian committed 2026-11-06 18:38:38 +08:00
commit c2b0e7be0d
6522 files changed
+3530643

No files matched your search

+67
View File
@@ -0,0 +1,67 @@
export function convertPx(initialUnits){
if (!initialUnits) {
return 0;
}
let searchFlag = initialUnits.search('rpx');
if (searchFlag >= 0) {
return parseInt(initialUnits) / 2;
}
else {
searchFlag = initialUnits.search('px');
if (searchFlag >= 0) {
return parseInt(initialUnits);
}
else {
return 0;
}
}
}
export function getVerticalBoderWidth(style){
let bottomWidth = 0;
if (style.borderBottomWidth && (style.borderBottomWidth.search("px") >= 0)) {
bottomWidth = convertPx(style.borderBottomWidth);
}
else {
if (style.borderBottom && (style.borderBottom.search("px") >= 0)) {
let borderBottom = style.borderBottom.substr(0, style.borderBottom.search("px")+2);
bottomWidth = convertPx(borderBottom);
}
else {
if (style.borderWidth && (style.borderWidth.search("px") >= 0)) {
bottomWidth = convertPx(style.borderWidth);
}
else {
if (style.border && (style.border.search("px") >= 0)) {
let border = style.border.substr(0, style.border.search("px")+2);
bottomWidth = convertPx(border);
}
}
}
}
let topWidth = 0;
if (style.borderTopWidth && (style.borderTopWidth.search("px") >= 0)) {
topWidth = convertPx(style.borderTopWidth);
}
else {
if (style.borderTop && (style.borderTop.search("px") >= 0)) {
let borderTop = style.borderTop.substr(0, style.borderTop.search("px")+2);
topWidth = convertPx(borderTop);
}
else {
if (style.borderWidth && (style.borderWidth.search("px") >= 0)) {
topWidth = convertPx(style.borderWidth);
}
else {
if (style.border && (style.border.search("px") >= 0)) {
let border = style.border.substr(0, style.border.search("px")+2);
topWidth = convertPx(border);
}
}
}
}
return bottomWidth + topWidth;
}