三级菜单UI
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
yiqiu
2026-01-11 12:02:28 +08:00
parent 123750e904
commit c1036a3d14
2 changed files with 123 additions and 1 deletions

View File

@@ -761,7 +761,7 @@
grandChildren.forEach((grandChild, grandIndex) => {
const item = document.createElement('div');
item.style.cssText = 'padding:8px; margin-bottom:6px; background:#fafafa; border-radius:3px; border-left:2px solid #52c41a;';
item.style.cssText = 'padding:8px; margin-bottom:6px; margin-left:24px; background:#fff7e6; border-radius:3px; border-left:3px solid #fa8c16;';
// 生成地区选项(只使用方形图标,排除-y后缀的圆形图标
const countryOptions = getCountryOptions();
@@ -775,6 +775,7 @@
item.innerHTML = `
<div style="display:flex; gap:6px; align-items:start;">
<span style="color:#fa8c16; font-weight:600; font-size:11px;">🏷️ 三级</span>
<div style="flex:1; display:grid; gap:6px;">
<input type="text" class="form-control form-control-sm" data-hnav-grandchild="${navIndex}.${childIndex}.${grandIndex}" data-field="name" value="${grandChild.name || ''}" placeholder="三级菜单名称香港SAS" style="font-size:12px;">
<input type="text" class="form-control form-control-sm" data-hnav-grandchild="${navIndex}.${childIndex}.${grandIndex}" data-field="file_address" value="${grandChild.file_address || ''}" placeholder="链接地址" style="font-size:12px;">

View File

@@ -0,0 +1,121 @@
/* 导航配置表格样式 */
.nav-config-table {
width: 100%;
border-collapse: collapse;
background: #fff;
font-size: 13px;
margin-top: 12px;
}
.nav-config-table thead th {
background: #f5f5f5;
padding: 10px 8px;
text-align: left;
font-weight: 600;
border: 1px solid #e0e0e0;
font-size: 12px;
}
.nav-config-table tbody td {
padding: 8px;
border: 1px solid #e8e8e8;
vertical-align: middle;
}
.nav-config-table input[type="text"],
.nav-config-table select {
width: 100%;
padding: 4px 8px;
border: 1px solid #d9d9d9;
border-radius: 2px;
font-size: 12px;
}
.nav-config-table input[type="text"]:focus,
.nav-config-table select:focus {
border-color: #1890ff;
outline: none;
}
.nav-config-table input[type="checkbox"] {
margin-right: 4px;
}
/* 层级缩进样式 */
.nav-level-1 {
padding-left: 8px !important;
background: #fafafa;
}
.nav-level-2 {
padding-left: 32px !important;
background: #f0f7ff;
}
.nav-level-3 {
padding-left: 56px !important;
background: #f6ffed;
}
/* 层级标签 */
.level-badge {
display: inline-block;
padding: 2px 6px;
border-radius: 3px;
font-size: 11px;
font-weight: 600;
margin-right: 6px;
}
.level-badge-1 {
background: #52c41a;
color: #fff;
}
.level-badge-2 {
background: #1890ff;
color: #fff;
}
.level-badge-3 {
background: #fa8c16;
color: #fff;
}
/* 操作按钮 */
.nav-action-btn {
padding: 2px 8px;
border: none;
border-radius: 2px;
cursor: pointer;
font-size: 11px;
margin: 0 2px;
transition: all 0.2s;
}
.nav-action-btn-add {
background: #52c41a;
color: #fff;
}
.nav-action-btn-add:hover {
background: #389e0d;
}
.nav-action-btn-remove {
background: #ff4d4f;
color: #fff;
}
.nav-action-btn-remove:hover {
background: #cf1322;
}
.nav-action-btn-toggle {
background: #1890ff;
color: #fff;
}
.nav-action-btn-toggle:hover {
background: #096dd9;
}