Files
writeOff/frontend/src/constants/ui.ts
T
2026-05-29 10:38:34 +08:00

53 lines
1.3 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/**
* UI 常量 — 弹窗/抽屉尺寸 & 表单控件标准宽度
* P0-03 & P0-04
*/
/** Drawer 标准宽度档位 */
export const DRAWER_SIZE = {
/** 480px — 简单表单(新增角色、基本信息等) */
sm: "480px",
/** 640px — 中等表单(用户编辑、策略编辑等) */
md: "640px",
/** 55% — 稍大表单(项目编辑、详情预览等) */
xl: "55%",
/** 80% — 大型内容(银行卡列表、资料详情等) */
lg: "80%",
} as const;
/** Dialog 标准宽度档位 */
export const DIALOG_WIDTH = {
/** 520px — 简单确认/输入 */
sm: "520px",
/** 680px — 中等表单/列表 */
md: "680px",
/** 860px — 大型复杂表单 */
lg: "860px",
} as const;
/** 表单控件标准宽度档位 */
export const INPUT_WIDTH = {
/** 100px — 极窄(比较符等) */
xs: "100px",
/** 160px — 搜索栏下拉/状态选择 */
sm: "160px",
/** 220px — 标准表单下拉 */
md: "220px",
/** 280px — 宽表单下拉 */
lg: "280px",
/** 100% — 充满父容器 */
full: "100%",
} as const;
/** 标准 label-widthel-form */
export const LABEL_WIDTH = {
/** 简洁表单 */
sm: "70px",
/** 标准表单 */
md: "90px",
/** 宽标签表单 */
lg: "110px",
/** 超宽标签表单 */
pro: "140px",
} as const;