| | |
| | | 热门搜索: |
| | | <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 }" |
| | | hotAciveIndex |
| | | v-for="(item, index) in hotKeyList" |
| | | :key="item" |
| | | > |
| | | {{ item }} |
| | |
| | | data() { |
| | | return { |
| | | loading: true, |
| | | hotAciveIndex: "", |
| | | // echarts数据 |
| | | nodes: [], |
| | | // echarts两者的关系 |
| | |
| | | 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); |
| | | }, |
| | |
| | | color: #244a7b; |
| | | margin: 0 0.1rem; |
| | | color: #244a7b; |
| | | &.active{ |
| | | color: #027EDC; |
| | | font-weight: bold; |
| | | } |
| | | } |
| | | } |
| | | </style> |