| | |
| | | <template> |
| | | <div class="w100 h100"> |
| | | <div class="aisde-title"> |
| | | <div class="flex items-center set-li" v-for="(item, index) in state.asideTitleList" :key="index"> |
| | | <div |
| | | class="flex items-center set-li" |
| | | v-for="(item, index) in state.asideTitleList" |
| | | :key="index" |
| | | @click="handleClick(item.id)" |
| | | :class="{ 'set-li-active': state.currentActive === item.id }" |
| | | > |
| | | <img :src="item.icon" alt="" class="pl-2.5 pr-2.5 w-4 h-4" style="box-sizing: content-box" /> |
| | | <span class="font-medium text-sm text-white tracking-wide">{{ item.title }}</span> |
| | | </div> |
| | |
| | | |
| | | <script setup lang="ts"> |
| | | import { reactive } from 'vue'; |
| | | import { gotoRoute } from '/@/utils/route'; |
| | | let state = reactive({ |
| | | asideTitleList: [ |
| | | { |
| | | id: '1', |
| | | id: 1, |
| | | icon: '/static/images/wave/AsideIcon.png', |
| | | title: '应用场景', |
| | | }, |
| | | { |
| | | id: '2', |
| | | id: 2, |
| | | icon: '/static/images/wave/AsideIcon.png', |
| | | title: '帮助中心', |
| | | }, |
| | | { |
| | | id: '3', |
| | | id: 3, |
| | | icon: '/static/images/wave/AsideIcon.png', |
| | | title: '个人设置', |
| | | }, |
| | | { |
| | | id: '4', |
| | | id: 4, |
| | | icon: '/static/images/wave/AsideIcon.png', |
| | | title: '关于水务AI', |
| | | }, |
| | | ], |
| | | currentActive: 0, |
| | | }); |
| | | const handleClick = (id) => { |
| | | state.currentActive = id; |
| | | if (id == 1) { |
| | | gotoRoute({ name: 'Scenario' }); |
| | | } |
| | | }; |
| | | </script> |
| | | <style scoped lang="scss"> |
| | | .aisde-title { |
| | |
| | | -ms-flex-align: center; |
| | | align-items: center; |
| | | cursor: pointer; |
| | | &:hover { |
| | | width: 214px; |
| | | height: 30px; |
| | | background-color: #3b3d40; |
| | | border-radius: 6px; |
| | | } |
| | | .set-li-active { |
| | | width: 214px; |
| | | height: 30px; |
| | | background-color: #3b3d40; |
| | | |
| | | border-radius: 6px; |
| | | span { |
| | | background: linear-gradient(90deg, #84fdd4 0, #2a82e4); |
| | | background-clip: text; |
| | | -webkit-background-clip: text; |
| | | -webkit-text-fill-color: transparent; |
| | | } |
| | | } |
| | | .user_login { |