| | |
| | | </template> |
| | | </van-tabbar-item> |
| | | <!-- /foreign --> |
| | | <van-tabbar-item name="trade" to="/foreign/deliveryContract/USDSGD"> |
| | | <van-tabbar-item name="trade" :to="'/foreign/deliveryContract/'+jgSymbol"> |
| | | <span :class="[active === 'trade' ? 'active' : '']">{{ $t('trade') }}</span> |
| | | <template #icon="props"> |
| | | <img :src="props.active ? icon.trade.active : icon.trade.inactive" /> |
| | | <img :src="active === 'trade' ? icon.trade.active : icon.trade.inactive" /> |
| | | </template> |
| | | </van-tabbar-item> |
| | | <!-- <van-tabbar-item name="funds" to="/cryptos/funds"> |
| | |
| | | import { useI18n } from "vue-i18n"; |
| | | import { useRoute } from 'vue-router'; |
| | | import { watch } from "vue"; |
| | | import { getLocalStorageValue } from '@/utils/utis.js' |
| | | const { t } = useI18n() |
| | | const active = ref('home') |
| | | const route = useRoute() |
| | | const jgSymbol = getLocalStorageValue('jgSymbol') |
| | | |
| | | if (route.path == "/trade/index") { |
| | | active.value = 'trade' |
| | | } else if (route.path.indexOf('/quotes') != -1) { |
| | |
| | | active.value = 'mine' |
| | | } else if (route.path == "/foreign/index") { |
| | | active.value = 'optional' |
| | | }else if (route.path == "/foreign/deliveryContract/USDSGD") { |
| | | }else if (route.path.startsWith("/foreign/deliveryContract/")) { |
| | | console.log('出现了') |
| | | active.value = 'trade' |
| | | }else if (route.path == "/cryptos/funds") { |
| | | active.value = 'funds' |
| | |
| | | let quotesStore = useQuotesStore() |
| | | |
| | | watch(() => route.path, (nv) => { |
| | | console.log('path', route.path) |
| | | if (route.path == "/trade/index") { |
| | | active.value = 'trade' |
| | | } else if (route.path.indexOf('/quotes') != -1) { |
| | |
| | | active.value = 'mine' |
| | | } else if (route.path == "/optional/index") { |
| | | active.value = 'optional' |
| | | }else if (route.path == "/foreign/deliveryContract/USDSGD") { |
| | | }else if (route.path.startsWith("/foreign/deliveryContract/")) { |
| | | console.log('出现了') |
| | | active.value = 'trade' |
| | | } |
| | | }) |