yxh
115 分钟以前 c75027743ea7c3ecc2d0885f01d11d2ad78679a3
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
// ============================================================
// 组件默认外观(静态令牌层)
// ------------------------------------------------------------
// 目的:不改任何业务页面模板,用全局样式把 Element 的默认观感
//       统一成"紧凑、清爽、专业"的一套。
// 重点:表格(斑马纹/去竖线/表头底色)、表单、按钮、弹窗、标签。
// 顺序:必须晚于 element-ui 与 ruoyi.scss(见 main.js)。
// ============================================================
 
// ---------- 全局排版 ----------
body {
  font-family: var(--opo-font-family-base);
  font-size: var(--opo-font-size-base);
  color: var(--opo-text-primary);
  background-color: var(--opo-bg-page);
}
 
// 覆盖 index.scss 里的 label { font-weight: 700 }
label {
  font-weight: 400;
}
 
.app-container {
  // 2026-10-22:统一收紧为 8/12/12(原 12/16),全站列表页一致
  padding: 8px 12px 12px;
}
 
// 数字类字段(金额/编号/身份证)可用此类获得等宽数字
.opo-number {
  font-family: var(--opo-font-family-number);
  font-variant-numeric: tabular-nums;
}
 
// ---------- 表格 ----------
// 2026-10-22:数据行字号与表头统一(14px / 常规字重)
// 注意:全局 size=small 会让每个表格带上 .el-table--small,
// Element 用它把字号写回 12px、单元格 padding 写回 8px,
// 所以这里必须同时提高选择器特异性,否则会被压回去。
.el-table,
.el-table.el-table--small,
.el-table.el-table--medium,
.el-table.el-table--mini,
.el-table.el-table--large {
  color: var(--opo-text-primary);
  font-size: var(--opo-font-size-sm);
}
 
