mirror of
https://github.com/nagisa77/OpenIsle.git
synced 2026-04-24 21:07:30 +08:00
feat: 在头部组件和菜单组件中添加发帖功能,并优化首页搜索标题样式
This commit is contained in:
@@ -24,6 +24,16 @@
|
||||
<div v-if="isMobile" class="search-icon" @click="search">
|
||||
<i class="fas fa-search"></i>
|
||||
</div>
|
||||
|
||||
<ToolTip
|
||||
content="发帖"
|
||||
placement="bottom"
|
||||
>
|
||||
<div class="new-post-icon" @click="goToNewPost">
|
||||
<i class="fas fa-edit"></i>
|
||||
</div>
|
||||
</ToolTip>
|
||||
|
||||
<DropdownMenu ref="userMenu" :items="headerMenuItems">
|
||||
<template #trigger>
|
||||
<div class="avatar-container">
|
||||
@@ -113,6 +123,10 @@ const goToLogout = () => {
|
||||
navigateTo('/login', { replace: true })
|
||||
}
|
||||
|
||||
const goToNewPost = () => {
|
||||
navigateTo('/new-post', { replace: false })
|
||||
}
|
||||
|
||||
const headerMenuItems = computed(() => [
|
||||
{ text: '设置', onClick: goToSettings },
|
||||
{ text: '个人主页', onClick: goToProfile },
|
||||
@@ -275,6 +289,11 @@ onMounted(async () => {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.new-post-icon {
|
||||
font-size: 18px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
@media (max-width: 1200px) {
|
||||
.header-content {
|
||||
padding-left: 15px;
|
||||
|
||||
Reference in New Issue
Block a user