| | |
| | | @click="jump" /> |
| | | </div> --> |
| | | </div> |
| | | <div class="flex justify-between pt-34"> |
| | | <button class="tabBtn w-368 h-74 lh-74 border-none rounded" |
| | | :class="selectIndex == 1 ? 'select-active' : 'no-select'" @click="changeTab(1)"> |
| | | {{ $t('永续合约') }}</button> |
| | | <button class="tabBtn w-368 h-74 lh-74 border-none rounded" |
| | | :class="selectIndex == 2 ? 'select-one-active' : 'no-select'" @click="changeTab(2)"> |
| | | {{ queryType == 'cryptos' ? $t('交割合约') : $t('期货交易') }}</button> |
| | | <div class="flex justify-center pt-34"> |
| | | <button class="tabBtn w-368 h-74 lh-74 border-none rounded select-one-active"> |
| | | {{ queryType == 'cryptos' ? $t('AI量化') : $t('期货交易') }}</button> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | alt="logo" class="w-24 h-24 rounded-full mr-8" /> |
| | | {{ item.name }} |
| | | </div> |
| | | <div class="text-grey mt-10 font-28">{{ selectIndex == 1 ? $t('永续') : $t('交割') }}</div> |
| | | <div class="text-grey mt-10 font-28">{{ queryType == 'cryptos' ? $t('AI量化') : $t('交割') }}</div> |
| | | </div> |
| | | <div class="text-right"> |
| | | <div class="textColor font-28">{{ item.close }}</div> |
| | |
| | | computed: { |
| | | ...mapGetters({ coinList: 'home/coinList' }), |
| | | title() { |
| | | return [this.$t('永续'), this.$t('交割')][this.selectIndex - 1] |
| | | return this.queryType == 'cryptos' ? this.$t('AI量化') : this.$t('期货交易') |
| | | } |
| | | }, |
| | | data() { |
| | |
| | | }, |
| | | methods: { |
| | | onRoute(item) { |
| | | if (this.$route.params.symbol !== item.symbol) { |
| | | this.$router.push(`/cryptos/perpetualContract/${item.symbol}?type=${this.queryType}`) |
| | | if (this.symbol === item.symbol) { |
| | | this.show = false |
| | | return |
| | | } |
| | | setStorage('symbol', item.symbol) |
| | | const selectIndex = 2 |
| | | if (this.$route.name === 'tradeIndex' || this.$route.path.startsWith('/trade/index')) { |
| | | this.$router.push({ |
| | | path: '/trade/index', |
| | | query: { ...this.$route.query, selectIndex: String(selectIndex) } |
| | | }) |
| | | this.$emit('update-coin', item.symbol) |
| | | setStorage('symbol', item.symbol) |
| | | } else { |
| | | this.$router.push(`/cryptos/perpetualContract/${item.symbol}?type=${this.queryType}&selectIndex=${selectIndex}`) |
| | | this.$emit('update-coin', item.symbol) |
| | | this.$forceUpdate() |
| | | } |
| | | this.show = false |
| | |
| | | klineJump() { |
| | | this.$router.push(`/cryptos/trendDetails/${this.symbol}?type=${this.queryType}`) |
| | | }, |
| | | changeTab(index) { |
| | | this.$emit('tab', index) |
| | | // this.selectIndex2 = index; |
| | | changeTab() { |
| | | this.$emit('tab', 2) |
| | | }, |
| | | // onSearch: debounce(function (e) { |
| | | // console.log("e", this.popupSearch); |