parent
a72a80d58f
commit
8776fcafe9
@ -1,3 +1,3 @@
|
||||
{
|
||||
"recommendations": ["Vue.volar"]
|
||||
"recommendations": ["vue.volar", "cnblogs.vscode-cnb"]
|
||||
}
|
||||
|
After Width: | Height: | Size: 11 KiB |
@ -1,28 +0,0 @@
|
||||
<template>
|
||||
<el-dropdown>
|
||||
<span class="el-dropdown-link">
|
||||
<el-avatar :src="circleUrl" />
|
||||
</span>
|
||||
<template #dropdown>
|
||||
<el-dropdown-menu>
|
||||
<el-dropdown-item @click="logout">退出</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</template>
|
||||
</el-dropdown>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref } from 'vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
|
||||
const router = useRouter()
|
||||
const circleUrl = ref('https://liuyxcc.github.io/img/avatar.png')
|
||||
|
||||
const logout = () => {
|
||||
localStorage.clear()
|
||||
router.replace('/login')
|
||||
console.log('logout')
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped></style>
|
@ -1,28 +0,0 @@
|
||||
<template>
|
||||
<div class="hamburger-container" @click="toggleCollapse">
|
||||
<el-icon size="25px">
|
||||
<component :is="icon"></component>
|
||||
</el-icon>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { useStore } from '../../../store'
|
||||
import { computed } from 'vue'
|
||||
|
||||
const store = useStore()
|
||||
|
||||
const icon = computed(() => {
|
||||
return !store.collapse ? 'Fold' : 'Expand'
|
||||
})
|
||||
|
||||
const toggleCollapse = () => {
|
||||
store.changeCollapse()
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.hamburger-container {
|
||||
cursor: pointer;
|
||||
}
|
||||
</style>
|
@ -1,22 +0,0 @@
|
||||
<template>
|
||||
<el-icon size="25px" class="screenfull" @click="toggleScreen">
|
||||
<FullScreen />
|
||||
</el-icon>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import screenfull from 'screenfull'
|
||||
|
||||
// 利用screenfull插件实现全屏展示
|
||||
const toggleScreen = () => {
|
||||
if (screenfull.isEnabled) {
|
||||
screenfull.toggle()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.screenfull {
|
||||
cursor: pointer;
|
||||
}
|
||||
</style>
|
@ -1,40 +0,0 @@
|
||||
<template>
|
||||
<div class="header-container">
|
||||
<div class="navbar">
|
||||
<Hamburger />
|
||||
<div class="right-navbar">
|
||||
<Screenfull />
|
||||
<Avatar class="right-item" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="tabs-view-container">tabs</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import Hamburger from './components/Hamburger.vue'
|
||||
import Avatar from './components/Avatar.vue'
|
||||
import Screenfull from './components/Screenfull.vue'
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.header-container {
|
||||
padding: 0 10px;
|
||||
height: 100%;
|
||||
box-shadow: 0 2px 3px #888888;
|
||||
height: 60px;
|
||||
.navbar {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
.right-navbar {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
.right-item {
|
||||
margin-left: 10px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
Loading…
Reference in new issue