Browse Source

feat(admin): 后台密度二期——清理2页旧硬编码+编辑页全局紧凑化

- ProductManage.vue / SpecialPriceManage.vue:.pm-table-wrap /deep/ 三处旧密度
  同步为全局新值(font-size 14→13、th 46→36、td 12→6),.pm-num 不动
- admin-tokens.css 编辑页紧凑(全局 7 处):
  弹窗 header 16/24→12/20、body 24→20、footer 12/24→10/20
  .main-wrapper .el-card__body 24→20
  新增 .el-form-item margin-bottom 22→14px(压缩约 36%)
  新增 .el-form--inline .el-form-item 10px(筛选区 inline 单独收紧)
  detail-section margin 24→16、title margin 12→8/padding-bottom 8→6
- 禁动:el-input/el-select/el-button 高度字号、el-form-item__label/content、
  表格密度一期规则、--adm-* 令牌

自检:postcss/css-tree 双解析 0 err;两 vue acorn+compiler 0 err;
diff 3 文件(两 vue 各恰 3 行);无反向(无 padding/height 变大);
冲突面快扫:ArticleEdit el-form-item 为 media-query display 不冲突,
页面级 el-card__body 为基线既有覆盖,TeacherMessages el-input__inner 已知豁免
Agnes Agent 6 days ago
parent
commit
943d5b5e6f

+ 9 - 7
cfc-web/src/styles/admin-tokens.css

@@ -172,13 +172,13 @@
 
 /* ---- 对话框 / 消息框(portal) ---- */
 .el-dialog { border-radius: var(--adm-radius-card); box-shadow: var(--adm-shadow-popup); overflow: hidden; }
-.el-dialog__header { padding: 16px 24px; border-bottom: 1px solid var(--adm-border-split); }
+.el-dialog__header { padding: 12px 20px; border-bottom: 1px solid var(--adm-border-split); }
 .el-dialog__title { font-size: 16px; font-weight: 500; line-height: 1.5; color: var(--adm-text-88); }
 .el-dialog__headerbtn { top: 16px; right: 20px; }
 .el-dialog__headerbtn .el-dialog__close { color: var(--adm-text-45); }
 .el-dialog__headerbtn .el-dialog__close:hover { color: var(--adm-primary); }
-.el-dialog__body { padding: 24px; color: var(--adm-text-88); }
-.el-dialog__footer { padding: 12px 24px; border-top: 1px solid var(--adm-border-split); }
+.el-dialog__body { padding: 20px; color: var(--adm-text-88); }
+.el-dialog__footer { padding: 10px 20px; border-top: 1px solid var(--adm-border-split); }
 .el-message-box { border-radius: var(--adm-radius-card); box-shadow: var(--adm-shadow-popup); border: none; padding-bottom: 0; }
 .el-message-box__title { font-size: 16px; font-weight: 500; color: var(--adm-text-88); }
 .el-message-box__content { padding: 16px 24px; color: var(--adm-text-65); }
@@ -262,7 +262,7 @@
 /* ---- 卡片:白底 + 1px 描边 + 8px 圆角 + 极轻阴影 ---- */
 :where(.main-wrapper) .el-card { border: 1px solid var(--adm-border-split); border-radius: var(--adm-radius-card); box-shadow: var(--adm-shadow-card); }
 :where(.main-wrapper) .el-card__header { padding: 20px 24px; border-bottom: 1px solid var(--adm-border-split); font-weight: 500; }
-:where(.main-wrapper) .el-card__body { padding: 24px; }
+:where(.main-wrapper) .el-card__body { padding: 20px; }
 
 /* ---- 页面内主按钮 ---- */
 :where(.main-wrapper) .el-button--primary { background-color: var(--adm-primary); border-color: var(--adm-primary); }
@@ -322,14 +322,16 @@
 /* ---- 分页:右下角(密度收紧一格) ---- */
 :where(.main-wrapper) .el-pagination { padding: 10px 0 0; text-align: right; font-weight: 400; flex-shrink: 0; }
 
-/* ---- 表单 ---- */
+/* ---- 表单(编辑页整体紧凑化:表单项纵向间距压缩约 36%) ---- */
 :where(.main-wrapper) .el-form-item__label { font-size: 14px; color: var(--adm-text-65); font-weight: 500; }
+:where(.main-wrapper) .el-form-item { margin-bottom: 14px; }
+:where(.main-wrapper) .el-form--inline .el-form-item { margin-bottom: 10px; }
 
 /* ---- 详情页 / 编辑页分区 ---- */
-:where(.main-wrapper) .detail-section { margin-bottom: 24px; }
+:where(.main-wrapper) .detail-section { margin-bottom: 16px; }
 :where(.main-wrapper) .detail-section-title {
   font-size: 15px; font-weight: 500; color: var(--adm-text-88);
-  margin-bottom: 12px; padding-bottom: 8px;
+  margin-bottom: 8px; padding-bottom: 6px;
   border-bottom: 1px solid var(--adm-border-split);
 }
 :where(.main-wrapper) .edit-form-footer { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--adm-border-split); text-align: right; }

+ 3 - 3
cfc-web/src/views/admin/ProductManage.vue

@@ -676,12 +676,12 @@ export default {
 .pm-table-wrap /deep/ .el-table {
   flex: 1;
   min-height: 0;
-  font-size: 14px;
+  font-size: 13px;
   border-radius: 6px;
 }
 
 .pm-table-wrap /deep/ .el-table th {
-  height: 46px;
+  height: 36px;
   padding: 0;
   background: var(--adm-bg-header);
   color: rgba(0, 0, 0, 0.88);
@@ -689,7 +689,7 @@ export default {
 }
 
 .pm-table-wrap /deep/ .el-table td {
-  padding: 12px 0;
+  padding: 6px 0;
 }
 
 /* 数值列:右对齐 + 等宽数字 */

+ 3 - 3
cfc-web/src/views/admin/SpecialPriceManage.vue

@@ -579,18 +579,18 @@ export default {
 .pm-table-wrap /deep/ .el-table {
   flex: 1;
   min-height: 0;
-  font-size: 14px;
+  font-size: 13px;
   border-radius: 6px;
 }
 .pm-table-wrap /deep/ .el-table th {
-  height: 46px;
+  height: 36px;
   padding: 0;
   background: var(--adm-bg-header);
   color: rgba(0, 0, 0, 0.88);
   font-weight: 500;
 }
 .pm-table-wrap /deep/ .el-table td {
-  padding: 12px 0;
+  padding: 6px 0;
 }
 .pm-table-wrap /deep/ .pm-num {
   font-variant-numeric: tabular-nums;