feat: 完成英雄配置编辑器全流程功能开发
本次提交实现了完整的英雄配置管理系统: 1. 新增服务器端英雄数据持久化接口,支持读取和保存英雄配置 2. 重构前端英雄编辑器UI,替换侧边栏为下拉选择器适配移动端 3. 统一调整前端页面样式,压缩间距适配更多内容 4. 修复Tooltip组件显示逻辑,优化技能飘字效果 5. 导入CSV英雄配置数据,补全全职业技能配置 6. 调整多个英雄预制体的尺寸和位置参数 7. 生成完整的英雄配置导出文件hexport.ts
This commit is contained in:
@@ -14,8 +14,27 @@ body {
|
||||
font-family: 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', Arial, sans-serif;
|
||||
background: var(--bg);
|
||||
color: var(--text);
|
||||
/* 编辑页全局缩小字号,同屏容纳更多字段 */
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
/* Element Plus 表单控件整体缩小一档(默认 14px → 12px) */
|
||||
.hero-app .el-input__wrapper,
|
||||
.hero-app .el-select__wrapper,
|
||||
.hero-app .el-textarea__inner,
|
||||
.hero-app .el-form-item__label {
|
||||
font-size: 12px;
|
||||
}
|
||||
/* 行间距压缩:表单项下边距 + 行高收紧 */
|
||||
.hero-app .el-form-item { margin-bottom: 8px; line-height: 1.2; }
|
||||
.hero-app .el-form-item__label { line-height: 1.2; padding-bottom: 2px; }
|
||||
.hero-app .el-button { font-size: 12px; height: 26px; padding: 8px 10px; }
|
||||
.hero-app .el-button--small { height: 22px; padding: 5px 8px; }
|
||||
.hero-app .el-input__inner { --el-input-height: 26px; }
|
||||
.hero-app .el-tabs__item { font-size: 12px; height: 30px; }
|
||||
.hero-app .el-tabs__header { margin-bottom: 8px; }
|
||||
.hero-app .el-tabs__nav-wrap::after { height: 1px; }
|
||||
|
||||
.hero-app {
|
||||
height: 100%;
|
||||
display: flex;
|
||||
@@ -31,49 +50,32 @@ body {
|
||||
justify-content: space-between;
|
||||
box-shadow: 0 2px 8px rgba(74, 144, 226, 0.25);
|
||||
}
|
||||
.hero-header h1 { font-size: 18px; margin: 0; font-weight: 600; }
|
||||
.hero-header h1 { font-size: 15px; margin: 0; font-weight: 600; }
|
||||
.hero-header .actions { display: flex; gap: 8px; }
|
||||
|
||||
.hero-main {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.hero-sidebar {
|
||||
width: 260px;
|
||||
/* 英雄选择工具栏:下拉选择替代侧边栏列表,适配手机竖屏 */
|
||||
.hero-toolbar {
|
||||
display: flex;
|
||||
gap: 8px;
|
||||
align-items: center;
|
||||
padding: 10px 14px;
|
||||
background: var(--panel);
|
||||
border-right: 1px solid var(--border);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
.hero-sidebar .side-head {
|
||||
padding: 12px 14px;
|
||||
font-weight: 600;
|
||||
color: var(--text);
|
||||
border-bottom: 1px solid var(--border);
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
.hero-list {
|
||||
flex: 1;
|
||||
overflow-y: auto;
|
||||
padding: 6px;
|
||||
.hero-toolbar .hero-select { flex: 1; min-width: 0; }
|
||||
.hero-option-meta {
|
||||
float: right;
|
||||
font-size: 11px;
|
||||
color: var(--text-light);
|
||||
}
|
||||
.hero-item {
|
||||
padding: 10px 12px;
|
||||
border-radius: 6px;
|
||||
cursor: pointer;
|
||||
margin-bottom: 4px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
transition: background 0.15s;
|
||||
}
|
||||
.hero-item:hover { background: #eef5ff; }
|
||||
.hero-item.active { background: #d6e8ff; color: var(--brand); font-weight: 600; }
|
||||
.hero-item .meta { font-size: 12px; color: var(--text-light); }
|
||||
|
||||
.hero-editor {
|
||||
flex: 1;
|
||||
@@ -84,14 +86,14 @@ body {
|
||||
.panel {
|
||||
background: var(--panel);
|
||||
border-radius: 8px;
|
||||
padding: 16px;
|
||||
margin-bottom: 14px;
|
||||
padding: 10px 12px;
|
||||
margin-bottom: 10px;
|
||||
border: 1px solid var(--border);
|
||||
box-shadow: 0 1px 3px rgba(46, 91, 160, 0.05);
|
||||
}
|
||||
.panel h3 {
|
||||
margin: 0 0 12px;
|
||||
font-size: 14px;
|
||||
margin: 0 0 8px;
|
||||
font-size: 13px;
|
||||
color: var(--brand);
|
||||
border-left: 3px solid var(--brand);
|
||||
padding-left: 8px;
|
||||
@@ -100,7 +102,7 @@ body {
|
||||
.form-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
|
||||
gap: 10px 18px;
|
||||
gap: 4px 14px;
|
||||
}
|
||||
|
||||
.muted { color: var(--text-light); font-size: 12px; }
|
||||
@@ -132,6 +134,17 @@ body {
|
||||
padding: 60px 0;
|
||||
}
|
||||
|
||||
@media (max-width: 900px) {
|
||||
.hero-sidebar { width: 200px; }
|
||||
/* 手机竖屏适配:头部按钮换行、表单单列、编辑区全宽滚动 */
|
||||
@media (max-width: 600px) {
|
||||
.hero-header {
|
||||
flex-wrap: wrap;
|
||||
gap: 8px;
|
||||
padding: 10px 12px;
|
||||
}
|
||||
.hero-header .actions { flex-wrap: wrap; }
|
||||
.hero-editor { padding: 12px 12px 40px; }
|
||||
.hero-toolbar { padding: 8px 10px; }
|
||||
.hero-toolbar .el-button { margin-left: 0; }
|
||||
.form-grid { grid-template-columns: 1fr; }
|
||||
.override-grid { grid-template-columns: 1fr; }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user