bate版本提交

This commit is contained in:
2025-04-14 21:52:19 +08:00
parent 0bbe30bc7e
commit 6a6dabeca1
15 changed files with 466 additions and 111 deletions

View File

@@ -5,38 +5,57 @@
<img src="@/assets/logotext.png">
</div>
<ul>
<li @click="activeIndex = 1">
<RouterLink to="/workBenches">
<img v-if="activeIndex == 1" src="@/assets/navAction.png" autoplay loop muted class="background-img">
<li @click="updateActiveIndex(1)" v-show="userInfo.userType == 3">
<div>
<img v-show="activeIndex == 1" src="@/assets/navAction.png" autoplay loop muted class="background-img">
<div style="display: flex;">
<img v-if="activeIndex == 1" src="@/assets/workAction.png" style="margin-right: 10px;">
<img v-else src="@/assets/workAction.png" style="margin-right: 10px;">
<img v-show="activeIndex == 1" src="@/assets/workAction.png" style="margin-right: 10px;">
<img v-show="activeIndex == 2" src="@/assets/workAction.png" style="margin-right: 10px;">
<div :style="activeIndex == 1 ? 'color: #000' : 'color: #fff'" class="center-justify">工作台</div>
</div>
</RouterLink>
</div>
</li>
<li @click="activeIndex = 2">
<RouterLink to="/hostsList">
<img v-if="activeIndex == 2" src="@/assets/navAction.png" autoplay loop muted class="background-img">
<li @click="updateActiveIndex(2)">
<div>
<img v-show="activeIndex == 2" src="@/assets/navAction.png" autoplay loop muted class="background-img">
<div style="display: flex;">
<img v-if="activeIndex == 2" src="@/assets/listAction.png" style="margin-right: 10px;">
<img v-else src="@/assets/listAction.png" style="margin-right: 10px;">
<img v-show="activeIndex == 2" src="@/assets/listAction.png" style="margin-right: 10px;">
<img v-show="activeIndex == 1" src="@/assets/listAction.png" style="margin-right: 10px;">
<div :style="activeIndex == 2 ? 'color: #000' : 'color: #fff'" class="center-justify">主播列表</div>
</div>
</RouterLink>
</div>
</li>
</ul>
<a @click="$router.push('/')" href="javascript:void(0);"
style="position: absolute; bottom: 30px; color: aliceblue; font-size: 20px; font-weight: 500;">
退出登录
</a>
</div>
</template>
<script setup>
import { ref, reactive, onMounted } from 'vue';
import { getUser } from '@/utils/storage'
import { defineEmits } from 'vue';
const userInfo = ref(getUser())
let activeIndex = ref(userInfo.value.userType == 3 ? 1 : 2);
const emit = defineEmits(['update:activeIndex']);
let activeIndex = ref(1);
const updateActiveIndex = (index) => {
activeIndex.value = index;
emit('activeIndex', index);
};
</script>
<style scoped>
@@ -80,6 +99,7 @@ let activeIndex = ref(1);
display: flex;
align-items: center;
cursor: pointer;
}