From f0380c48b2e9e05bded4bf5221cd07211c1ef495 Mon Sep 17 00:00:00 2001 From: 杨磊 <505174330@qq.com> Date: 星期三, 12 六月 2024 19:17:15 +0800 Subject: [PATCH] Merge branch 'master' of http://182.92.203.7:2001/r/TCM_CharacterLibrary --- src/pages/character/index.vue | 21 ++++++++++++++++----- 1 files changed, 16 insertions(+), 5 deletions(-) diff --git a/src/pages/character/index.vue b/src/pages/character/index.vue index fe8ecf5..b7688d7 100644 --- a/src/pages/character/index.vue +++ b/src/pages/character/index.vue @@ -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 }} @@ -106,6 +106,7 @@ data() { return { loading: true, + hotAciveIndex: "", // echarts鏁版嵁 nodes: [], // echarts涓よ�呯殑鍏崇郴 @@ -171,7 +172,7 @@ }, { type: "input", - label: "鏃堕棿", + label: "鏃舵湡", name: "period", value: "" }, @@ -483,7 +484,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); }, @@ -593,6 +600,10 @@ color: #244a7b; margin: 0 0.1rem; color: #244a7b; + &.active{ + color: #027EDC; + font-weight: bold; + } } } </style> -- Gitblit v1.9.1