12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273 |
- <template>
- <div>
- <div id="MiForChange">
- <ul>
- <li v-for="item,index in hightLightSomeOne" :class="{'highlight' : item.status}">
- <span @click="showMi(item,index)">{{ item.name }}</span>
- </li>
- </ul>
- </div>
- </div>
- </template>
- <script>
- export default {
- name: 'MiForChange'
- }
- </script>
- <script setup>
- import 'element-plus/es/components/date-picker/style/css'
- import {
- ueCallChangeMi
- } from '@/utils/UIInteractions'
- import {reactive} from "vue";
- const hightLightSomeOne = reactive([
- // { name: '50m', status: false },
- { name: '100m', status: false }
- ])
- // eslint-disable-next-line no-unused-vars
- function showMi(mi,index){
- hightLightSomeOne[index].status= !hightLightSomeOne[index].status
- hightLightSomeOne.forEach((item,indexs)=>{
- if (index!=indexs) {
- item.status = false
- }
- })
- ueCallChangeMi(mi.name)
- }
- </script>
- <style lang="scss" scoped>
- #MiForChange {
- position: absolute;
- height: 40px;
- bottom: -37px;
- left: 63%;
- transform: translateX(-50%);
- display: flex;
- align-items: center;
- ul li{
- ransform: translateX(-50%);
- list-style: none;
- float: left;
- margin-right: 10px;
- font-size: 18px;
- font-weight: bold;}
- ul .highlight{
- span {
- color: #f0d60d;
- }
- }
- }
- </style>
|