From 1201bf91b3dcac3f5b69c755ff2e54c362956467 Mon Sep 17 00:00:00 2001
From: admin <344137771@qq.com>
Date: Mon, 09 Mar 2026 16:41:01 +0800
Subject: [PATCH] 1

---
 src/components/trade-deep-data/index.vue |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/components/trade-deep-data/index.vue b/src/components/trade-deep-data/index.vue
index f821df6..29e3add 100644
--- a/src/components/trade-deep-data/index.vue
+++ b/src/components/trade-deep-data/index.vue
@@ -20,8 +20,8 @@
         <div class="green"></div>
       </div>
     </div>
-    <div class="flex font-10 orderbook sell" v-for="(item, index) in greenData" :key="index" @click="onPrice(item.price)"
-      :style="{
+    <div class="flex font-10 orderbook sell" v-for="(item, index) in greenData" :key="index"
+      @click="onPrice(item.price)" :style="{
         'background': `linear-gradient(to right,${THEME == 'dark' ? '#131a2e' : '#ffffff'} 0%` +
           (item.amount / greenData[greenData.length - 1].amount) * 100 + '%,rgba(69, 46, 66, 1) ' +
           (item.amount / greenData[greenData.length - 1].amount) * 100 + '%,rgba(69, 46, 66, 1) 100%)'
@@ -39,8 +39,8 @@
 <script>
 import { WS_URL } from '@/config'
 import { fixDate, formatMoney } from "@/utils";
+import { THEME } from '@/config/theme'
 const DEEP_LENGTH = 5
-const THEME = 'dark'
 
 export default {
   name: 'TradeDeepData',
@@ -81,6 +81,8 @@
   },
   methods: {
     startDeepSocket() { // 开启socket链接
+      this.redData = []
+      this.greenData = []
       this.closeSocket()
       this.socket = new WebSocket(`${WS_URL}/3/${this.symbol}`)
       this.socket.onmessage = (evt) => {

--
Gitblit v1.9.3