UNPKG

whistle.mock-plugins

Version:

Whistle 插件,用于快速创建 API 模拟数据

337 lines (287 loc) 5.94 kB
/* 基础样式 */ * { margin: 0; padding: 0; box-sizing: border-box; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif; } body { background-color: #f0f2f5; color: #000000d9; font-size: 14px; line-height: 1.5; } .app-container { display: flex; flex-direction: column; min-height: 100vh; } /* 顶部导航栏 */ .header { background-color: #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1); height: 48px; display: flex; align-items: center; padding: 0 16px; z-index: 100; } .logo { font-weight: bold; font-size: 18px; color: #1890ff; margin-right: 24px; display: flex; align-items: center; } .logo-icon { margin-right: 8px; width: 24px; height: 24px; background-color: #1890ff; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: white; } .search { flex: 1; max-width: 320px; margin-right: 16px; } .search input { width: 100%; height: 32px; border-radius: 4px; border: 1px solid #d9d9d9; padding: 0 8px 0 32px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='16' height='16'%3E%3Cpath fill='%23999' d='M15.5 14h-.79l-.28-.27a6.5 6.5 0 0 0 1.48-5.34c-.47-2.78-2.79-5-5.59-5.34a6.505 6.505 0 0 0-7.27 7.27c.34 2.8 2.56 5.12 5.34 5.59a6.5 6.5 0 0 0 5.34-1.48l.27.28v.79l4.25 4.25c.41.41 1.08.41 1.49 0 .41-.41.41-1.08 0-1.49L15.5 14zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: 8px center; } .header-actions { display: flex; align-items: center; } .header-actions button { background: none; border: none; cursor: pointer; color: #595959; padding: 4px 8px; margin-left: 8px; border-radius: 4px; display: flex; align-items: center; } .header-actions button:hover { background-color: #f5f5f5; color: #1890ff; } .header-actions button i { margin-right: 4px; } /* 主内容区域 */ .main-container { display: flex; flex: 1; overflow: hidden; } /* 左侧导航 */ .sidebar { width: 250px; background-color: #fff; border-right: 1px solid #f0f0f0; display: flex; flex-direction: column; overflow-y: auto; } .create-feature { padding: 16px; } .create-feature button { width: 100%; height: 36px; background-color: #1890ff; color: white; border: none; border-radius: 4px; cursor: pointer; font-size: 14px; display: flex; align-items: center; justify-content: center; } .create-feature button:hover { background-color: #40a9ff; } .feature-list { flex: 1; padding: 0 8px; overflow-y: auto; } .feature-item { padding: 8px 12px; margin-bottom: 4px; border-radius: 4px; cursor: pointer; } .feature-item:hover { background-color: #f5f5f5; } .feature-item.active { background-color: #e6f7ff; } .feature-link { display: flex; justify-content: space-between; align-items: center; text-decoration: none; color: #595959; } .feature-item.active .feature-link { color: #1890ff; } .feature-name { font-size: 14px; } .feature-count { background-color: #f0f0f0; color: #8c8c8c; font-size: 12px; padding: 2px 6px; border-radius: 10px; min-width: 20px; text-align: center; } .feature-item.active .feature-count { background-color: #1890ff; color: white; } /* 右侧内容区域 */ .content { flex: 1; padding: 16px; overflow-y: auto; } .app-layout { min-height: 100vh; display: flex; flex-direction: column; } .app-header { position: fixed; z-index: 100; width: 100%; display: flex; justify-content: space-between; align-items: center; padding: 0 24px; height: 64px; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05); } .header-left { display: flex; align-items: center; } .logo-container { display: flex; align-items: center; margin-right: 24px; } .logo-icon { font-size: 24px; color: #1890ff; margin-right: 12px; } .logo-text { color: #1890ff; font-size: 18px; font-weight: 600; white-space: nowrap; } .collapse-button { display: flex; align-items: center; justify-content: center; } .header-right { display: flex; align-items: center; } .app-sider { overflow: auto; height: 100vh; position: fixed; left: 0; top: 64px; bottom: 0; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05); z-index: 99; transition: all 0.2s; } .app-content-wrapper { margin-top: 64px; margin-left: 220px; padding: 0 24px 24px; transition: all 0.2s; } .app-content { padding: 24px; overflow: initial; min-height: calc(100vh - 64px - 48px - 32px); transition: all 0.3s; } .page-header { margin-bottom: 16px; } .app-breadcrumb { font-size: 14px; } /* 当侧边栏折叠时的样式调整 */ .app-sider.ant-layout-sider-collapsed + .app-content-wrapper { margin-left: 80px; } /* 菜单项样式定制 */ .ant-menu-item { border-radius: 4px; margin: 4px 0 !important; } .ant-menu-item-selected { font-weight: 500; } .ant-menu-inline .ant-menu-item::after { display: none; } /* 移动端响应式调整 */ @media (max-width: 768px) { .app-sider { position: absolute; z-index: 100; box-shadow: 2px 0 8px rgba(0, 0, 0, 0.15); } .app-content-wrapper { margin-left: 0 !important; padding: 0 16px 16px; } .app-content { padding: 16px; } .logo-text { display: none; } .app-header { padding: 0 16px; } } /* 暗色主题适配 */ .dark-theme .app-header, .dark-theme .app-sider { background-color: #141414 !important; border-color: #303030 !important; } .dark-theme .logo-text, .dark-theme .logo-icon { color: #177ddc; }