<template>
  <!-- 历史成交 -->
  <div class="history-trans">
    <div class="details-item" v-for="(item, index) in 2" :key="index">
      <div class="item-name">
        <div class="name-left">
          <img src="../../../assets/icon/coin/bnb.svg" alt="" class="left-coin" />
          <div class="name-area">
            <div class="pf500 fs16 fc121212">BTC/USDT 永续</div>
            <div class="name-flag">
              <div class="flag-buy pf500 fs10 fcFFFFFF">买入</div>
              <div class="flag-cang pf500 fs10 fcFFFFFF">逐仓 20X</div>
            </div>
          </div>
        </div>
        <div class="name-right">
          <div class="pf500 fs12 fc767676">2025-11-04, 16:30</div>
          <div class="pf500 fs12 fc767676">下单时间</div>
        </div>
      </div>
      <div class="item-line"></div>
      <div class="item-price">
        <div class="price-top">
          <div class="item-yingkui">
            <div class="pf500 fs12 fcA8A8A8">已实现盈亏(USDT)</div>
            <div class="pf500 fs12 fc45B26B">+0.2015 USDT</div>
          </div>
          <div class="item-order">
            <div class="pf500 fs12 fcA8A8A8">订单号</div>
            <div class="copy pf500 fs12 fcA8A8A8">
              2508050505052008502060
              <img src="../../../assets/icon/asset/CopySimple.svg" alt="" />
            </div>
          </div>
        </div>
        <div class="price-bottom">
          <div class="price-item">
            <div class="pf500 fs12 fcA8A8A8">成交数量</div>
            <div class="pf500 fs12 fc333333">0.215 USDT</div>
          </div>
          <div class="price-item">
            <div class="pf500 fs12 fcA8A8A8">成交价格</div>
            <div class="pf500 fs12 fc333333">0.215 USDT</div>
          </div>
          <div class="price-item">
            <div class="pf500 fs12 fcA8A8A8">手续费</div>
            <div class="pf500 fs12 fc333333">0.215 USDT</div>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>
<script setup></script>
<style lang="less" scoped>
  .history-trans {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    margin-top: 10px;
    width: 100%;

    .details-item {
      display: flex;
      flex-direction: column;
      justify-content: flex-start;
      align-items: center;
      margin-top: 10px;
      width: 345px;
      height: 155px;
      border: 1px solid #ebebeb;
      border-radius: 8px;

      .item-name {
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        margin-top: 10px;
        width: 320px;
        height: 40px;

        .name-left {
          display: flex;
          flex-direction: row;
          justify-content: flex-start;
          height: 40px;

          .left-coin {
            width: 40px;
            height: 40px;
          }

          .name-area {
            display: flex;
            flex-direction: column;
            justify-content: space-evenly;
            margin-left: 8px;
            height: 40px;

            .name-flag {
              display: flex;
              flex-direction: row;
              justify-content: flex-start;
              height: 15px;

              .flag-buy {
                width: 33px;
                height: 15px;
                line-height: 15px;
                text-align: center;
                background: #45b26b;
                border-radius: 3px;
              }

              .flag-cang {
                margin-left: 2px;
                width: 49px;
                height: 15px;
                line-height: 15px;
                text-align: center;
                background: #a8a8a8;
                border-radius: 3px;
              }
            }
          }
        }

        .name-right {
          display: flex;
          flex-direction: column;
          justify-content: space-evenly;
          align-items: flex-end;
          height: 40px;
        }
      }

      .item-line {
        margin-top: 8px;
        width: 320px;
        height: 1.5px;
        background: #e9e9e9;
      }

      .item-price {
        width: 320px;
        height: 85px;

        .price-top {
          .item-order {
            display: flex;
            flex-direction: row;
            justify-content: space-between;
            align-items: center;
            width: 320px;
            height: 20px;

            .copy {
              display: flex;
              flex-direction: row;
              justify-content: flex-start;
              align-items: center;
              height: 20px;

              img {
                margin-left: 5px;
              }
            }
          }
          .item-yingkui {
            display: flex;
            flex-direction: row;
            justify-content: space-between;
            align-items: center;
            margin-top: 4px;
            width: 320px;
            height: 20px;
          }
        }

        .price-bottom {
          display: flex;
          flex-direction: row;
          justify-content: space-between;
          margin-top: 4px;
          width: 100%;
          height: 38px;

          .price-item {
            display: flex;
            flex-direction: column;
            justify-content: space-evenly;
            align-items: center;
            width: 80px;
            height: 38px;
          }
        }
      }
    }
  }
</style>