.el-table {
  th,
  th.el-table__cell {
    background-color: var(--opo-bg-thead) !important;
    color: var(--opo-text-primary);
    // 表头不加粗(2026-10-22 反馈)
    font-weight: 400;
    font-size: var(--opo-font-size-sm);
    height: 40px;
    padding: 0;
  }
 
  td,
  td.el-table__cell,
  &.el-table--small td.el-table__cell,
  &.el-table--medium td.el-table__cell,
  &.el-table--mini td.el-table__cell {
    padding: 9px 0;
    // 行分隔线(2026-10-22 再加深一档)
    border-bottom: 1px solid var(--opo-table-border, #c8cfd8);
  }
 
  // 表格底部那条线
  &::before {
    background-color: var(--opo-table-border, #c8cfd8);
  }
 
  // 带边框的表格,外框线
  &.el-table--border {
    border-color: var(--opo-table-border, #c8cfd8);
  }
 
  .cell {
    line-height: 23px;
  }
 
  // 表头与内容区的分隔线(比行线再深一点,作为分界)
  .el-table__header-wrapper th {
    border-bottom: 1px solid var(--opo-table-border-strong, #b7c0cc);
  }
 
  // 斑马纹:用 CSS 实现,无需给 162 个表格逐个加 stripe 属性
  .el-table__body tr:nth-child(2n) > td,
  .el-table__body tr:nth-child(2n) > td.el-table__cell {
    background-color: var(--opo-bg-stripe);
  }
 
  // 鼠标行高亮(覆盖斑马纹;Element 默认 hover 色偏灰)
  .el-table__body tr:hover > td,
  .el-table__body tr:hover > td.el-table__cell {
    background-color: var(--opo-primary-light-95, #f5f9fd);
  }
 
  // 去掉竖线:border 属性仍保留在模板里,这里只让它在视觉上消失
  &.el-table--border td,
  &.el-table--border th,
  &.el-table--border th.el-table__cell,
  &.el-table--border td.el-table__cell {
    border-right: none;
  }
 
  &.el-table--border::after,
  &.el-table--group::after {
    display: none;
  }
 
  .el-table__empty-text {
    color: var(--opo-text-placeholder);
    font-size: var(--opo-font-size-sm);
  }
}
 
// 需要"强网格线"的明细录入表:模板上加 class="table-bordered" 即可恢复
.el-table.table-bordered {
  border: 1px solid var(--opo-table-border, #c8cfd8);
 
  td,
  th,
  td.el-table__cell,
  th.el-table__cell {
    border-right: 1px solid var(--opo-table-border, #c8cfd8);
  }
}
 
// 表格内按钮更紧凑,避免把行撑高
.el-table .el-button--mini,
.el-table .el-button--small {
  padding: 5px 8px;
}
 
// ---------- 表单 ----------
// 查询条件/表单整体收紧:Element 默认 margin-bottom 22px,行距明显偏大
.el-form-item {
  margin-bottom: 12px;
 
  &__label {
    font-weight: 400;
    color: var(--opo-text-regular);
    // 标签保持 14px:查询区大量使用 label-width="68px"/"70px",
    // 标签若随正文升到 16px,4 个字(如"捐献案例")就会换行、行高翻倍
    font-size: var(--opo-font-size-sm);
    padding-right: 8px;
    line-height: 32px;
  }
 
  &__content {
    line-height: 32px;
    min-height: 32px;
  }
 
  &.is-required:not(.is-no-asterisk) > .el-form-item__label:before {
    color: var(--opo-danger);
  }
 
  &__error {
    font-size: var(--opo-font-size-xs);
    line-height: 1.4;
    padding-top: 2px;
  }
}
 
// 横向排列的查询条件再紧凑一档
.el-form--inline .el-form-item {
  margin-right: 12px;
  margin-bottom: 8px;
}
 
// ---------- 紧凑查询区(opt-in) ----------
// 用法:给查询用的 el-form 加 class="opo-query-form"(列表页统一约定)
// 行距 8→4px、标签与控件对齐、最后一行(搜索/重置)去掉下边距
.opo-query-form {
  // 查询条件与下方"新增/导出"工具栏(对表格的操作)之间留出间距
  margin-bottom: 12px;
 
  .el-form-item {
    margin-right: 8px;
    margin-bottom: 4px;
  }
 
  .el-form-item__label {
    line-height: 32px;
    padding-right: 6px;
  }
 
  .el-form-item__content {
    line-height: 32px;
    min-height: 32px;
  }
 
  // 最后一行通常是"搜索/重置",不再额外留白
  > .el-row:last-child .el-form-item {
    margin-bottom: 0;
  }
}
 
// 紧跟查询区之后的工具栏行(新增/导出):贴近表格,与查询区由 margin-bottom 隔开
.opo-query-form + .el-row.mb8 {
  margin-bottom: 4px;
}
 
// 页面里的查询区常包在卡片或 el-row 中,去掉多余的外层留白
.el-card__body > .el-form:first-child,
.el-card__body > .el-row:first-child .el-form {
  margin-bottom: 0;
}
 
.el-input__inner,
.el-textarea__inner {
  border-radius: var(--opo-radius-base);
  color: var(--opo-text-primary);
 
  &::placeholder {
    color: var(--opo-text-placeholder);
  }
}
 
// ---------- 按钮 ----------
.el-button {
  border-radius: var(--opo-radius-base);
  font-weight: 400;
 
  [class*='el-icon-'] + span {
    margin-left: 4px;
  }
}
 
// 小/迷你按钮的字号在 Element 里是硬编码 12px,随正文一起上调(2026-10-22 再大一号 → 16px)
.el-button--small,
.el-button--mini {
  font-size: var(--opo-font-size-base);
}
 
// ---------- 弹窗 ----------
.el-dialog {
  border-radius: var(--opo-radius-lg);
  box-shadow: var(--opo-shadow-lg);
  overflow: hidden;
 
  &__header {
    padding: 16px 20px 12px;
    border-bottom: 1px solid var(--opo-border-light);
  }
 
  &__title {
    font-size: var(--opo-font-size-lg);
    font-weight: 600;
    color: var(--opo-text-primary);
  }
 
  &__body {
    padding: 16px 20px;
    color: var(--opo-text-regular);
  }
 
  &__footer {
    padding: 12px 20px 16px;
    border-top: 1px solid var(--opo-border-light);
  }
}
 
.el-drawer__header {
  padding: 16px 20px;
  margin-bottom: 0;
  border-bottom: 1px solid var(--opo-border-light);
  color: var(--opo-text-primary);
  font-weight: 600;
}
 
// ---------- 标签 ----------
.el-tag {
  border-radius: var(--opo-radius-sm);
  font-size: var(--opo-font-size-xs);
}
 
// ---------- 卡片 ----------
.el-card {
  border-radius: var(--opo-radius-lg);
  border-color: var(--opo-border-light);
  box-shadow: var(--opo-shadow-sm) !important;
 
  &__header {
    padding: 14px 16px 10px;
    border-bottom: 1px solid var(--opo-border-light);
    font-weight: 600;
    color: var(--opo-text-primary);
  }
 
  &__body {
    padding: 12px 16px;
  }
}
 
// ---------- 分页 ----------
// Element 把分页文字写死 13px、字重 700,和 16px 的表格正文不搭 → 统一 14px/常规
.el-pagination {
  font-weight: 400;
  color: var(--opo-text-regular);
  font-size: var(--opo-font-size-sm);
 
  button,
  span:not([class*='suffix']) {
    font-size: var(--opo-font-size-sm);
  }
 
  .el-pager li {
    font-size: var(--opo-font-size-sm);
  }
}
 
.pagination-container {
  margin-top: 12px;
  height: auto;
  padding: 8px 16px !important;
}
 
// ---------- 面包屑 / 页签 ----------
.el-breadcrumb {
  font-size: var(--opo-font-size-sm);
 
  &__inner,
  &__inner a {
    font-weight: 400 !important;
    color: var(--opo-text-secondary);
  }
 
  &__item:last-child .el-breadcrumb__inner {
    color: var(--opo-text-primary);
  }
}
 
// ---------- 提示 / 消息 ----------
.el-message {
  border-radius: var(--opo-radius-base);
  box-shadow: var(--opo-shadow-md);
}
 
.el-tooltip__popper {
  font-size: var(--opo-font-size-xs);
}
 
// ---------- 滚动条(观感细节) ----------
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
 
::-webkit-scrollbar-thumb {
  background-color: rgba(0, 0, 0, 0.18);
  border-radius: var(--opo-radius-pill);
 
  &:hover {
    background-color: rgba(0, 0, 0, 0.28);
  }
}
 
::-webkit-scrollbar-track {
  background-color: transparent;
}