cmvr-wms/mobile-app/src/core/arrival-layout.ts
lixiaolong 6ae0682546 feat(workspace): 优化工作空间页面布局并改进到货管理功能
- 新增 ArrivalListTools 和 ArrivalCard 组件用于到货列表管理
- 集成 arrivalListQuery 查询逻辑优化数据加载
- 调整页面标题文字样式增加最小宽度和行高
- 更新底部标签栏字体大小和行高设置
- 重构到货操作界面添加键盘避让视图支持
- 优化到货操作按钮状态管理增加次要按钮样式
- 实现助手组件分页功能支持动态页面大小
- 扩展文件存储区域配置支持项目工作空间
- 增加文件流式上传下载方法支持大文件处理
- 优化采购表格单元格键盘输入体验
- 修复移动端到货操作界面键盘遮挡问题
- 调整测试用例数据量验证分页功能正确性
2026-10-21 15:13:39 +08:00

13 lines
563 B
TypeScript

// Native text keeps system font scaling. Adapt space around it, never double-scale
// font sizes or force all users back to the default system font size.
export function arrivalLayout(width: number, fontScale = 1) {
const screen = Number.isFinite(width) && width > 0 ? Math.min(width, 480) : 360;
const scale = Number.isFinite(fontScale) && fontScale >= 1 ? fontScale : 1;
const readableWidth = (screen - 60) / scale;
return {
stackedHeader: readableWidth < 280,
stackedDetails: readableWidth < 240,
labelWidth: Math.ceil(58 * scale),
};
}