<template>
|
<div class="trade-page">
|
<!-- 主标签 -->
|
<div class="main-tabs">
|
<span class="tab-item">闪兑</span>
|
<span class="tab-item active">合约</span>
|
<span class="tab-item">股票</span>
|
<span class="tab-item red-dot">股票</span>
|
<div class="tab-right">
|
<span class="tab-icon">?</span>
|
<span class="tab-icon">☰</span>
|
</div>
|
</div>
|
|
<!-- 子标签 -->
|
<div class="sub-tabs">
|
<span class="sub-tab-item">市价</span>
|
<span class="sub-tab-item active">跨链</span>
|
<span class="sub-tab-item">限价</span>
|
</div>
|
|
<!-- 交易区域 -->
|
<div class="trade-area">
|
<!-- 上方输入 -->
|
<div class="trade-input top">
|
<div class="input-left">
|
<div class="input-value">0</div>
|
<div class="input-fiat">$0.00</div>
|
</div>
|
<div class="input-right">
|
<div class="token-select">
|
<div class="token-icon">S</div>
|
<span class="token-name">BGB</span>
|
<span class="dropdown">▼</span>
|
</div>
|
<div class="token-balance">0.00 BGB</div>
|
<button class="add-btn">+</button>
|
</div>
|
</div>
|
|
<!-- 互换按钮 -->
|
<div class="swap-icon">⇅</div>
|
|
<!-- 下方输入 -->
|
<div class="trade-input bottom">
|
<div class="input-left">
|
<div class="input-value">0</div>
|
<div class="input-fiat">$0.00 价格影响%</div>
|
</div>
|
<div class="input-right">
|
<div class="token-select">
|
<div class="token-icon usdt">T</div>
|
<span class="token-name">USDT</span>
|
<span class="dropdown">▼</span>
|
</div>
|
<div class="token-balance">0.00 USDT</div>
|
</div>
|
</div>
|
</div>
|
|
<!-- 交易按钮 -->
|
<div class="trade-button-wrapper">
|
<button class="trade-button">交易</button>
|
</div>
|
|
<!-- 底部信息 -->
|
<div class="bottom-info">
|
<span>USDT</span>
|
<span>1 +0.00% ^</span>
|
</div>
|
|
<!-- 底部导航 -->
|
<BottomNav />
|
</div>
|
</template>
|
|
<script setup lang="ts">
|
import BottomNav from '@/components/BottomNav.vue'
|
</script>
|
|
<style lang="scss" scoped>
|
@import '@/styles/variables.scss';
|
|
.trade-page {
|
background: $bg-primary;
|
padding-bottom: 60px;
|
min-height: 100vh;
|
}
|
|
.main-tabs {
|
display: flex;
|
align-items: center;
|
padding: 12px 16px;
|
gap: 24px;
|
border-bottom: 1px solid $border-light;
|
|
.tab-item {
|
font-size: $font-md;
|
color: $text-secondary;
|
position: relative;
|
|
&.active {
|
color: $text-primary;
|
font-weight: 500;
|
}
|
|
&.red-dot::after {
|
content: '';
|
position: absolute;
|
top: -4px;
|
right: -8px;
|
width: 6px;
|
height: 6px;
|
background: $error-red;
|
border-radius: 50%;
|
}
|
}
|
|
.tab-right {
|
margin-left: auto;
|
display: flex;
|
gap: 16px;
|
|
.tab-icon {
|
width: 24px;
|
height: 24px;
|
display: flex;
|
align-items: center;
|
justify-content: center;
|
color: $text-secondary;
|
}
|
}
|
}
|
|
.sub-tabs {
|
display: flex;
|
padding: 12px 16px;
|
gap: 24px;
|
border-bottom: 1px solid $border-light;
|
|
.sub-tab-item {
|
font-size: $font-md;
|
color: $text-secondary;
|
position: relative;
|
|
&.active {
|
color: $primary-blue;
|
font-weight: 500;
|
|
&::after {
|
content: '';
|
position: absolute;
|
bottom: -12px;
|
left: 0;
|
right: 0;
|
height: 2px;
|
background: $primary-blue;
|
}
|
}
|
}
|
}
|
|
.trade-area {
|
padding: 24px 16px;
|
|
.trade-input {
|
background: $bg-secondary;
|
border-radius: $radius-lg;
|
padding: 20px;
|
margin-bottom: 16px;
|
|
&.top {
|
margin-bottom: 8px;
|
}
|
|
&.bottom {
|
margin-top: 8px;
|
}
|
|
.input-left {
|
margin-bottom: 16px;
|
|
.input-value {
|
font-size: 32px;
|
font-weight: 500;
|
margin-bottom: 4px;
|
}
|
|
.input-fiat {
|
font-size: $font-sm;
|
color: $text-secondary;
|
}
|
}
|
|
.input-right {
|
display: flex;
|
align-items: center;
|
justify-content: space-between;
|
|
.token-select {
|
display: flex;
|
align-items: center;
|
gap: 8px;
|
|
.token-icon {
|
width: 32px;
|
height: 32px;
|
border-radius: 50%;
|
background: $primary-blue;
|
color: white;
|
display: flex;
|
align-items: center;
|
justify-content: center;
|
font-weight: bold;
|
|
&.usdt {
|
background: $success-green;
|
}
|
}
|
|
.token-name {
|
font-size: $font-lg;
|
font-weight: 500;
|
}
|
|
.dropdown {
|
font-size: $font-xs;
|
color: $text-tertiary;
|
}
|
}
|
|
.token-balance {
|
font-size: $font-sm;
|
color: $text-secondary;
|
}
|
|
.add-btn {
|
width: 24px;
|
height: 24px;
|
border-radius: 50%;
|
background: $primary-blue;
|
color: white;
|
border: none;
|
display: flex;
|
align-items: center;
|
justify-content: center;
|
font-size: 18px;
|
cursor: pointer;
|
}
|
}
|
}
|
|
.swap-icon {
|
width: 40px;
|
height: 40px;
|
border-radius: 50%;
|
background: $bg-dark;
|
color: white;
|
display: flex;
|
align-items: center;
|
justify-content: center;
|
margin: -20px auto;
|
position: relative;
|
z-index: 1;
|
font-size: 20px;
|
cursor: pointer;
|
}
|
}
|
|
.trade-button-wrapper {
|
padding: 0 16px 16px;
|
|
.trade-button {
|
width: 100%;
|
background: $primary-blue;
|
color: white;
|
border: none;
|
border-radius: $radius-lg;
|
padding: 16px;
|
font-size: $font-lg;
|
font-weight: 500;
|
cursor: pointer;
|
}
|
}
|
|
.bottom-info {
|
display: flex;
|
justify-content: space-between;
|
padding: 12px 16px;
|
font-size: $font-sm;
|
color: $text-secondary;
|
border-top: 1px solid $border-light;
|
}
|
</style>
|