From c423765d8a5ff0c58d23bb0a31af7df6c1fad95c Mon Sep 17 00:00:00 2001 From: YM <479443481@qq.com> Date: 星期五, 26 七月 2024 16:10:25 +0800 Subject: [PATCH] 1 --- src/pages/character/index.vue | 49 +++++++++++++++++++++++++++++-------------------- 1 files changed, 29 insertions(+), 20 deletions(-) diff --git a/src/pages/character/index.vue b/src/pages/character/index.vue index fe8ecf5..9fc8a27 100644 --- a/src/pages/character/index.vue +++ b/src/pages/character/index.vue @@ -2,9 +2,9 @@ <view style="width: 100%; height: 100%; display: flex; flex-direction: column" > - <headNav idIndex="1" text="涓尰浜虹墿鏁版嵁搴�" /> + <headNav idIndex="1" text="鍘嗕唬浜虹墿" /> <!-- 楂樼骇鎼滅储 --> - <view style="margin: 0.35rem 0 0.16rem 0"> + <view style="margin-top: 0.1rem"> <advancedSearch @onSearch="onSearch" @onSubmit="onSubmit" @@ -19,9 +19,9 @@ 鐑棬鎼滅储锛� <ul class="flex" style="margin-right: 10rpx"> <li - @click="onSearch({ text: item })" - class="cursor" - v-for="item in hotKeyList" + @click="onSearch({ text: item }, index)" + :class="{ cursor: true, active: hotAciveIndex === index }" + v-for="(item, index) in hotKeyList" :key="item" > {{ item }} @@ -32,7 +32,7 @@ <!-- 鍏崇郴琛ㄥ湴鍥� --> <view id="relation" - style="margin-top: 0.2rem; flex: 1; width: 100%; position: relative" + style="margin-top: 0.1rem; flex: 1; width: 100%; position: relative" > <div v-if="!loading && relationships.length == 0" @@ -106,6 +106,7 @@ data() { return { loading: true, + hotAciveIndex: "", // echarts鏁版嵁 nodes: [], // echarts涓よ�呯殑鍏崇郴 @@ -171,7 +172,7 @@ }, { type: "input", - label: "鏃堕棿", + label: "鏃舵湡", name: "period", value: "" }, @@ -347,17 +348,17 @@ let Distance = 10; // 涓嶅悓灏哄涓嬩慨鏀筫charts鐨勫瓧浣� if (window.innerWidth > 2560 && window.innerWidth <= 3840) { - FontSize = 28; + FontSize = 20; BorderWidth = 5; - SymbolSize = 100; + SymbolSize = 90; Distance = 33; } else if (window.innerWidth > 1920 && window.innerWidth <= 2560) { - FontSize = 28; + FontSize = 18; BorderWidth = 4; - SymbolSize = 90; + SymbolSize = 80; Distance = 22; } else if (window.innerWidth >= 1366 && window.innerWidth <= 1920) { - FontSize = 18; + FontSize = 14; BorderWidth = 4; SymbolSize = 70; Distance = 22; @@ -410,7 +411,6 @@ } }; }); - var option; option = { title: { @@ -483,7 +483,13 @@ option && myChart.setOption(option); }, // 鍩虹鎼滅储 - onSearch(val) { + onSearch(val, index) { + if (index !== undefined) { + this.searchKey = ""; + this.hotAciveIndex = index; + } else { + this.hotAciveIndex = ""; + } // this.searchKey = val.text; this.getData(val.text); }, @@ -588,11 +594,14 @@ .hotSearch { font-size: 0.12rem; color: #2c2c2c; - - li { - color: #244a7b; - margin: 0 0.1rem; - color: #244a7b; - } +} +.hotSearch li { + color: #244a7b; + margin: 0 0.1rem; + color: #244a7b; +} +.hotSearch li .active { + color: #027edc; + font-weight: bold; } </style> -- Gitblit v1.9.1