Skip to content

Commit ba5b141

Browse files
committed
refactor(pages): 优化纸张尺寸显示样式
- 调整纸张尺寸信息的布局,使文本和规格描述在垂直方向上居中对齐 - 移除了 MenuItem 组件的 sx 属性,简化了样式配置
1 parent ebbc3f9 commit ba5b141

File tree

1 file changed

+15
-12
lines changed
  • src/pages/PrinterPage/components/AdjustSheets

1 file changed

+15
-12
lines changed

src/pages/PrinterPage/components/AdjustSheets/index.tsx

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -214,18 +214,21 @@ export default function AdjustSheets(props: AdjustSheetsProps) {
214214
{(size) => {
215215
const [widthCm, heightCm] = pageSizeNameToCm(size);
216216
return (
217-
<MenuItem value={size} sx={{ alignItems: 'baseline' }}>
218-
<span>{size}</span>
219-
<Typography
220-
variant="body2"
221-
color="textSecondary"
222-
component="span"
223-
sx={{
224-
marginLeft: 0.5,
225-
}}
226-
>
227-
{`(${widthCm}cm x ${heightCm}cm)`}
228-
</Typography>
217+
<MenuItem value={size}>
218+
<span>
219+
{size}
220+
<Typography
221+
variant="body2"
222+
color="textSecondary"
223+
component="span"
224+
sx={{
225+
marginLeft: 0.5,
226+
alignSelf: 'center',
227+
}}
228+
>
229+
{`(${widthCm}cm x ${heightCm}cm)`}
230+
</Typography>
231+
</span>
229232
</MenuItem>
230233
);
231234
}}

0 commit comments

Comments
 (0)