From f9e00cc24be8f072465380ab791c174c5977e12e Mon Sep 17 00:00:00 2001
From: lxf <1371462558@qq.com>
Date: Tue, 27 May 2025 15:50:27 +0800
Subject: [PATCH] bug:标题视图不刷新
---
src/components/trade-head/index.vue | 15 +++++++++++----
1 files changed, 11 insertions(+), 4 deletions(-)
diff --git a/src/components/trade-head/index.vue b/src/components/trade-head/index.vue
index 9577176..83df047 100644
--- a/src/components/trade-head/index.vue
+++ b/src/components/trade-head/index.vue
@@ -23,7 +23,9 @@
@click="onSidebar"
/>
<div class="flex flex-col pl-21" @click="onSidebar">
- <div class="font-35 textColor">{{ symbolname || "--" }}</div>
+ <div class="font-35 textColor">
+ {{ newSymbolname || symbolname }}
+ </div>
</div>
<div
v-if="range"
@@ -90,8 +92,8 @@
</div>
<div
class="flex justify-between mb-50"
- v-for="item in list"
- :key="item.name"
+ v-for="(item, index) in list"
+ :key="item.symbol || item.name + index"
@click="onRoute(item)"
>
<div>
@@ -114,7 +116,7 @@
</template>
<script>
-import { setStorage } from "@/utils/utis";
+import { setStorage, getStorage } from "@/utils/utis";
import { Popup } from "vant";
import { mapGetters, mapMutations } from "vuex";
import {
@@ -183,6 +185,7 @@
}
return {
// selectIndex2:this.selectIndex,
+ newSymbolname: this.symbolname,
show: false,
timeout: null,
collected: "0",
@@ -195,7 +198,11 @@
};
},
watch: {
+ $route() {
+ this.newSymbolname = getStorage("symbolname") || "";
+ },
symbol(val) {
+ console.log("symbol", 123);
if (this.islevel) {
this.$emit("changeLine", true);
}
--
Gitblit v1.9.3