feat:初始化项目
This commit is contained in:
@@ -0,0 +1,329 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>字词学习平台 - 管理后台</title>
|
||||
<link rel="stylesheet" href="styles.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<!-- 侧边栏导航 -->
|
||||
<aside class="sidebar">
|
||||
<div class="sidebar-header">
|
||||
<h1 class="logo">📚 字词平台</h1>
|
||||
</div>
|
||||
<nav class="sidebar-nav">
|
||||
<a href="#words" class="nav-item active" data-page="words">
|
||||
<span class="nav-icon">📝</span>
|
||||
<span class="nav-text">字词管理</span>
|
||||
</a>
|
||||
<a href="#words-list" class="nav-item" data-page="words-list">
|
||||
<span class="nav-icon">🔍</span>
|
||||
<span class="nav-text">词语查询</span>
|
||||
</a>
|
||||
<a href="#users" class="nav-item" data-page="users">
|
||||
<span class="nav-icon">👥</span>
|
||||
<span class="nav-text">用户管理</span>
|
||||
</a>
|
||||
</nav>
|
||||
<div class="sidebar-footer">
|
||||
<div class="user-info">
|
||||
<div class="user-avatar">A</div>
|
||||
<div class="user-details">
|
||||
<div class="user-name">管理员</div>
|
||||
<div class="user-role">超级管理员</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</aside>
|
||||
|
||||
<!-- 主内容区 -->
|
||||
<main class="main-content">
|
||||
<!-- 字词管理页面 -->
|
||||
<div id="words-page" class="page active">
|
||||
<div class="page-header">
|
||||
<h2>字词管理</h2>
|
||||
<button class="btn btn-primary" onclick="openEditModal(null)">
|
||||
<span>+</span> 新增字词
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<!-- 筛选栏 -->
|
||||
<div class="filter-bar">
|
||||
<div class="filter-group">
|
||||
<input type="text" class="search-input" placeholder="搜索字词内容..." id="search-input">
|
||||
</div>
|
||||
<div class="filter-group">
|
||||
<select class="filter-select" id="type-filter">
|
||||
<option value="">全部类型</option>
|
||||
<option value="chinese_char">汉字</option>
|
||||
<option value="chinese_word">词语</option>
|
||||
<option value="english_word">英语单词</option>
|
||||
<option value="english_letter">英语字母</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="filter-group">
|
||||
<select class="filter-select" id="grade-filter">
|
||||
<option value="">全部年级</option>
|
||||
<option value="1">一年级</option>
|
||||
<option value="2">二年级</option>
|
||||
<option value="3">三年级</option>
|
||||
<option value="4">四年级</option>
|
||||
<option value="5">五年级</option>
|
||||
<option value="6">六年级</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="view-toggle">
|
||||
<button class="view-btn active" data-view="list" title="列表视图">
|
||||
<span>☰</span>
|
||||
</button>
|
||||
<button class="view-btn" data-view="card" title="卡片视图">
|
||||
<span>⊞</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 列表视图 -->
|
||||
<div id="list-view" class="view-container active">
|
||||
<table class="data-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>ID</th>
|
||||
<th>内容</th>
|
||||
<th>类型</th>
|
||||
<th>年级</th>
|
||||
<th>拼音</th>
|
||||
<th>图片数</th>
|
||||
<th>状态</th>
|
||||
<th>操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="words-table-body">
|
||||
<!-- 数据通过 JS 动态加载 -->
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<!-- 卡片视图 -->
|
||||
<div id="card-view" class="view-container">
|
||||
<div class="card-grid" id="words-card-grid">
|
||||
<!-- 卡片通过 JS 动态加载 -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 分页 -->
|
||||
<div class="pagination">
|
||||
<button class="page-btn" id="prev-page" disabled>上一页</button>
|
||||
<div class="page-info">
|
||||
<span id="current-page">1</span> / <span id="total-pages">1</span>
|
||||
</div>
|
||||
<button class="page-btn" id="next-page">下一页</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 词语查询页面 -->
|
||||
<div id="words-list-page" class="page">
|
||||
<div class="page-header">
|
||||
<h2>词语查询</h2>
|
||||
</div>
|
||||
<div class="filter-bar">
|
||||
<input type="text" class="search-input" placeholder="搜索词语..." id="word-search-input">
|
||||
</div>
|
||||
<div class="word-list-container">
|
||||
<div id="word-list-content">
|
||||
<!-- 词语列表通过 JS 动态加载 -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 用户管理页面 -->
|
||||
<div id="users-page" class="page">
|
||||
<div class="page-header">
|
||||
<h2>用户管理</h2>
|
||||
<button class="btn btn-primary" onclick="openUserModal(null)">
|
||||
<span>+</span> 添加管理员
|
||||
</button>
|
||||
</div>
|
||||
<table class="data-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>ID</th>
|
||||
<th>用户名</th>
|
||||
<th>邮箱</th>
|
||||
<th>角色</th>
|
||||
<th>创建时间</th>
|
||||
<th>状态</th>
|
||||
<th>操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="users-table-body">
|
||||
<!-- 数据通过 JS 动态加载 -->
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
<!-- 字词编辑模态框 -->
|
||||
<div id="edit-modal" class="modal">
|
||||
<div class="modal-content modal-large">
|
||||
<div class="modal-header">
|
||||
<h3 id="modal-title">编辑字词</h3>
|
||||
<button class="modal-close" onclick="closeEditModal()">×</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="form-tabs">
|
||||
<button class="tab-btn active" data-tab="basic">基础信息</button>
|
||||
<button class="tab-btn" data-tab="svg">SVG配置</button>
|
||||
<button class="tab-btn" data-tab="images">图片管理</button>
|
||||
<button class="tab-btn" data-tab="relations">关联管理</button>
|
||||
</div>
|
||||
|
||||
<!-- 基础信息标签页 -->
|
||||
<div class="tab-content active" id="basic-tab">
|
||||
<div class="form-group">
|
||||
<label>字词内容 *</label>
|
||||
<input type="text" class="form-input" id="edit-content" placeholder="输入字词内容">
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<div class="form-group">
|
||||
<label>类型 *</label>
|
||||
<select class="form-select" id="edit-type">
|
||||
<option value="chinese_char">汉字</option>
|
||||
<option value="chinese_word">词语</option>
|
||||
<option value="english_word">英语单词</option>
|
||||
<option value="english_letter">英语字母</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>年级</label>
|
||||
<select class="form-select" id="edit-grade">
|
||||
<option value="">未设置</option>
|
||||
<option value="1">一年级</option>
|
||||
<option value="2">二年级</option>
|
||||
<option value="3">三年级</option>
|
||||
<option value="4">四年级</option>
|
||||
<option value="5">五年级</option>
|
||||
<option value="6">六年级</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>拼音(多个用逗号分隔)</label>
|
||||
<input type="text" class="form-input" id="edit-pinyins" placeholder="例如: zhōng, zhòng">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>读音</label>
|
||||
<input type="text" class="form-input" id="edit-pronunciations" placeholder="读音标注或音频路径">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>描述</label>
|
||||
<textarea class="form-textarea" id="edit-description" rows="3" placeholder="描述信息"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- SVG配置标签页 -->
|
||||
<div class="tab-content" id="svg-tab">
|
||||
<div class="form-group">
|
||||
<label>SVG 数据</label>
|
||||
<div class="svg-editor">
|
||||
<textarea class="form-textarea svg-code" id="edit-svg" rows="15"
|
||||
placeholder="输入或粘贴 SVG 代码..."></textarea>
|
||||
<div class="svg-preview">
|
||||
<div class="preview-label">预览</div>
|
||||
<div id="svg-preview-container" class="svg-preview-box"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 图片管理标签页 -->
|
||||
<div class="tab-content" id="images-tab">
|
||||
<div class="image-upload-area" id="image-upload-area">
|
||||
<input type="file" id="image-upload-input" multiple accept="image/*" style="display: none;">
|
||||
<div class="upload-placeholder" onclick="document.getElementById('image-upload-input').click()">
|
||||
<span class="upload-icon">📷</span>
|
||||
<p>点击上传图片(支持多选)</p>
|
||||
<p class="upload-hint">图片将自动处理为半透明背景,统一尺寸</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="image-list" id="image-list">
|
||||
<!-- 图片列表通过 JS 动态加载 -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 关联管理标签页 -->
|
||||
<div class="tab-content" id="relations-tab">
|
||||
<div class="relation-section">
|
||||
<h4>关联词语</h4>
|
||||
<div class="relation-input-group">
|
||||
<input type="text" class="form-input" id="related-word-input" placeholder="输入关联词语,按回车添加">
|
||||
<button class="btn btn-secondary" onclick="addRelatedWord()">添加</button>
|
||||
</div>
|
||||
<div class="relation-tags" id="related-words-list">
|
||||
<!-- 关联词语标签 -->
|
||||
</div>
|
||||
</div>
|
||||
<div class="relation-section">
|
||||
<h4>关联句子</h4>
|
||||
<div class="sentence-input-group">
|
||||
<textarea class="form-textarea" id="sentence-input" rows="2"
|
||||
placeholder="输入句子,按回车添加"></textarea>
|
||||
<button class="btn btn-secondary" onclick="addSentence()">添加</button>
|
||||
</div>
|
||||
<div class="sentence-list" id="sentences-list">
|
||||
<!-- 句子列表 -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button class="btn btn-secondary" onclick="closeEditModal()">取消</button>
|
||||
<button class="btn btn-primary" onclick="saveWord()">保存</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 用户编辑模态框 -->
|
||||
<div id="user-modal" class="modal">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h3 id="user-modal-title">添加管理员</h3>
|
||||
<button class="modal-close" onclick="closeUserModal()">×</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="form-group">
|
||||
<label>用户名 *</label>
|
||||
<input type="text" class="form-input" id="user-username" placeholder="输入用户名">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>邮箱 *</label>
|
||||
<input type="email" class="form-input" id="user-email" placeholder="输入邮箱">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>密码 *</label>
|
||||
<input type="password" class="form-input" id="user-password" placeholder="输入密码">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>角色 *</label>
|
||||
<select class="form-select" id="user-role">
|
||||
<option value="admin">一般管理员</option>
|
||||
<option value="super_admin">超级管理员</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button class="btn btn-secondary" onclick="closeUserModal()">取消</button>
|
||||
<button class="btn btn-primary" onclick="saveUser()">保存</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 遮罩层 -->
|
||||
<div class="modal-overlay" onclick="closeAllModals()"></div>
|
||||
|
||||
<script src="script.js"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,486 @@
|
||||
/* 全局样式 */
|
||||
* {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
:root {
|
||||
--primary-color: #4f46e5;
|
||||
--primary-hover: #4338ca;
|
||||
--secondary-color: #64748b;
|
||||
--success-color: #10b981;
|
||||
--danger-color: #ef4444;
|
||||
--warning-color: #f59e0b;
|
||||
--bg-color: #f8fafc;
|
||||
--sidebar-bg: #1e293b;
|
||||
--text-primary: #1e293b;
|
||||
--text-secondary: #64748b;
|
||||
--border-color: #e2e8f0;
|
||||
--card-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
|
||||
--card-shadow-hover: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
|
||||
background-color: var(--bg-color);
|
||||
color: var(--text-primary);
|
||||
line-height: 1.6;
|
||||
display: flex;
|
||||
min-height: 100vh;
|
||||
}
|
||||
|
||||
/* 侧边栏 */
|
||||
.sidebar {
|
||||
width: 260px;
|
||||
background: var(--sidebar-bg);
|
||||
color: white;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
position: fixed;
|
||||
height: 100vh;
|
||||
left: 0;
|
||||
top: 0;
|
||||
}
|
||||
|
||||
.sidebar-header {
|
||||
padding: 1.5rem;
|
||||
border-bottom: 1px solid rgba(255, 255, 255, 0.1);
|
||||
}
|
||||
|
||||
.logo {
|
||||
font-size: 1.5rem;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.sidebar-nav {
|
||||
flex: 1;
|
||||
padding: 1rem 0;
|
||||
}
|
||||
|
||||
.nav-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 0.75rem 1.5rem;
|
||||
color: rgba(255, 255, 255, 0.7);
|
||||
text-decoration: none;
|
||||
transition: all 0.2s;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.nav-item:hover {
|
||||
background: rgba(255, 255, 255, 0.1);
|
||||
color: white;
|
||||
}
|
||||
|
||||
.nav-item.active {
|
||||
background: rgba(79, 70, 229, 0.2);
|
||||
color: white;
|
||||
border-left: 3px solid var(--primary-color);
|
||||
}
|
||||
|
||||
.nav-icon {
|
||||
font-size: 1.2rem;
|
||||
margin-right: 0.75rem;
|
||||
}
|
||||
|
||||
.sidebar-footer {
|
||||
padding: 1rem 1.5rem;
|
||||
border-top: 1px solid rgba(255, 255, 255, 0.1);
|
||||
}
|
||||
|
||||
.user-info {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.user-avatar {
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
border-radius: 50%;
|
||||
background: var(--primary-color);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-weight: 600;
|
||||
margin-right: 0.75rem;
|
||||
}
|
||||
|
||||
.user-name {
|
||||
font-weight: 500;
|
||||
font-size: 0.9rem;
|
||||
}
|
||||
|
||||
.user-role {
|
||||
font-size: 0.75rem;
|
||||
color: rgba(255, 255, 255, 0.6);
|
||||
}
|
||||
|
||||
/* 主内容区 */
|
||||
.main-content {
|
||||
margin-left: 260px;
|
||||
flex: 1;
|
||||
padding: 2rem;
|
||||
min-height: 100vh;
|
||||
}
|
||||
|
||||
.page {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.page.active {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.page-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: 2rem;
|
||||
}
|
||||
|
||||
.page-header h2 {
|
||||
font-size: 1.875rem;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
/* 按钮 */
|
||||
.btn {
|
||||
padding: 0.5rem 1rem;
|
||||
border: none;
|
||||
border-radius: 0.375rem;
|
||||
font-size: 0.875rem;
|
||||
font-weight: 500;
|
||||
cursor: pointer;
|
||||
transition: all 0.2s;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 0.5rem;
|
||||
}
|
||||
|
||||
.btn-primary {
|
||||
background: var(--primary-color);
|
||||
color: white;
|
||||
}
|
||||
|
||||
.btn-primary:hover {
|
||||
background: var(--primary-hover);
|
||||
}
|
||||
|
||||
.btn-secondary {
|
||||
background: var(--secondary-color);
|
||||
color: white;
|
||||
}
|
||||
|
||||
.btn-secondary:hover {
|
||||
background: #475569;
|
||||
}
|
||||
|
||||
.btn-danger {
|
||||
background: var(--danger-color);
|
||||
color: white;
|
||||
}
|
||||
|
||||
.btn-danger:hover {
|
||||
background: #dc2626;
|
||||
}
|
||||
|
||||
/* 筛选栏 */
|
||||
.filter-bar {
|
||||
display: flex;
|
||||
gap: 1rem;
|
||||
margin-bottom: 1.5rem;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.filter-group {
|
||||
flex: 1;
|
||||
min-width: 200px;
|
||||
}
|
||||
|
||||
.search-input {
|
||||
width: 100%;
|
||||
padding: 0.5rem 1rem;
|
||||
border: 1px solid var(--border-color);
|
||||
border-radius: 0.375rem;
|
||||
font-size: 0.875rem;
|
||||
}
|
||||
|
||||
.filter-select {
|
||||
width: 100%;
|
||||
padding: 0.5rem 1rem;
|
||||
border: 1px solid var(--border-color);
|
||||
border-radius: 0.375rem;
|
||||
font-size: 0.875rem;
|
||||
background: white;
|
||||
}
|
||||
|
||||
.view-toggle {
|
||||
display: flex;
|
||||
gap: 0.25rem;
|
||||
background: white;
|
||||
padding: 0.25rem;
|
||||
border-radius: 0.375rem;
|
||||
border: 1px solid var(--border-color);
|
||||
}
|
||||
|
||||
.view-btn {
|
||||
padding: 0.5rem;
|
||||
border: none;
|
||||
background: transparent;
|
||||
cursor: pointer;
|
||||
border-radius: 0.25rem;
|
||||
transition: all 0.2s;
|
||||
}
|
||||
|
||||
.view-btn:hover {
|
||||
background: var(--bg-color);
|
||||
}
|
||||
|
||||
.view-btn.active {
|
||||
background: var(--primary-color);
|
||||
color: white;
|
||||
}
|
||||
|
||||
/* 表格 */
|
||||
.data-table {
|
||||
width: 100%;
|
||||
background: white;
|
||||
border-radius: 0.5rem;
|
||||
overflow: hidden;
|
||||
box-shadow: var(--card-shadow);
|
||||
}
|
||||
|
||||
.data-table thead {
|
||||
background: var(--bg-color);
|
||||
}
|
||||
|
||||
.data-table th {
|
||||
padding: 1rem;
|
||||
text-align: left;
|
||||
font-weight: 600;
|
||||
font-size: 0.875rem;
|
||||
color: var(--text-secondary);
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.05em;
|
||||
}
|
||||
|
||||
.data-table td {
|
||||
padding: 1rem;
|
||||
border-top: 1px solid var(--border-color);
|
||||
font-size: 0.875rem;
|
||||
}
|
||||
|
||||
.data-table tr:hover {
|
||||
background: var(--bg-color);
|
||||
}
|
||||
|
||||
/* 卡片视图 */
|
||||
.card-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
|
||||
gap: 1.5rem;
|
||||
margin-bottom: 2rem;
|
||||
}
|
||||
|
||||
.word-card {
|
||||
background: white;
|
||||
border-radius: 0.5rem;
|
||||
padding: 1.5rem;
|
||||
box-shadow: var(--card-shadow);
|
||||
transition: all 0.2s;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.word-card:hover {
|
||||
box-shadow: var(--card-shadow-hover);
|
||||
transform: translateY(-2px);
|
||||
}
|
||||
|
||||
.word-card-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
.word-content {
|
||||
font-size: 2rem;
|
||||
font-weight: 600;
|
||||
margin-bottom: 0.5rem;
|
||||
}
|
||||
|
||||
.word-type {
|
||||
display: inline-block;
|
||||
padding: 0.25rem 0.75rem;
|
||||
background: var(--bg-color);
|
||||
border-radius: 9999px;
|
||||
font-size: 0.75rem;
|
||||
color: var(--text-secondary);
|
||||
}
|
||||
|
||||
.word-info {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 0.5rem;
|
||||
font-size: 0.875rem;
|
||||
color: var(--text-secondary);
|
||||
}
|
||||
|
||||
.word-info-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.5rem;
|
||||
}
|
||||
|
||||
.word-actions {
|
||||
display: flex;
|
||||
gap: 0.5rem;
|
||||
margin-top: 1rem;
|
||||
padding-top: 1rem;
|
||||
border-top: 1px solid var(--border-color);
|
||||
}
|
||||
|
||||
/* 分页 */
|
||||
.pagination {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
gap: 1rem;
|
||||
margin-top: 2rem;
|
||||
}
|
||||
|
||||
.page-btn {
|
||||
padding: 0.5rem 1rem;
|
||||
border: 1px solid var(--border-color);
|
||||
background: white;
|
||||
border-radius: 0.375rem;
|
||||
cursor: pointer;
|
||||
transition: all 0.2s;
|
||||
}
|
||||
|
||||
.page-btn:hover:not(:disabled) {
|
||||
background: var(--bg-color);
|
||||
}
|
||||
|
||||
.page-btn:disabled {
|
||||
opacity: 0.5;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
|
||||
.page-info {
|
||||
font-size: 0.875rem;
|
||||
color: var(--text-secondary);
|
||||
}
|
||||
|
||||
/* 模态框 */
|
||||
.modal {
|
||||
display: none;
|
||||
position: fixed;
|
||||
z-index: 1000;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.modal.active {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.modal-overlay {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: rgba(0, 0, 0, 0.5);
|
||||
z-index: 999;
|
||||
}
|
||||
|
||||
.modal-content {
|
||||
background: white;
|
||||
border-radius: 0.5rem;
|
||||
width: 90%;
|
||||
max-width: 600px;
|
||||
max-height: 90vh;
|
||||
overflow-y: auto;
|
||||
z-index: 1001;
|
||||
box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
|
||||
.modal-large {
|
||||
max-width: 1000px;
|
||||
}
|
||||
|
||||
.modal-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 1.5rem;
|
||||
border-bottom: 1px solid var(--border-color);
|
||||
}
|
||||
|
||||
.modal-header h3 {
|
||||
font-size: 1.25rem;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.modal-close {
|
||||
background: none;
|
||||
border: none;
|
||||
font-size: 1.5rem;
|
||||
cursor: pointer;
|
||||
color: var(--text-secondary);
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
border-radius: 0.25rem;
|
||||
}
|
||||
|
||||
.modal-close:hover {
|
||||
background: var(--bg-color);
|
||||
}
|
||||
|
||||
.modal-body {
|
||||
padding: 1.5rem;
|
||||
}
|
||||
|
||||
.modal-footer {
|
||||
padding: 1.5rem;
|
||||
border-top: 1px solid var(--border-color);
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
gap: 0.75rem;
|
||||
}
|
||||
|
||||
/* 表单 */
|
||||
.form-tabs {
|
||||
display: flex;
|
||||
gap: 0.5rem;
|
||||
margin-bottom: 1.5rem;
|
||||
border-bottom: 2px solid var(--border-color);
|
||||
}
|
||||
|
||||
.tab-btn {
|
||||
padding: 0.75rem 1.5rem;
|
||||
border: none;
|
||||
background: transparent;
|
||||
cursor: pointer;
|
||||
font-size: 0.875rem;
|
||||
font-weight: 500;
|
||||
color: var(--text-secondary);
|
||||
border-bottom: 2px solid transparent;
|
||||
margin-bottom: -2px;
|
||||
transition: all 0.2s;
|
||||
}
|
||||
|
||||
.tab-btn:hover {
|
||||
color: var(--primary-color);
|
||||
}
|
||||
Reference in New Issue
Block a user