| | |
| | | </template> |
| | | </van-tabbar-item> |
| | | |
| | | <van-tabbar-item name="fund" to="/cryptos/fund"> |
| | | <span :class="[active === 'fund' ? 'active' : '']">{{ $t('理财') }}</span> |
| | | <van-tabbar-item name="fund" to="/cryptos/machine"> |
| | | <span :class="[active === 'fund' ? 'active' : '']">{{ $t('矿池') }}</span> |
| | | <template #icon="props"> |
| | | <img :src="props.active ? icon.sto.active : icon.sto.inactive" /> |
| | | </template> |
| | |
| | | active.value = 'assets' |
| | | } else if (route.path == "/documentation/index") { |
| | | active.value = 'documentation' |
| | | } else if (route.path == "/cryptos/fund" || route.path.indexOf('/cryptos/fund') != -1) { |
| | | } else if (isFundTabPath(route.path)) { |
| | | active.value = 'fund' |
| | | } |
| | | let quotesStore = useQuotesStore() |
| | |
| | | active.value = 'assets' |
| | | } else if (route.path == "/documentation/index") { |
| | | active.value = 'documentation' |
| | | } else if (route.path == "/cryptos/fund" || route.path.indexOf('/cryptos/fund') != -1) { |
| | | } else if (isFundTabPath(route.path)) { |
| | | active.value = 'fund' |
| | | } |
| | | }) |
| | | |
| | | const fundTabPrefixes = [ |
| | | '/cryptos/machine', |
| | | '/cryptos/fm-home', |
| | | '/cryptos/loan', |
| | | '/cryptos/pool-lock', |
| | | '/cryptos/machine-buy', |
| | | '/cryptos/machine-rule', |
| | | '/cryptos/machine-confirm', |
| | | '/cryptos/order-success', |
| | | '/cryptos/loanHistory', |
| | | '/cryptos/loanRule', |
| | | ] |
| | | function isFundTabPath(path) { |
| | | return fundTabPrefixes.some((p) => path === p || path.startsWith(p + '/')) |
| | | } |
| | | // 底部列表 |
| | | const icon = { |
| | | // optional: { |