mirror of
https://github.com/chansee97/nova-admin.git
synced 2025-04-06 03:57:54 +08:00
refactor(components): 修复了头部按钮图标偏移的问题
This commit is contained in:
parent
c9703576bc
commit
d88fd6aec5
@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<n-icon :size="props.size || 18" :depth="props.depth" :color="props.color">
|
<n-icon :size="props.size || 20" :depth="props.depth" :color="props.color">
|
||||||
<Icon :icon="props.icon" />
|
<Icon :icon="props.icon" />
|
||||||
</n-icon>
|
</n-icon>
|
||||||
</template>
|
</template>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<n-breadcrumb class="px-5">
|
<n-breadcrumb class="px-4">
|
||||||
<n-breadcrumb-item v-for="(item, index) in routes" :key="index">
|
<n-breadcrumb-item v-for="(item, index) in routes" :key="index">
|
||||||
<e-icon :icon="item.meta.icon" />
|
<e-icon :icon="item.meta.icon" />
|
||||||
{{ item.meta.title }}
|
{{ item.meta.title }}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<HeaderButton @click="appStore.toggleCollapse()">
|
<HeaderButton @click="appStore.toggleCollapse()">
|
||||||
<e-icon v-if="appStore.collapsed" icon="icon-park-outline:menu-unfold" />
|
<i-icon-park-outline-menu-unfold v-if="appStore.collapsed" class="text-18px" />
|
||||||
<e-icon v-else icon="icon-park-outline:menu-fold" />
|
<i-icon-park-outline-menu-fold v-else class="text-18px" />
|
||||||
</HeaderButton>
|
</HeaderButton>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -2,8 +2,8 @@
|
|||||||
<n-tooltip placement="bottom" trigger="hover">
|
<n-tooltip placement="bottom" trigger="hover">
|
||||||
<template #trigger>
|
<template #trigger>
|
||||||
<HeaderButton @click="appStore.toggleDarkMode()">
|
<HeaderButton @click="appStore.toggleDarkMode()">
|
||||||
<e-icon v-if="appStore.darkMode" icon="icon-park-outline:moon" />
|
<i-icon-park-outline-moon v-if="appStore.darkMode" class="text-18px" />
|
||||||
<e-icon v-else icon="icon-park-outline:sun" />
|
<i-icon-park-outline-sun v-else class="text-18px" />
|
||||||
</HeaderButton>
|
</HeaderButton>
|
||||||
</template>
|
</template>
|
||||||
<span>切换主题模式</span>
|
<span>切换主题模式</span>
|
||||||
|
@ -2,8 +2,8 @@
|
|||||||
<n-tooltip placement="bottom" trigger="hover">
|
<n-tooltip placement="bottom" trigger="hover">
|
||||||
<template #trigger>
|
<template #trigger>
|
||||||
<HeaderButton @click="appStore.toggleFullScreen()">
|
<HeaderButton @click="appStore.toggleFullScreen()">
|
||||||
<e-icon v-if="appStore.fullScreen" icon="icon-park-outline:off-screen-two" />
|
<i-icon-park-outline-off-screen-two v-if="appStore.fullScreen" class="text-18px" />
|
||||||
<e-icon v-else icon="icon-park-outline:full-screen-two" />
|
<i-icon-park-outline-full-screen-two v-else class="text-18px" />
|
||||||
</HeaderButton>
|
</HeaderButton>
|
||||||
</template>
|
</template>
|
||||||
<span>全屏</span>
|
<span>全屏</span>
|
||||||
|
@ -1,7 +1,9 @@
|
|||||||
<template>
|
<template>
|
||||||
<n-tooltip placement="bottom" trigger="hover">
|
<n-tooltip placement="bottom" trigger="hover">
|
||||||
<template #trigger>
|
<template #trigger>
|
||||||
<HeaderButton @click="toMyGithub"><e-icon icon="icon-park-outline:github" /></HeaderButton>
|
<HeaderButton @click="toMyGithub">
|
||||||
|
<i-icon-park-outline-github class="text-18px" />
|
||||||
|
</HeaderButton>
|
||||||
</template>
|
</template>
|
||||||
<span>Github</span>
|
<span>Github</span>
|
||||||
</n-tooltip>
|
</n-tooltip>
|
||||||
|
@ -3,7 +3,9 @@
|
|||||||
<template #trigger>
|
<template #trigger>
|
||||||
<n-tooltip placement="bottom" trigger="hover">
|
<n-tooltip placement="bottom" trigger="hover">
|
||||||
<template #trigger>
|
<template #trigger>
|
||||||
<HeaderButton @click="openNotice"><e-icon icon="icon-park-outline:remind" /></HeaderButton>
|
<HeaderButton @click="openNotice">
|
||||||
|
<i-icon-park-outline-remind class="text-18px" />
|
||||||
|
</HeaderButton>
|
||||||
</template>
|
</template>
|
||||||
<span>消息通知</span>
|
<span>消息通知</span>
|
||||||
</n-tooltip>
|
</n-tooltip>
|
||||||
|
@ -1,7 +1,9 @@
|
|||||||
<template>
|
<template>
|
||||||
<n-tooltip placement="bottom" trigger="hover">
|
<n-tooltip placement="bottom" trigger="hover">
|
||||||
<template #trigger>
|
<template #trigger>
|
||||||
<HeaderButton @click="handleReload"><e-icon icon="icon-park-outline:refresh" /></HeaderButton>
|
<HeaderButton @click="handleReload">
|
||||||
|
<i-icon-park-outline-refresh class="text-18px" />
|
||||||
|
</HeaderButton>
|
||||||
</template>
|
</template>
|
||||||
<span>刷新页面</span>
|
<span>刷新页面</span>
|
||||||
</n-tooltip>
|
</n-tooltip>
|
||||||
|
@ -1,7 +1,9 @@
|
|||||||
<template>
|
<template>
|
||||||
<n-tooltip placement="bottom" trigger="hover">
|
<n-tooltip placement="bottom" trigger="hover">
|
||||||
<template #trigger>
|
<template #trigger>
|
||||||
<HeaderButton @click="handleSearch"><e-icon icon="icon-park-outline:search" /></HeaderButton>
|
<HeaderButton @click="handleSearch">
|
||||||
|
<i-icon-park-outline-search class="text-18px" />
|
||||||
|
</HeaderButton>
|
||||||
</template>
|
</template>
|
||||||
<span>搜索</span>
|
<span>搜索</span>
|
||||||
</n-tooltip>
|
</n-tooltip>
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
<template #trigger>
|
<template #trigger>
|
||||||
<HeaderButton @click="openSetting">
|
<HeaderButton @click="openSetting">
|
||||||
<div>
|
<div>
|
||||||
<e-icon icon="icon-park-outline:setting-two" />
|
<i-icon-park-outline-setting-two class="text-18px" />
|
||||||
<n-drawer v-model:show="drawerActive" :width="300">
|
<n-drawer v-model:show="drawerActive" :width="300">
|
||||||
<n-drawer-content title="系统设置">这是系统设置,但是暂时还没有内容</n-drawer-content>
|
<n-drawer-content title="系统设置">这是系统设置,但是暂时还没有内容</n-drawer-content>
|
||||||
</n-drawer>
|
</n-drawer>
|
||||||
|
4
src/types/global.d.ts
vendored
4
src/types/global.d.ts
vendored
@ -1,3 +1,7 @@
|
|||||||
|
import 'vue-router';
|
||||||
|
declare module 'vue-router' {
|
||||||
|
interface RouteMeta extends AppRoute.RouteMeta {}
|
||||||
|
}
|
||||||
interface Window {
|
interface Window {
|
||||||
$loadingBar?: import('naive-ui').LoadingBarApiInjection;
|
$loadingBar?: import('naive-ui').LoadingBarApiInjection;
|
||||||
$dialog?: import('naive-ui').DialogApiInjection;
|
$dialog?: import('naive-ui').DialogApiInjection;
|
||||||
|
4
src/types/router.d.ts
vendored
4
src/types/router.d.ts
vendored
@ -1,4 +0,0 @@
|
|||||||
import 'vue-router';
|
|
||||||
declare module 'vue-router' {
|
|
||||||
interface RouteMeta extends AppRoute.RouteMeta {}
|
|
||||||
}
|
|
Loading…
x
Reference in New Issue
Block a user