fix: 给纯图标按钮加上悬停提示
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<script setup lang="ts">
|
||||
import { ref } from "vue";
|
||||
import { NButton, NIcon, NLayout, NLayoutSider, NMenu, useDialog } from "naive-ui";
|
||||
import { NButton, NIcon, NLayout, NLayoutSider, NMenu, NTooltip, useDialog } from "naive-ui";
|
||||
import { LogOutOutline, MoonOutline, PersonOutline, SunnyOutline } from "@vicons/ionicons5";
|
||||
import { logout, type UserInfo } from "../features/auth/api";
|
||||
import { loadActiveDownloadCount } from "../features/download/api";
|
||||
@@ -111,12 +111,22 @@ async function signOut() {
|
||||
<strong>{{ props.user.userName || props.user.loginId }}</strong>
|
||||
<span>{{ props.user.cityName || "已登录" }}</span>
|
||||
</div>
|
||||
<n-button quaternary circle size="small" :aria-label="isDark ? '切换到日间' : '切换到夜间'" @click="toggleTheme">
|
||||
<template #icon><n-icon><MoonOutline v-if="!isDark" /><SunnyOutline v-else /></n-icon></template>
|
||||
</n-button>
|
||||
<n-button quaternary circle size="small" aria-label="退出" @click="signOut">
|
||||
<template #icon><n-icon><LogOutOutline /></n-icon></template>
|
||||
</n-button>
|
||||
<n-tooltip>
|
||||
<template #trigger>
|
||||
<n-button quaternary circle size="small" :aria-label="isDark ? '切换到日间' : '切换到夜间'" @click="toggleTheme">
|
||||
<template #icon><n-icon><MoonOutline v-if="!isDark" /><SunnyOutline v-else /></n-icon></template>
|
||||
</n-button>
|
||||
</template>
|
||||
{{ isDark ? "切换到日间" : "切换到夜间" }}
|
||||
</n-tooltip>
|
||||
<n-tooltip>
|
||||
<template #trigger>
|
||||
<n-button quaternary circle size="small" aria-label="退出" @click="signOut">
|
||||
<template #icon><n-icon><LogOutOutline /></n-icon></template>
|
||||
</n-button>
|
||||
</template>
|
||||
退出
|
||||
</n-tooltip>
|
||||
</div>
|
||||
</div>
|
||||
</n-layout-sider>
|
||||
|
||||
Reference in New Issue
Block a user