UNPKG

whistle.mock-plugins

Version:

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

253 lines (214 loc) 3.84 kB
.settings-container { width: 100%; max-width: 900px; margin: 0 auto; background-color: #fff; border-radius: 8px; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05); padding: 24px; } .settings-header { margin-bottom: 24px; padding-bottom: 16px; border-bottom: 1px solid #f0f0f0; } .settings-header h4 { margin-bottom: 8px; color: #1890ff; } .settings-card { margin-bottom: 20px; } .settings-card .ant-card-head { border-bottom: 1px solid #f0f0f0; padding-bottom: 0; } .settings-card .ant-card-head-title { font-size: 16px; font-weight: 500; } /* 设置项样式 */ .settings-item { padding: 16px 0; border-bottom: 1px solid #f0f0f0; } .settings-item:last-child { border-bottom: none; } .settings-item-header { display: flex; justify-content: space-between; align-items: center; } .settings-item-title { font-size: 14px; font-weight: 500; color: #262626; margin-bottom: 4px; display: inline-flex; align-items: center; gap: 2px; } .settings-item-description { font-size: 12px; color: #8c8c8c; line-height: 1.5; } .settings-help-icon { color: #8c8c8c; padding: 0; min-width: auto; height: auto; line-height: 1; } .settings-help-icon:hover { color: #1677ff; } .settings-section { margin-bottom: 32px; } .settings-section h2 { font-size: 16px; font-weight: 600; color: #262626; margin: 0 0 16px 0; padding-bottom: 8px; border-bottom: 1px solid #f0f0f0; } .setting-item { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; border-bottom: 1px solid #f5f5f5; } .setting-item:last-child { border-bottom: none; } .setting-label { display: flex; flex-direction: column; } .setting-label span:first-child { font-weight: 500; color: #262626; margin-bottom: 4px; } .setting-description { color: #999; font-size: 12px; margin-top: 4px; } .setting-control { display: flex; align-items: center; } .setting-control input[type="number"] { width: 100px; height: 32px; padding: 0 12px; border: 1px solid #d9d9d9; border-radius: 4px; font-size: 14px; } /* 切换开关样式 */ .switch { position: relative; display: inline-block; width: 36px; height: 20px; } .switch input { opacity: 0; width: 0; height: 0; } .slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #ccc; transition: .4s; border-radius: 20px; } .slider:before { position: absolute; content: ""; height: 16px; width: 16px; left: 2px; bottom: 2px; background-color: white; transition: .4s; border-radius: 50%; } input:checked + .slider { background-color: #1890ff; } input:checked + .slider:before { transform: translateX(16px); } .settings-actions { display: flex; justify-content: flex-end; margin-top: 24px; padding-top: 16px; border-top: 1px solid #f0f0f0; } .reset-button { height: 32px; padding: 0 16px; background-color: white; border: 1px solid #d9d9d9; border-radius: 4px; cursor: pointer; font-size: 14px; } .save-button { height: 32px; padding: 0 16px; background-color: #1890ff; color: white; border: none; border-radius: 4px; cursor: pointer; font-size: 14px; } .reset-button:disabled, .save-button:disabled { opacity: 0.5; cursor: not-allowed; } .about-section { margin-top: 20px; } .about-content { display: flex; flex-direction: column; gap: 16px; } .plugin-info p { margin: 8px 0; } .plugin-description p { margin: 8px 0; color: #595959; line-height: 1.5; } /* 响应式调整 */ @media (max-width: 768px) { .settings-container { padding: 16px; } .settings-actions { flex-direction: column; align-items: center; } .settings-actions button { width: 100%; margin-bottom: 8px; } }