95 lines
1.8 KiB
Vue
95 lines
1.8 KiB
Vue
<template>
|
|||
|
|
<div class="user-bar">
|
||
|
|
<div class="container">
|
||
|
|
<n-popover trigger="click">
|
||
|
|
<template #trigger>
|
||
|
|
<div class="user-info">
|
||
|
|
<n-badge dot :offset="[-7, 29]" color="#008000">
|
||
|
|
<n-avatar round src="https://07akioni.oss-cn-beijing.aliyuncs.com/07akioni.jpeg" />
|
||
|
|
</n-badge>
|
||
|
|
<div class="user-name">
|
||
|
|
<div class="user-title">MarchGlow</div>
|
||
|
|
<div class="user-state">在线</div>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
</template>
|
||
|
|
<span>I wish they all could be California girls</span>
|
||
|
|
</n-popover>
|
||
|
|
|
||
|
|
<div class="feature">
|
||
|
|
<n-icon color="#fff" size="30"><SettingsSharp /></n-icon>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
</template>
|
||
|
|
|
||
|
|
<script setup lang="ts">
|
||
|
|
import { SettingsSharp } from '@vicons/ionicons5'
|
||
|
|
</script>
|
||
|
|
|
||
|
|
<style scoped lang="scss">
|
||
|
|
.user-bar {
|
||
|
|
display: flex;
|
||
|
|
width: 100%;
|
||
|
|
height: 100%;
|
||
|
|
padding: 8px;
|
||
|
|
align-items: center;
|
||
|
|
}
|
||
|
|
|
||
|
|
:deep(.n-badge .n-badge-sup) {
|
||
|
|
width: 12px;
|
||
|
|
height: 12px;
|
||
|
|
}
|
||
|
|
|
||
|
|
.container {
|
||
|
|
display: flex;
|
||
|
|
flex: 1;
|
||
|
|
align-items: center;
|
||
|
|
justify-content: space-between;
|
||
|
|
gap: 8px;
|
||
|
|
}
|
||
|
|
|
||
|
|
.user-info {
|
||
|
|
display: flex;
|
||
|
|
align-items: center;
|
||
|
|
height: 100%;
|
||
|
|
gap: 8px;
|
||
|
|
padding: 4px;
|
||
|
|
border-radius: 4px;
|
||
|
|
transition: background-color 0.2s ease;
|
||
|
|
}
|
||
|
|
|
||
|
|
.user-name {
|
||
|
|
display: flex;
|
||
|
|
flex-direction: column;
|
||
|
|
justify-content: space-between;
|
||
|
|
height: 34px;
|
||
|
|
width: 120px;
|
||
|
|
}
|
||
|
|
|
||
|
|
.user-title {
|
||
|
|
line-height: 18px;
|
||
|
|
overflow: hidden;
|
||
|
|
text-overflow: ellipsis;
|
||
|
|
white-space: nowrap;
|
||
|
|
font-size: 16px;
|
||
|
|
font-weight: 500;
|
||
|
|
text-align: left;
|
||
|
|
}
|
||
|
|
|
||
|
|
.user-state {
|
||
|
|
line-height: 12px;
|
||
|
|
overflow: hidden;
|
||
|
|
text-overflow: ellipsis;
|
||
|
|
white-space: nowrap;
|
||
|
|
font-size: 12px;
|
||
|
|
text-align: left;
|
||
|
|
}
|
||
|
|
|
||
|
|
.feature {
|
||
|
|
display: flex;
|
||
|
|
align-items: center;
|
||
|
|
justify-content: center;
|
||
|
|
}
|
||
|
|
</style>
|