523 lines
11 KiB
SCSS
523 lines
11 KiB
SCSS
@import './variables.scss';
|
||
@import './mixin.scss';
|
||
@import './transition.scss';
|
||
@import './element-ui.scss';
|
||
@import './sidebar.scss';
|
||
@import './btn.scss';
|
||
@import './vex-table.scss';
|
||
|
||
body {
|
||
height: 100%;
|
||
background-color: #f4f7f9;
|
||
font-size: 12px;
|
||
-moz-osx-font-smoothing: grayscale;
|
||
-webkit-font-smoothing: antialiased;
|
||
text-rendering: optimizeLegibility;
|
||
font-family: "Inter", "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
|
||
}
|
||
|
||
// ===== 全局紧凑化 =====
|
||
// Element UI 默认字号 14px / 行高较松,整体收紧到 13px
|
||
#app {
|
||
font-size: 12px;
|
||
}
|
||
|
||
// 表单 / 输入 / 按钮 紧凑
|
||
.el-form-item {
|
||
margin-bottom: 10px;
|
||
}
|
||
.el-form-item__label {
|
||
font-size: 12px !important;
|
||
font-weight: normal !important;
|
||
color: #606266;
|
||
line-height: 26px !important;
|
||
padding: 0 6px 0 0 !important;
|
||
}
|
||
.el-form-item--small .el-form-item__label,
|
||
.el-form-item--medium .el-form-item__label { font-size: 12px !important; line-height: 26px !important; }
|
||
.el-form-item--mini .el-form-item__label { font-size: 11px !important; line-height: 22px !important; }
|
||
.el-form-item--small.el-form-item { margin-bottom: 8px; }
|
||
.el-form-item--mini.el-form-item { margin-bottom: 6px; }
|
||
/* 全局输入控件统一压低高度(含 input/select/cascader/date/range/autocomplete) */
|
||
.el-input__inner,
|
||
.el-textarea__inner,
|
||
.el-select .el-input__inner,
|
||
.el-cascader .el-input__inner,
|
||
.el-autocomplete .el-input__inner,
|
||
.el-date-editor .el-input__inner,
|
||
.el-date-editor--daterange.el-range-editor,
|
||
.el-date-editor--datetimerange.el-range-editor,
|
||
.el-date-editor--monthrange.el-range-editor,
|
||
.el-range-editor.el-input__inner {
|
||
height: 26px !important;
|
||
line-height: 26px !important;
|
||
font-size: 12px !important;
|
||
padding: 0 8px !important;
|
||
}
|
||
.el-input--medium .el-input__inner { height: 28px !important; line-height: 28px !important; }
|
||
.el-input--small .el-input__inner { height: 26px !important; line-height: 26px !important; }
|
||
.el-input--mini .el-input__inner { height: 22px !important; line-height: 22px !important; font-size: 12px !important; }
|
||
.el-input--mini.el-input,
|
||
.el-input--mini .el-input__suffix,
|
||
.el-input--mini .el-input__prefix { line-height: 22px !important; }
|
||
.el-range-editor.el-input__inner { padding: 0 10px !important; }
|
||
.el-range-editor .el-range-input { font-size: 12px !important; height: 100% !important; line-height: 1 !important; }
|
||
.el-range-editor .el-range-separator { line-height: 24px !important; font-size: 12px !important; }
|
||
.el-input__icon { line-height: 26px !important; }
|
||
.el-input__suffix-inner .el-input__icon { line-height: 26px !important; }
|
||
/* 上面的 padding: 0 8px !important 会盖掉 element 给带图标输入框预留的 30px,
|
||
导致占位文字/内容压在前后缀图标上(如日期选择器、带搜索图标的输入框),这里补回图标位 */
|
||
.el-input--prefix .el-input__inner { padding-left: 28px !important; }
|
||
.el-input--suffix .el-input__inner { padding-right: 28px !important; }
|
||
.el-input--mini .el-input__icon { line-height: 22px !important; }
|
||
.el-form-item__content { line-height: 26px; }
|
||
|
||
/* 按钮:默认 26px 高,mini 22px,medium 28px */
|
||
.el-button {
|
||
padding: 5px 10px !important;
|
||
font-size: 12px !important;
|
||
border-radius: 4px;
|
||
line-height: 1.2;
|
||
}
|
||
.el-button--mini {
|
||
padding: 3px 8px !important;
|
||
font-size: 11px !important;
|
||
height: 22px;
|
||
line-height: 1.1;
|
||
}
|
||
.el-button--small {
|
||
padding: 4px 10px !important;
|
||
font-size: 12px !important;
|
||
height: 24px;
|
||
}
|
||
.el-button--medium {
|
||
padding: 6px 12px !important;
|
||
font-size: 12px !important;
|
||
height: 28px;
|
||
}
|
||
.el-button [class*="el-icon-"] + span {
|
||
margin-left: 3px;
|
||
}
|
||
.el-button + .el-button {
|
||
margin-left: 6px;
|
||
}
|
||
/* 文字按钮去掉额外 padding */
|
||
.el-button--text {
|
||
padding: 2px 4px !important;
|
||
}
|
||
|
||
// 表格紧凑
|
||
.el-table {
|
||
font-size: 12px;
|
||
}
|
||
.el-table th.el-table__cell > .cell,
|
||
.el-table td.el-table__cell > .cell {
|
||
padding-left: 10px;
|
||
padding-right: 10px;
|
||
}
|
||
.el-table th.el-table__cell {
|
||
padding: 6px 0;
|
||
background-color: #fafafa;
|
||
}
|
||
.el-table td.el-table__cell {
|
||
padding: 6px 0;
|
||
}
|
||
.el-table--mini th.el-table__cell,
|
||
.el-table--mini td.el-table__cell {
|
||
padding: 4px 0;
|
||
}
|
||
|
||
// 分页紧凑
|
||
.el-pagination {
|
||
padding: 6px 0;
|
||
font-size: 12px;
|
||
}
|
||
.el-pagination .btn-prev,
|
||
.el-pagination .btn-next,
|
||
.el-pagination .el-pager li {
|
||
min-width: 28px;
|
||
height: 28px;
|
||
line-height: 28px;
|
||
}
|
||
|
||
// 卡片 / 容器 紧凑
|
||
.el-card__header {
|
||
padding: 10px 16px;
|
||
font-size: 13px;
|
||
}
|
||
.el-card__body {
|
||
padding: 14px 16px;
|
||
}
|
||
.el-dialog__header {
|
||
padding: 14px 18px 10px;
|
||
}
|
||
.el-dialog__body {
|
||
padding: 16px 18px;
|
||
font-size: 12px;
|
||
}
|
||
.el-dialog__footer {
|
||
padding: 10px 18px 14px;
|
||
}
|
||
|
||
// 菜单收紧
|
||
.el-menu-item,
|
||
.el-submenu__title {
|
||
font-size: 12px;
|
||
height: 38px !important;
|
||
line-height: 38px !important;
|
||
}
|
||
|
||
// Tabs / Tags
|
||
.el-tabs__item {
|
||
height: 30px;
|
||
line-height: 30px;
|
||
font-size: 12px;
|
||
}
|
||
.el-tag {
|
||
height: 18px !important;
|
||
line-height: 16px !important;
|
||
padding: 0 6px !important;
|
||
font-size: 11px !important;
|
||
border-radius: 3px;
|
||
}
|
||
.el-tag.el-tag--mini {
|
||
height: 16px !important;
|
||
line-height: 14px !important;
|
||
padding: 0 5px !important;
|
||
font-size: 10px !important;
|
||
}
|
||
.el-tag .el-tag__close {
|
||
font-size: 11px;
|
||
transform: scale(0.85);
|
||
}
|
||
.el-checkbox__inner,
|
||
.el-radio__inner {
|
||
width: 12px;
|
||
height: 12px;
|
||
}
|
||
.el-radio__label,
|
||
.el-checkbox__label {
|
||
font-size: 12px;
|
||
padding-left: 6px;
|
||
}
|
||
|
||
// 描述列表 / 步骤
|
||
.el-descriptions__body .el-descriptions__table .el-descriptions-item__cell {
|
||
padding: 8px 12px;
|
||
font-size: 12px;
|
||
}
|
||
|
||
// 复选框 / 单选
|
||
.el-checkbox__label,
|
||
.el-radio__label {
|
||
font-size: 12px;
|
||
}
|
||
|
||
// Vben 风格:浅色侧边栏选中项
|
||
#app .sidebar-container.theme-light {
|
||
.el-menu-item,
|
||
.el-submenu__title {
|
||
border-radius: 6px;
|
||
margin: 2px 8px;
|
||
height: 40px;
|
||
line-height: 40px;
|
||
}
|
||
.el-menu-item.is-active {
|
||
background-color: #e6f4ff !important;
|
||
color: #1677ff !important;
|
||
font-weight: 500;
|
||
}
|
||
}
|
||
|
||
// 顶部导航 & 内容卡片化
|
||
.app-main {
|
||
background-color: #f4f7f9;
|
||
}
|
||
|
||
.app-container {
|
||
background-color: #ffffff;
|
||
border-radius: 8px;
|
||
box-shadow: 0 1px 2px rgba(0, 21, 41, 0.04);
|
||
}
|
||
|
||
.current-project-bar {
|
||
background: #e8f4fd;
|
||
padding: 6px 14px;
|
||
font-size: 12px;
|
||
color: #2176ae;
|
||
border-bottom: 1px solid #d0e8f8;
|
||
margin: -1px -1px 0 -1px;
|
||
border-radius: 8px 8px 0 0;
|
||
font-weight: 500;
|
||
}
|
||
|
||
// 圆角按钮/输入框
|
||
.el-input__inner,
|
||
.el-textarea__inner {
|
||
border-radius: 4px;
|
||
}
|
||
.el-card {
|
||
border-radius: 8px;
|
||
}
|
||
|
||
/* 注意:原本全局 label { font-weight: 700 } 会把所有表单 label 加粗看上去傻大,去掉 */
|
||
label {
|
||
font-weight: normal;
|
||
}
|
||
|
||
html {
|
||
height: 100%;
|
||
box-sizing: border-box;
|
||
}
|
||
|
||
#app {
|
||
height: 100%;
|
||
}
|
||
|
||
*,
|
||
*:before,
|
||
*:after {
|
||
box-sizing: inherit;
|
||
}
|
||
|
||
.no-padding {
|
||
padding: 0px !important;
|
||
}
|
||
|
||
.padding-content {
|
||
padding: 4px 0;
|
||
}
|
||
|
||
a:focus,
|
||
a:active {
|
||
outline: none;
|
||
}
|
||
|
||
a,
|
||
a:focus,
|
||
a:hover {
|
||
cursor: pointer;
|
||
color: inherit;
|
||
text-decoration: none;
|
||
}
|
||
|
||
div:focus {
|
||
outline: none;
|
||
}
|
||
|
||
.fr {
|
||
float: right;
|
||
}
|
||
|
||
.fl {
|
||
float: left;
|
||
}
|
||
|
||
.pr-5 {
|
||
padding-right: 5px;
|
||
}
|
||
|
||
.pl-5 {
|
||
padding-left: 5px;
|
||
}
|
||
|
||
.block {
|
||
display: block;
|
||
}
|
||
|
||
.pointer {
|
||
cursor: pointer;
|
||
}
|
||
|
||
.inlineBlock {
|
||
display: block;
|
||
}
|
||
|
||
.clearfix {
|
||
&:after {
|
||
visibility: hidden;
|
||
display: block;
|
||
font-size: 0;
|
||
content: " ";
|
||
clear: both;
|
||
height: 0;
|
||
}
|
||
}
|
||
|
||
aside {
|
||
background: #eef1f6;
|
||
padding: 8px 24px;
|
||
margin-bottom: 20px;
|
||
border-radius: 2px;
|
||
display: block;
|
||
line-height: 32px;
|
||
font-size: 16px;
|
||
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
|
||
color: #2c3e50;
|
||
-webkit-font-smoothing: antialiased;
|
||
-moz-osx-font-smoothing: grayscale;
|
||
|
||
a {
|
||
color: #337ab7;
|
||
cursor: pointer;
|
||
|
||
&:hover {
|
||
color: rgb(32, 160, 255);
|
||
}
|
||
}
|
||
}
|
||
|
||
//main-container全局样式
|
||
.app-container {
|
||
padding: 12px 14px;
|
||
}
|
||
|
||
.components-container {
|
||
margin: 30px 50px;
|
||
position: relative;
|
||
}
|
||
|
||
.pagination-container {
|
||
margin-top: 30px;
|
||
}
|
||
|
||
.text-center {
|
||
text-align: center
|
||
}
|
||
|
||
.sub-navbar {
|
||
height: 50px;
|
||
line-height: 50px;
|
||
position: relative;
|
||
width: 100%;
|
||
text-align: right;
|
||
padding-right: 20px;
|
||
transition: 600ms ease position;
|
||
background: linear-gradient(90deg, rgba(32, 182, 249, 1) 0%, rgba(32, 182, 249, 1) 0%, rgba(33, 120, 241, 1) 100%, rgba(33, 120, 241, 1) 100%);
|
||
|
||
.subtitle {
|
||
font-size: 20px;
|
||
color: #fff;
|
||
}
|
||
|
||
&.draft {
|
||
background: #d0d0d0;
|
||
}
|
||
|
||
&.deleted {
|
||
background: #d0d0d0;
|
||
}
|
||
}
|
||
|
||
.link-type,
|
||
.link-type:focus {
|
||
color: #337ab7;
|
||
cursor: pointer;
|
||
|
||
&:hover {
|
||
color: rgb(32, 160, 255);
|
||
}
|
||
}
|
||
|
||
.filter-container {
|
||
padding-bottom: 10px;
|
||
|
||
.filter-item {
|
||
display: inline-block;
|
||
vertical-align: middle;
|
||
margin-bottom: 10px;
|
||
}
|
||
}
|
||
/* 旧的按钮缩小块已合并到顶部 .el-button 主样式,这里不再重复 */
|
||
.el-button-group > .el-button {
|
||
padding-left: 8px !important;
|
||
padding-right: 8px !important;
|
||
}
|
||
|
||
/* 列表页搜索表单紧凑模式(加 class="compact-search" 即可生效) */
|
||
.compact-search.el-form--inline {
|
||
margin-bottom: 8px;
|
||
}
|
||
.compact-search .el-form-item {
|
||
margin-bottom: 8px;
|
||
margin-right: 12px;
|
||
}
|
||
.compact-search .el-form-item__label {
|
||
font-size: 12px;
|
||
font-weight: normal;
|
||
color: #606266;
|
||
line-height: 28px;
|
||
padding-right: 6px;
|
||
}
|
||
.compact-search .el-form-item__content {
|
||
line-height: 28px;
|
||
}
|
||
.compact-search .el-input--mini .el-input__inner,
|
||
.compact-search .el-select .el-input__inner,
|
||
.compact-search .el-date-editor .el-input__inner,
|
||
.compact-search .el-range-editor .el-range-input {
|
||
height: 28px;
|
||
line-height: 28px;
|
||
font-size: 12px;
|
||
}
|
||
.compact-search .el-range-editor.el-input__inner {
|
||
padding: 0 8px;
|
||
}
|
||
|
||
/* compact-search 进一步收紧 */
|
||
.compact-search .el-form-item__label {
|
||
font-size: 11px !important;
|
||
line-height: 26px !important;
|
||
padding-right: 4px !important;
|
||
}
|
||
.compact-search .el-form-item__content,
|
||
.compact-search .el-input--mini,
|
||
.compact-search .el-select,
|
||
.compact-search .el-date-editor {
|
||
font-size: 11px !important;
|
||
}
|
||
.compact-search .el-input--mini .el-input__inner,
|
||
.compact-search .el-select .el-input__inner,
|
||
.compact-search .el-date-editor .el-input__inner,
|
||
.compact-search .el-range-editor .el-range-input {
|
||
height: 26px !important;
|
||
line-height: 26px !important;
|
||
font-size: 11px !important;
|
||
}
|
||
.compact-search .el-form-item {
|
||
margin-bottom: 4px !important;
|
||
margin-right: 8px !important;
|
||
}
|
||
.compact-search .el-button--mini {
|
||
padding: 5px 10px !important;
|
||
font-size: 11px !important;
|
||
}
|
||
|
||
/* 紧凑型 tabs(class="compact-tabs") */
|
||
.compact-tabs.el-tabs {
|
||
margin-bottom: 6px;
|
||
}
|
||
.compact-tabs .el-tabs__header {
|
||
margin-bottom: 6px;
|
||
}
|
||
.compact-tabs .el-tabs__nav-wrap::after {
|
||
height: 1px;
|
||
}
|
||
.compact-tabs .el-tabs__item {
|
||
height: 28px;
|
||
line-height: 28px;
|
||
font-size: 12px;
|
||
padding: 0 12px;
|
||
}
|
||
.compact-tabs .el-tabs__active-bar {
|
||
height: 2px;
|
||
}
|
||
|
||
/* 加急行高亮(用于备注含 "急" 的未完成单据) */
|
||
.el-table .row-urgent > td.el-table__cell {
|
||
background: #fff1f0 !important;
|
||
}
|
||
.el-table .row-urgent:hover > td.el-table__cell {
|
||
background: #ffd8d6 !important;
|
||
}
|