1
jhzh
2025-06-16 1760942f9204e56032ca93ff1b720bbf966dd495
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<template>
  <table class="w-max">
    <thead>
      <tr class="fn-sm">
        <th class="p-l-md p-y-xs fn-left">{{$t('exchange.d4')}}</th>
        <th class="fn-left">{{$t('exchange.d5')}}</th>
        <th class="fn-right">{{$t('exchange.d2')}}</th>
        <th class="p-r-md p-y-xs fn-right">{{$t('exchange.c5')}}</th>
      </tr>
    </thead>
    <tbody class="color-light">
      <tr v-for="(item,idx) in tradeList" :key="idx">
        <td class="p-l-md p-y-xs">{{parseTime(item.ts,false,'{h}:{i}:{s}')}}</td>
        <td>
          <span class="color-buy" v-if="item.direction=='buy'">
            {{$t('exchange.b5')}}
          </span>
          <span class="color-sell" v-else>
            {{$t('exchange.b6')}}
          </span>
        </td>
        <td class="fn-right">{{item.price}}</td>
        <td class="p-r-md p-y-xs fn-right">{{omitTo(item.amount,8)*1}}</td>
      </tr>
    </tbody>
  </table>
</template>
<script>
import math from "@/utils/class/math";
import date from "@/utils/class/date";
export default {
  props: {
    tradeList: {
      default() {
        return [];
      },
      type: Array,
      required: false,
    },
  },
  methods:{
    parseTime:date.parseTime,
    omitTo:math.omitTo,
  }
};
</script>