|
@@ -79,11 +79,18 @@ const navItems = computed<NavItem[]>(() => {
|
|
|
{ key: 'nav.idoPresale', to: '/finance/ido', icon: 'ido' },
|
|
{ key: 'nav.idoPresale', to: '/finance/ido', icon: 'ido' },
|
|
|
{ key: 'nav.claimAirdrop', to: '/finance/airdrop', icon: 'gift' },
|
|
{ key: 'nav.claimAirdrop', to: '/finance/airdrop', icon: 'gift' },
|
|
|
]
|
|
]
|
|
|
|
|
+ const futuresChildren: NavChild[] = [
|
|
|
|
|
+ { key: 'futuresPage.pairSearchTag.oneType', to: '/futures/BTC-USDT?filter=1' },
|
|
|
|
|
+ { key: 'futuresPage.pairSearchTag.twoType', to: '/futures/BTC-USDT?filter=2' },
|
|
|
|
|
+ { key: 'futuresPage.pairSearchTag.threeType', to: '/futures/BTC-USDT?filter=3' },
|
|
|
|
|
+ { key: 'futuresPage.pairSearchTag.fourType', to: '/futures/BTC-USDT?filter=4' },
|
|
|
|
|
+ ]
|
|
|
return [
|
|
return [
|
|
|
{ key: 'nav.home', to: '/' },
|
|
{ key: 'nav.home', to: '/' },
|
|
|
{ key: 'nav.market', to: '/market' },
|
|
{ key: 'nav.market', to: '/market' },
|
|
|
{ key: 'nav.spot', to: '/spot/BTC-USDT' },
|
|
{ key: 'nav.spot', to: '/spot/BTC-USDT' },
|
|
|
- { key: 'nav.futures', to: '/futures/BTC-USDT' },
|
|
|
|
|
|
|
+ { key: 'nav.futures', to: '/futures/BTC-USDT', children: futuresChildren },
|
|
|
|
|
+ { key: 'nav.rwa', to: '/rwa' },
|
|
|
{ key: 'nav.copyTrade', to: '/copy-trade' },
|
|
{ key: 'nav.copyTrade', to: '/copy-trade' },
|
|
|
{ key: 'nav.finance', children: financeChildren },
|
|
{ key: 'nav.finance', children: financeChildren },
|
|
|
{ key: 'nav.announcements', to: '/announcements' },
|
|
{ key: 'nav.announcements', to: '/announcements' },
|
|
@@ -155,18 +162,9 @@ async function handleLogout() {
|
|
|
class="nav-item-wrap"
|
|
class="nav-item-wrap"
|
|
|
:class="{ 'has-dropdown': item.children }"
|
|
:class="{ 'has-dropdown': item.children }"
|
|
|
>
|
|
>
|
|
|
- <!-- 无子菜单 -->
|
|
|
|
|
- <RouterLink
|
|
|
|
|
- v-if="item.to"
|
|
|
|
|
- :to="item.to"
|
|
|
|
|
- class="nav-item"
|
|
|
|
|
- :class="{ 'is-active': isActive(item) }"
|
|
|
|
|
- >
|
|
|
|
|
- {{ t(item.key) }}
|
|
|
|
|
- </RouterLink>
|
|
|
|
|
- <!-- 有子菜单 -->
|
|
|
|
|
|
|
+ <!-- 只有子菜单,没有to -->
|
|
|
<span
|
|
<span
|
|
|
- v-else
|
|
|
|
|
|
|
+ v-if="item.children && !item.to"
|
|
|
class="nav-item nav-item--dropdown"
|
|
class="nav-item nav-item--dropdown"
|
|
|
:class="{ 'is-active': isActive(item) }"
|
|
:class="{ 'is-active': isActive(item) }"
|
|
|
>
|
|
>
|
|
@@ -175,6 +173,28 @@ async function handleLogout() {
|
|
|
<path d="M0 0l5 6 5-6z"/>
|
|
<path d="M0 0l5 6 5-6z"/>
|
|
|
</svg>
|
|
</svg>
|
|
|
</span>
|
|
</span>
|
|
|
|
|
+ <!-- 只有to,没有子菜单 -->
|
|
|
|
|
+ <RouterLink
|
|
|
|
|
+ v-else-if="item.to && !item.children"
|
|
|
|
|
+ :to="item.to"
|
|
|
|
|
+ class="nav-item"
|
|
|
|
|
+ :class="{ 'is-active': isActive(item) }"
|
|
|
|
|
+ >
|
|
|
|
|
+ {{ t(item.key) }}
|
|
|
|
|
+ </RouterLink>
|
|
|
|
|
+ <!-- 既有to又有子菜单(合约) -->
|
|
|
|
|
+ <div v-else class="nav-item-wrap--both">
|
|
|
|
|
+ <RouterLink
|
|
|
|
|
+ :to="item.to!"
|
|
|
|
|
+ class="nav-item nav-item--dropdown"
|
|
|
|
|
+ :class="{ 'is-active': isActive(item) }"
|
|
|
|
|
+ >
|
|
|
|
|
+ {{ t(item.key) }}
|
|
|
|
|
+ <svg class="dropdown-arrow" width="10" height="10" viewBox="0 0 10 6" fill="currentColor">
|
|
|
|
|
+ <path d="M0 0l5 6 5-6z"/>
|
|
|
|
|
+ </svg>
|
|
|
|
|
+ </RouterLink>
|
|
|
|
|
+ </div>
|
|
|
<!-- 下拉面板 -->
|
|
<!-- 下拉面板 -->
|
|
|
<div v-if="item.children" class="dropdown-panel">
|
|
<div v-if="item.children" class="dropdown-panel">
|
|
|
<template v-for="(child, idx) in item.children" :key="child.to + (child.key ?? child.label ?? '')">
|
|
<template v-for="(child, idx) in item.children" :key="child.to + (child.key ?? child.label ?? '')">
|