whistle.mock-plugins
Version:
Whistle 插件,用于快速创建 API 模拟数据
427 lines (351 loc) • 6.57 kB
CSS
.logs-page-container {
width: 100%;
}
.filter-card {
border-radius: 8px;
}
.filter-container {
display: flex;
justify-content: space-between;
align-items: center;
flex-wrap: wrap;
gap: 16px;
}
.filter-item {
margin-bottom: 0 ;
}
.filter-count {
margin-left: 8px;
}
.logs-summary {
display: flex;
align-items: center;
white-space: nowrap;
}
.table-container {
border-radius: 8px;
overflow: hidden;
}
.time-column {
display: flex;
flex-direction: column;
}
.time-value {
font-weight: 500;
color: rgba(0, 0, 0, 0.85);
}
.date-small {
font-size: 12px;
color: rgba(0, 0, 0, 0.45);
margin-top: 2px;
}
.url-column {
max-width: 300px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.refresh-icon {
margin-left: 8px;
font-size: 14px;
color: #1890ff;
vertical-align: middle;
}
/* 日志详情弹窗样式 */
.log-detail-modal .ant-modal-body {
padding: 0;
}
.log-detail-tabs {
height: 400px;
}
.log-detail-content {
padding: 16px;
overflow: auto;
height: 350px;
}
.log-detail-panel {
background-color: #f5f5f5;
padding: 16px;
border-radius: 8px;
font-family: SFMono-Regular, Consolas, Liberation Mono, Menlo, monospace;
white-space: pre-wrap;
word-break: break-all;
font-size: 13px;
line-height: 1.5;
}
.log-property {
display: flex;
border-bottom: 1px solid #f0f0f0;
padding: 8px 0;
}
.log-property:last-child {
border-bottom: none;
}
.log-property-label {
width: 100px;
font-weight: 500;
color: rgba(0, 0, 0, 0.65);
}
.log-property-value {
flex: 1;
word-break: break-all;
}
/* 响应式调整 */
@media (max-width: 768px) {
.filter-container {
flex-direction: column;
align-items: flex-start;
}
.logs-summary {
margin-top: 8px;
}
}
/* 日志页面样式 */
.logs-page {
padding: 20px;
}
/* 表格行悬停效果,增强可点击感知 */
.log-table-row {
cursor: pointer;
transition: all 0.2s;
}
.log-table-row:hover {
background-color: rgba(24, 144, 255, 0.05);
}
/* 日志详情模态框样式 */
.log-detail-modal .ant-modal-content {
border-radius: 8px;
overflow: hidden;
}
.log-detail-modal .ant-modal-header {
padding: 16px 24px;
background: linear-gradient(to right, #1890ff, #40a9ff);
border-bottom: none;
}
.log-detail-modal .ant-modal-title {
color: white;
}
.log-detail-modal .ant-modal-close {
color: rgba(255, 255, 255, 0.8);
}
.log-detail-modal .ant-modal-close:hover {
color: white;
}
.log-detail-modal .ant-modal-body {
padding: 24px;
max-height: 75vh;
overflow-y: auto;
}
.log-detail-header {
display: flex;
justify-content: space-between;
align-items: center;
}
.log-detail-title {
display: flex;
align-items: center;
gap: 12px;
color: white;
font-weight: 600;
}
.log-timestamp {
font-size: 13px;
font-weight: normal;
opacity: 0.8;
}
.log-detail-status {
background: rgba(255, 255, 255, 0.15);
padding: 4px 12px;
border-radius: 20px;
color: white;
font-size: 13px;
}
.status-description {
display: flex;
align-items: center;
gap: 6px;
}
.status-description.success {
color: #52c41a;
}
.status-description.warning {
color: #faad14;
}
.status-description.error {
color: #f5222d;
}
.log-overview {
margin-bottom: 16px;
}
.log-detail-descriptions {
margin-bottom: 16px;
}
.log-detail-descriptions .ant-descriptions-row > th,
.log-detail-descriptions .ant-descriptions-row > td {
padding: 12px 16px;
}
.header-section .ant-descriptions-item-content,
.body-section .ant-descriptions-item-content {
background-color: #fafafa;
}
.code-block-wrapper {
position: relative;
width: 100%;
}
.code-block {
background-color: #f6f8fa;
border-radius: 4px;
padding: 12px;
overflow: auto;
font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace;
font-size: 13px;
line-height: 1.45;
max-height: 300px;
margin: 0;
white-space: pre-wrap;
word-break: break-all;
}
.copy-btn {
position: absolute;
top: 8px;
right: 8px;
background-color: rgba(255, 255, 255, 0.8);
border-radius: 4px;
padding: 4px 8px;
opacity: 0;
transition: opacity 0.2s;
}
.code-block-wrapper:hover .copy-btn {
opacity: 1;
}
.log-detail-tabs .ant-tabs-nav {
margin-bottom: 16px;
}
.header-item .ant-descriptions-item-content {
word-break: break-all;
}
/* 响应式调整 */
@media (max-width: 768px) {
.log-detail-modal .ant-modal-body {
padding: 16px;
}
.log-detail-descriptions .ant-descriptions-row > th,
.log-detail-descriptions .ant-descriptions-row > td {
padding: 8px 12px;
}
}
/* 过滤器区域样式 */
.filter-card {
border-radius: 8px;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}
.filter-container {
display: flex;
justify-content: space-between;
align-items: center;
flex-wrap: wrap;
gap: 16px;
}
.filter-item {
margin-bottom: 0 ;
}
.logs-summary {
display: flex;
align-items: center;
}
.d-flex {
display: flex;
}
.align-center {
align-items: center;
}
.mr-1 {
margin-right: 4px;
}
.ml-1 {
margin-left: 4px;
}
.mb-3 {
margin-bottom: 16px;
}
/* 时间列样式 */
.time-column {
display: flex;
flex-direction: column;
}
.time-value {
font-weight: 500;
}
.date-small {
font-size: 12px;
color: #8c8c8c;
}
/* URL列样式 */
.url-column {
max-width: 400px;
}
/* 表格容器样式 */
.table-container {
margin-top: 16px;
background-color: white;
border-radius: 8px;
overflow: hidden;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}
/* 自定义表格样式 */
.custom-table .ant-table-thead > tr > th {
background-color: #f5f7fa;
font-weight: 600;
}
.custom-table .ant-pagination {
padding: 16px 24px;
margin: 0;
}
/* 状态标签样式 */
.status-tag {
min-width: 64px;
text-align: center;
}
.status-tag-success {
color: #52c41a;
background-color: #f6ffed;
border-color: #b7eb8f;
}
.status-tag-warning {
color: #faad14;
background-color: #fffbe6;
border-color: #ffe58f;
}
.status-tag-error {
color: #f5222d;
background-color: #fff1f0;
border-color: #ffa39e;
}
/* 页头样式 */
.logs-page-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 24px;
}
.logs-page-title {
font-size: 24px;
font-weight: 600;
margin: 0;
}
.logs-action-buttons {
display: flex;
gap: 12px;
}
/* 自动刷新按钮样式 */
.auto-refresh {
display: flex;
align-items: center;
gap: 8px;
}
.auto-refresh-text {
font-size: 13px;
}
.tab-content {
padding: 8px 0;
}