From 3f1ab7f7f65fe665f6977f94899c763cc1ef1faf Mon Sep 17 00:00:00 2001
From: 李凌 <344137771@qq.com>
Date: Tue, 02 Jun 2026 15:56:14 +0800
Subject: [PATCH] 1
---
src/components/Transform/cryptos-trade-deep-data/index.vue | 18 +++++++++++-------
1 files changed, 11 insertions(+), 7 deletions(-)
diff --git a/src/components/Transform/cryptos-trade-deep-data/index.vue b/src/components/Transform/cryptos-trade-deep-data/index.vue
index 820cde7..55d3979 100644
--- a/src/components/Transform/cryptos-trade-deep-data/index.vue
+++ b/src/components/Transform/cryptos-trade-deep-data/index.vue
@@ -7,12 +7,12 @@
</div>
<div class="text-right items-end justify-end">
<div class="">{{ $t('数量') }}</div>
- <div class="mt-5">({{ symbol_data.toUpperCase() || '--' }})</div>
+ <div class="mt-5">({{ symbol_name.toUpperCase() || '--' }})</div>
</div>
</div>
- <div v-if="showType == 0 || showType == 2" class="flex justify-between pt-6 font-26" v-for="(item, index) in redData"
- :key="item + index" @click="onPrice(item.price)" :style="{
+ <div v-if="showType == 0 || showType == 2" class="flex justify-between pt-6 font-26"
+ v-for="(item, index) in redData" :key="item + index" @click="onPrice(item.price)" :style="{
'background': `linear-gradient(to right,${THEME == 'dark' ? '#131A2E' : '#fff'} 0%` +
(item.amount / greenData[greenData.length - 1].amount) * 100 + '%,rgba(246,70,93,.1) ' +
(item.amount / greenData[greenData.length - 1].amount) * 100 + '%,rgba(246,70,93,.1) 100%)'
@@ -44,8 +44,8 @@
<script>
import { WS_URL } from '@/config'
-import { fixDate } from "@/utils/utis";
-import { THEME } from '@/config/theme'
+import { fixDate, strToArr } from "@/utils/utis";
+// import { THEME } from '@/config/theme'
import { _getHomeList } from '@/service/home.api'
import { mapGetters } from 'vuex'
let DEEP_LENGTH = 6
@@ -74,12 +74,12 @@
init.push({ amount: '', price: '' })
}
return {
- THEME,
fixDate,
greenData: init,
redData: init,
socket: null,
- symbol_data: ''
+ symbol_data: '',
+ symbol_name: '',
}
},
mounted() {
@@ -106,11 +106,15 @@
},
computed: {
...mapGetters('home', ['currency']),
+ THEME() {
+ return this.$store.state.vant.theme
+ }
},
methods: {
getHomeList() {
_getHomeList(this.symbol).then((res) => {
this.symbol_data = res[0].symbol_data
+ this.symbol_name = strToArr(res[0].name, '/')[0]
let numberText = res[0].close.toString()
let numberLength = (numberText.substring(numberText.indexOf('.') + 1, numberText.length)).length
--
Gitblit v1.9.3