415 lines
6.7 KiB
CSS
415 lines
6.7 KiB
CSS
/* 统一布局样式 - 修复所有布局错乱问题 */
|
|
|
|
/* ========== 全局布局 ========== */
|
|
* {
|
|
margin: 0;
|
|
padding: 0;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
body {
|
|
font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
|
|
background: #f0f2f5;
|
|
color: #303133;
|
|
overflow: hidden;
|
|
height: 100vh;
|
|
-webkit-font-smoothing: antialiased;
|
|
-moz-osx-font-smoothing: grayscale;
|
|
}
|
|
|
|
/* ========== 布局容器 ========== */
|
|
.layout-container {
|
|
height: 100vh;
|
|
display: flex;
|
|
flex-direction: column;
|
|
overflow: hidden;
|
|
}
|
|
|
|
/* ========== 导航栏(统一) ========== */
|
|
.navbar {
|
|
height: 50px;
|
|
background: #ffffff;
|
|
border-bottom: 1px solid #e6e6e6;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
padding: 0 20px;
|
|
box-shadow: 0 1px 4px rgba(0, 21, 41, 0.08);
|
|
position: relative;
|
|
z-index: 1000;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.navbar-left {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 20px;
|
|
}
|
|
|
|
.logo {
|
|
font-size: 20px;
|
|
font-weight: bold;
|
|
color: #409EFF;
|
|
cursor: pointer;
|
|
transition: color 0.3s;
|
|
}
|
|
|
|
.logo:hover {
|
|
color: #66b1ff;
|
|
}
|
|
|
|
.nav-menu {
|
|
display: flex;
|
|
gap: 4px;
|
|
}
|
|
|
|
.nav-item {
|
|
padding: 8px 16px;
|
|
cursor: pointer;
|
|
border-radius: 4px;
|
|
color: #303133;
|
|
font-size: 14px;
|
|
transition: all 0.3s;
|
|
}
|
|
|
|
.nav-item:hover {
|
|
background: #ecf5ff;
|
|
color: #409EFF;
|
|
}
|
|
|
|
.nav-item.active {
|
|
background: #409EFF;
|
|
color: #ffffff;
|
|
}
|
|
|
|
.navbar-right {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 16px;
|
|
font-size: 14px;
|
|
color: #303133;
|
|
}
|
|
|
|
.navbar-right a {
|
|
color: #409EFF;
|
|
text-decoration: none;
|
|
transition: color 0.3s;
|
|
}
|
|
|
|
.navbar-right a:hover {
|
|
color: #66b1ff;
|
|
}
|
|
|
|
/* ========== 主容器(统一) ========== */
|
|
.main-container {
|
|
flex: 1;
|
|
display: flex;
|
|
overflow: hidden;
|
|
min-height: 0;
|
|
}
|
|
|
|
.app-main {
|
|
flex: 1;
|
|
overflow: hidden;
|
|
display: flex;
|
|
flex-direction: column;
|
|
background: #f0f2f5;
|
|
min-width: 0;
|
|
}
|
|
|
|
/* ========== 侧边栏菜单(统一) ========== */
|
|
.sidebar {
|
|
width: 210px;
|
|
background: #ffffff;
|
|
border-right: 1px solid #e6e6e6;
|
|
overflow-y: auto;
|
|
overflow-x: hidden;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.sidebar::-webkit-scrollbar {
|
|
width: 6px;
|
|
}
|
|
|
|
.sidebar::-webkit-scrollbar-thumb {
|
|
background: #dcdfe6;
|
|
border-radius: 3px;
|
|
}
|
|
|
|
.menu-item {
|
|
padding: 12px 24px;
|
|
cursor: pointer;
|
|
transition: background 0.3s;
|
|
color: #606266;
|
|
font-size: 14px;
|
|
display: flex;
|
|
align-items: center;
|
|
}
|
|
|
|
.menu-item:hover {
|
|
background: #ecf5ff;
|
|
color: #409EFF;
|
|
}
|
|
|
|
.menu-item.active {
|
|
background: #409EFF;
|
|
color: #ffffff;
|
|
font-weight: 500;
|
|
}
|
|
|
|
/* ========== 内容区域(统一) ========== */
|
|
.content {
|
|
flex: 1;
|
|
padding: 20px;
|
|
overflow-y: auto;
|
|
overflow-x: hidden;
|
|
background: #ffffff;
|
|
margin: 10px;
|
|
border-radius: 4px;
|
|
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
|
|
min-width: 0;
|
|
}
|
|
|
|
.content::-webkit-scrollbar {
|
|
width: 8px;
|
|
}
|
|
|
|
.content::-webkit-scrollbar-thumb {
|
|
background: #dcdfe6;
|
|
border-radius: 4px;
|
|
}
|
|
|
|
.content::-webkit-scrollbar-thumb:hover {
|
|
background: #c0c4cc;
|
|
}
|
|
|
|
/* ========== 页面标题(统一) ========== */
|
|
.page-header {
|
|
margin-bottom: 24px;
|
|
padding-bottom: 16px;
|
|
border-bottom: 1px solid #f0f0f0;
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
}
|
|
|
|
.page-title {
|
|
font-size: 20px;
|
|
font-weight: 500;
|
|
color: #303133;
|
|
margin: 0;
|
|
}
|
|
|
|
.page-desc {
|
|
font-size: 14px;
|
|
color: #909399;
|
|
margin-top: 4px;
|
|
}
|
|
|
|
/* ========== 搜索表单(统一) ========== */
|
|
.search-form {
|
|
background: #fafafa;
|
|
padding: 16px;
|
|
border-radius: 4px;
|
|
margin-bottom: 16px;
|
|
border: 1px solid #e6e6e6;
|
|
}
|
|
|
|
.form-row {
|
|
display: flex;
|
|
gap: 16px;
|
|
margin-bottom: 12px;
|
|
align-items: flex-end;
|
|
}
|
|
|
|
.form-row:last-child {
|
|
margin-bottom: 0;
|
|
}
|
|
|
|
.form-item {
|
|
flex: 1;
|
|
min-width: 0;
|
|
}
|
|
|
|
.form-label {
|
|
display: block;
|
|
margin-bottom: 8px;
|
|
color: #606266;
|
|
font-size: 14px;
|
|
font-weight: 500;
|
|
}
|
|
|
|
.form-input,
|
|
.form-select,
|
|
.form-textarea {
|
|
width: 100%;
|
|
padding: 6px 12px;
|
|
border: 1px solid #d9d9d9;
|
|
border-radius: 4px;
|
|
font-size: 14px;
|
|
transition: border-color 0.3s;
|
|
background: #ffffff;
|
|
color: #606266;
|
|
}
|
|
|
|
.form-input:focus,
|
|
.form-select:focus,
|
|
.form-textarea:focus {
|
|
outline: none;
|
|
border-color: #409EFF;
|
|
}
|
|
|
|
.form-textarea {
|
|
resize: vertical;
|
|
min-height: 80px;
|
|
}
|
|
|
|
/* ========== 按钮(统一) ========== */
|
|
.btn {
|
|
padding: 6px 16px;
|
|
border: none;
|
|
border-radius: 4px;
|
|
font-size: 14px;
|
|
cursor: pointer;
|
|
transition: all 0.3s;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.btn-primary {
|
|
background: #409EFF;
|
|
color: #ffffff;
|
|
}
|
|
|
|
.btn-primary:hover {
|
|
background: #66b1ff;
|
|
}
|
|
|
|
.btn-primary:active {
|
|
transform: translateY(0);
|
|
}
|
|
|
|
.btn-default {
|
|
background: #ffffff;
|
|
color: #333;
|
|
border: 1px solid #d9d9d9;
|
|
}
|
|
|
|
.btn-default:hover {
|
|
border-color: #409EFF;
|
|
color: #409EFF;
|
|
}
|
|
|
|
.btn-danger {
|
|
background: #f56c6c;
|
|
color: #ffffff;
|
|
}
|
|
|
|
.btn-danger:hover {
|
|
background: #f78989;
|
|
}
|
|
|
|
/* ========== 表格(统一) ========== */
|
|
.table-container {
|
|
background: #ffffff;
|
|
border-radius: 4px;
|
|
overflow: hidden;
|
|
}
|
|
|
|
table {
|
|
width: 100%;
|
|
border-collapse: separate;
|
|
border-spacing: 0;
|
|
}
|
|
|
|
th {
|
|
background: #fafafa;
|
|
color: #303133;
|
|
font-weight: 500;
|
|
font-size: 14px;
|
|
padding: 12px;
|
|
text-align: left;
|
|
border-bottom: 1px solid #e6e6e6;
|
|
}
|
|
|
|
td {
|
|
padding: 12px;
|
|
border-bottom: 1px solid #f0f0f0;
|
|
color: #606266;
|
|
font-size: 14px;
|
|
transition: background 0.2s;
|
|
}
|
|
|
|
tr {
|
|
transition: background 0.2s;
|
|
}
|
|
|
|
tr:hover {
|
|
background: #f5f7fa;
|
|
}
|
|
|
|
tr:last-child td {
|
|
border-bottom: none;
|
|
}
|
|
|
|
/* ========== 状态标签(统一) ========== */
|
|
.status-badge {
|
|
padding: 2px 8px;
|
|
border-radius: 4px;
|
|
font-size: 12px;
|
|
display: inline-block;
|
|
}
|
|
|
|
.status-contract,
|
|
.status-published {
|
|
background: #f6ffed;
|
|
color: #52c41a;
|
|
}
|
|
|
|
.status-draft {
|
|
background: #fff7e6;
|
|
color: #d46b08;
|
|
}
|
|
|
|
/* ========== 操作链接(统一) ========== */
|
|
.action-link {
|
|
color: #409EFF;
|
|
cursor: pointer;
|
|
margin-right: 12px;
|
|
font-size: 14px;
|
|
transition: color 0.3s;
|
|
text-decoration: none;
|
|
}
|
|
|
|
.action-link:hover {
|
|
color: #66b1ff;
|
|
}
|
|
|
|
.action-link.danger {
|
|
color: #f56c6c;
|
|
}
|
|
|
|
.action-link.danger:hover {
|
|
color: #f78989;
|
|
}
|
|
|
|
/* ========== 响应式 ========== */
|
|
@media (max-width: 768px) {
|
|
.sidebar {
|
|
width: 180px;
|
|
}
|
|
|
|
.content {
|
|
margin: 12px;
|
|
padding: 16px;
|
|
}
|
|
|
|
.navbar {
|
|
padding: 0 16px;
|
|
}
|
|
|
|
.nav-menu {
|
|
display: none;
|
|
}
|
|
}
|
|
|