From a04c83e96e6cac27b8fc9c9688100b3b06651a21 Mon Sep 17 00:00:00 2001 From: qiankanghui Date: Wed, 29 Apr 2026 09:24:31 +0800 Subject: [PATCH] =?UTF-8?q?style(port):=20=E8=B0=83=E6=95=B4=E8=A1=A8?= =?UTF-8?q?=E6=A0=BC=E5=8D=95=E5=85=83=E6=A0=BC=E6=A0=B7=E5=BC=8F=E5=92=8C?= =?UTF-8?q?=E8=BE=93=E5=85=A5=E6=A1=86=E5=B8=83=E5=B1=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 为表格添加 cell-style 属性控制单元格高度 - 为输入框组件添加 size="mini" 属性 - 新增 cellStyle 方法设置单元格内边距和固定高度 - 使用 /deep/ 选择器调整输入框宽度和垂直居中效果 - 移除过时的错误居中样式注释 --- src/views/modules/port/portTransit.vue | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/src/views/modules/port/portTransit.vue b/src/views/modules/port/portTransit.vue index a4a240a..22b6028 100644 --- a/src/views/modules/port/portTransit.vue +++ b/src/views/modules/port/portTransit.vue @@ -89,6 +89,7 @@ border style="width: 100%" height="100%" + :cell-style="cellStyle" > @@ -281,6 +283,12 @@ export default { } this.searchTable() }, + cellStyle() { + return { + padding: '8px 0', // 上下内边距,控制单元格高度 + height: '30px' // 固定高度 + } + }, // 查询列表 searchTable() { this.dataListLoading = true @@ -527,10 +535,9 @@ export default { height: 36px !important; line-height: 36px !important; } - -/* 去掉错误居中方式 */ -.centered-input { - width: 100%; +/deep/ .centered-input { + width: 80%; + margin: -5px auto 0 auto; /* 负的上边距向上移动 */ } /* 整个弹窗拉高 */ ::v-deep .upload-dialog .el-dialog {