This commit is contained in:
那些花儿
2025-09-12 11:45:24 +08:00
parent 0777e2f4f7
commit 16f2dda958
15 changed files with 191 additions and 59 deletions
@@ -22,8 +22,9 @@ const apps = {
:class="['nav-item', { active: activeTab === index }]"
@click="onClickNav(index)"
>
<div class="nav-icon" v-if="category.icon">
<i :class="category.icon"></i>
<div class="nav-icon">
<i v-if="category.icon" :class="category.icon"></i>
<i v-else class="fa fa-book"></i>
</div>
<div class="nav-text">{{ category.name }}</div>
<div class="nav-indicator" v-if="activeTab === index"></div>
@@ -269,13 +270,6 @@ const apps = {
return
}
// 如果只有一个菜单项,直接跳转
if (menus.length === 1) {
this.navigateToMenu(menus[0])
return
}
// 多个菜单项时显示popup弹框
this.currentApp = app
this.currentMenus = menus
this.showMenuPopup = true
@@ -285,14 +279,11 @@ const apps = {
navigateToMenu(menu) {
// 关闭弹框
this.showMenuPopup = false
if (menu.href) {
// 如果是H5平台,直接跳转
if (menu.platform === 'H5') {
window.location.href = menu.href
} else {
// 其他平台可能需要特殊处理
if(menu.href.startsWith('http://') || menu.href.startsWith('https://')){
window.open(menu.href, '_blank')
}else{
this.$pjaxReplace(menu.href)
}
} else {
this.$toast('该功能暂不可用')
@@ -318,6 +309,12 @@ const apps = {
background: #f7f8fa;
border-right: 1px solid #ebedf0;
overflow-y: auto;
scrollbar-width: none; /* Firefox */
-ms-overflow-style: none; /* IE and Edge */
}
.tree-nav::-webkit-scrollbar {
display: none; /* Chrome, Safari and Opera */
}
.nav-item {