feat(components): 增加刷新、搜索的头部按钮

This commit is contained in:
Coffee-crocodile 2022-08-12 09:35:26 +08:00
parent f336487fca
commit c832194801
4 changed files with 54 additions and 1 deletions

View File

@ -11,6 +11,8 @@
<Breadcrumb />
</div>
<div class="flex-y-center h-full">
<Refresh />
<Search />
<Notices />
<Github />
<FullScreen />
@ -44,6 +46,8 @@ import {
Github,
Notices,
UserCenter,
Search,
Refresh,
} from '../components';
const appStore = useAppStore();

View File

@ -0,0 +1,17 @@
<template>
<n-tooltip placement="bottom" trigger="hover">
<template #trigger>
<HeaderButton @click="handleRefresh"><e-icon icon="icon-park-outline:refresh" /></HeaderButton>
</template>
<span>刷新页面</span>
</n-tooltip>
</template>
<script setup lang="ts">
import HeaderButton from '../common/HeaderButton.vue';
const handleRefresh = () => {
window.open('https://github.com/chen-see');
};
</script>
<style scoped></style>

View File

@ -0,0 +1,17 @@
<template>
<n-tooltip placement="bottom" trigger="hover">
<template #trigger>
<HeaderButton @click="handleSearch"><e-icon icon="icon-park-outline:search" /></HeaderButton>
</template>
<span>搜索</span>
</n-tooltip>
</template>
<script setup lang="ts">
import HeaderButton from '../common/HeaderButton.vue';
const handleSearch = () => {
window.open('https://github.com/chen-see');
};
</script>
<style scoped></style>

View File

@ -11,5 +11,20 @@ import Setting from './header/Setting.vue';
import Github from './header/Github.vue';
import Notices from './header/Notices.vue';
import UserCenter from './header/UserCenter.vue';
import Search from './header/Search.vue';
import Refresh from './header/Refresh.vue';
export { Breadcrumb, CollapaseButton, Menu, Logo, FullScreen, DarkMode, Setting, Github, Notices, UserCenter };
export {
Breadcrumb,
CollapaseButton,
Menu,
Logo,
FullScreen,
DarkMode,
Setting,
Github,
Notices,
UserCenter,
Search,
Refresh,
};