交易所前端蓝色ui 4.5 jiem
123
dengchaochao
2024-06-10 99f91d00f05d502bd51e2fbe16d2485610cd67f7
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
<template>
  <div class="ticker-top-box">
    <div class="ticker-item ml-41" :key="i">
      <span
        :class="[
          'label',
          'fs-16',
          pageData?.change_ratio > 0 ? 'color-up' : 'color-down',
        ]"
        >{{ pageData?.close }}</span
      >
      <span class="value">${{ pageData?.close }}</span>
    </div>
    <div class="ticker-item ml-41">
      <span class="label">{{ t("message.home.24xiaoshizhangdie") }}</span
      ><span
        :class="[
          'value',
          pageData?.change_ratio > 0 ? 'color-up' : 'color-down',
        ]"
        >{{ pageData?.change_ratio > 0 ? "+" : ""
        }}{{ pageData?.change_ratio }}%</span
      >
    </div>
    <div class="ticker-item ml-41">
      <span class="label">24h{{ t("message.home.zuigao") }}</span>
      <span class="value">{{ pageData?.high }}</span>
    </div>
    <div class="ticker-item ml-41">
      <span class="label">24h{{ t("message.home.zuidi") }}</span>
      <span class="value">{{ pageData?.low }}</span>
    </div>
    <div class="ticker-item ml-41">
      <span class="label"
        >24h{{ t("message.home.liang") }}({{
          t(`${unitMap.amount[pageType]}`)
        }})</span
      >
      <span class="value">{{ pageData?.amount }} </span>
    </div>
    <div class="ticker-item ml-41">
      <span class="label"
        >24h{{ t("message.home.e") }}({{
          t(`${unitMap.volumn[pageType]}`)
        }})</span
      ><span class="value">{{ pageData?.volume }}</span>
    </div>
  </div>
</template>
<script setup>
import { useI18n } from "vue-i18n";
const { t } = useI18n();
const props = defineProps({
  pageData: {
    type: Object,
    default: {},
  },
  pageType: {
    type: String,
    default: "etf",
  },
});
const unitMap = {
  amount: {
    etf: "message.home.wangu",
    usStocks: "message.home.wangu",
    coin: "USDT", //改成当前币种
    forex: "USD",
  },
  volumn: {
    etf: "message.home.wan",
    usStocks: "message.home.wan",
    forex: "USD",
    coin: "USDT",
  },
};
</script>
<style>
/* TODO  */
 
.trade-header-box .ticker-xl-box .ticker-top-box .ml-41 {
  margin-left: 41px;
}
</style>