Browse Source

feat: wifi控制

feature/three
guoapeng 3 months ago
parent
commit
7e4cf9f6b8
  1. 2
      src/app.vue
  2. 1
      src/assets/images/wifi-active.svg
  3. 4
      src/layouts/default.vue

2
src/app.vue

@ -1,5 +1,7 @@
<script setup lang="ts"> <script setup lang="ts">
import { socket } from 'libs/socket'
socket.init(() => {}, 'app')
</script> </script>
<template> <template>

1
src/assets/images/wifi-active.svg

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="42" height="34" viewBox="0 0 42 34"><g><path d="M41.5238,8.34171C30.1914,-2.78057,11.812,-2.78057,0.479575,8.34171C-0.159858,8.96929,-0.159858,9.98404,0.479575,10.6072C1.11901,11.2347,2.15289,11.2347,2.78777,10.6072C12.8459,0.735472,29.1575,0.735472,39.2156,10.6072C39.8551,11.2347,40.889,11.2347,41.5238,10.6072C42.1587,9.984,42.1587,8.96929,41.5238,8.34171ZM6.63327,15.2314C5.99383,15.859,5.99383,16.8737,6.63327,17.4968C7.2727,18.1244,8.30658,18.1244,8.94146,17.4968C15.5985,10.9632,26.3958,10.9632,33.0529,17.4968C33.6923,18.1244,34.7262,18.1244,35.3611,17.4968C36.0005,16.8692,36.0005,15.8545,35.3611,15.2314C27.4297,7.44712,14.5691,7.44712,6.63327,15.2314L6.63327,15.2314ZM29.2346,22.5395L29.2436,22.5306C24.7089,18.0799,17.358,18.0799,12.8278,22.5306C12.1883,23.1581,12.1883,24.1728,12.8278,24.7959C13.4672,25.4235,14.5011,25.4235,15.136,24.7959C18.3965,21.5959,23.6795,21.5959,26.9355,24.7959L26.9445,24.7871C26.9828,24.8337,27.0237,24.8783,27.0669,24.9206C27.7064,25.5481,28.7403,25.5481,29.3752,24.9206C30.0146,24.293,30.0146,23.2783,29.3752,22.6552C29.3253,22.6151,29.2799,22.5795,29.2346,22.5395ZM18.596,31.5966C18.596,32.924,19.6923,34,21.0448,34C22.3972,34,23.4935,32.924,23.4935,31.5966C23.4935,30.2693,22.3972,29.1932,21.0448,29.1932C19.6923,29.1932,18.596,30.2692,18.596,31.5966Z" fill="#1989FA" fill-opacity="1" style="mix-blend-mode:passthrough"/></g></svg>

4
src/layouts/default.vue

@ -1,4 +1,5 @@
<script setup lang="ts"> <script setup lang="ts">
import { isClose } from 'libs/socket'
import { formatDateTime } from 'libs/utils' import { formatDateTime } from 'libs/utils'
import { authRoutes } from 'router/routes' import { authRoutes } from 'router/routes'
import { useSystemStore } from 'stores/systemStore' import { useSystemStore } from 'stores/systemStore'
@ -28,7 +29,8 @@ onUnmounted(() => {
</div> </div>
<div class="header-right"> <div class="header-right">
<div class="wifi-icon"> <div class="wifi-icon">
<img src="../assets/images/wifi.svg" alt="">
<img v-if="isClose" src="../assets/images/wifi.svg" alt="">
<img v-else src="../assets/images/wifi-active.svg" alt="">
</div> </div>
<div class="time"> <div class="time">
{{ currentTime }} {{ currentTime }}

Loading…
Cancel
Save