<template>
  <div>
    <div class="btns flex">
      <div class="btn" :class="{active: type === 1}" @click="type = 1">
        <!-- 历史订单 -->
        {{ $t('exchange.l72') }}
      </div>
      <div class="btn" :class="{active: type === 2}" @click="type = 2">
        <!-- 当前订单 -->
        {{ $t('follow.l80') }}
      </div>
    </div>
    <historyList v-if="type == 1" />
    <openList v-if="type == 2" />
  </div>
</template>
<script>
import openList from "./components/openList.vue";
import historyList from "./components/historyList.vue";
export default {
  components: {
    openList,
    historyList
  },
  data () {
    return {
      type: 1,
    }
  }
}
</script>
<style lang="less" scoped>
.btns {
  padding: 10px 16px;
  background-color: #fff;
  white-space: nowrap;
  flex-wrap: nowrap;
  overflow-x: auto;
  &::-webkit-scrollbar {
    display: none;
  }
  .btn {
    cursor: pointer;
    margin-right: 20px;
    border-radius: 2px;
    border: 1px solid #ffffff;
    font-size: 12px;
    color: #B6B6B6;
    padding: 5px;
    &.active {
      border-color: #000;
      color: #000000;
    }
  }
}
</style>