Merge branch 'dev' of fanxb/bookmark into master

This commit is contained in:
fanxb 2022-07-08 10:22:49 +08:00 committed by Gogs
commit 106dccb68f
3 changed files with 33 additions and 7 deletions

View File

@ -1,6 +1,10 @@
<template> <template>
<div class="bottom"> <div class="bottom">
<router-link to="/public/about">关于</router-link> <router-link style="color: white" to="/public/about"><span class="text">关于</span></router-link>
<a-tooltip v-if="bgSrc">
<template #title>点击后鼠标右键-将图像另存为</template>
<a style="color: white; margin-left: 1em" :href="bgSrc" download="bing每日一图"><span class="text">下载壁纸</span></a>
</a-tooltip>
</div> </div>
</template> </template>
@ -8,6 +12,7 @@
import { mapState } from "vuex"; import { mapState } from "vuex";
export default { export default {
name: "homeTop", name: "homeTop",
props: ["bgSrc"],
data() { data() {
return {}; return {};
}, },
@ -18,6 +23,11 @@ export default {
.bottom { .bottom {
height: 0.4rem; height: 0.4rem;
padding: 0.1rem; padding: 0.1rem;
text-align: right; text-align: center;
color: black;
.text {
color: rgba(255, 255, 255, 0.9);
}
} }
</style> </style>

View File

@ -6,15 +6,18 @@
/ /
<router-link to="/public/register">注册</router-link> <router-link to="/public/register">注册</router-link>
</div> </div>
<div v-else> <div v-else class="topAction">
<a-tooltip>
<template #title>书签管理</template>
<router-link to="/manage">
<a-icon class="bookmarkIcon" type="setting" />
</router-link>
</a-tooltip>
<a-dropdown> <a-dropdown>
<div class="user"> <div class="user">
<img :src="userInfo.icon" class="userIcon" /> <img :src="userInfo.icon" class="userIcon" />
</div> </div>
<a-menu slot="overlay" :trigger="['hover', 'click']" @click="menuClick"> <a-menu slot="overlay" :trigger="['hover', 'click']" @click="menuClick">
<a-menu-item key="manage">
<router-link to="manage">书签管理</router-link>
</a-menu-item>
<a-menu-item key="personSpace"> <a-menu-item key="personSpace">
<router-link to="/manage/personSpace/userInfo">个人中心</router-link> <router-link to="/manage/personSpace/userInfo">个人中心</router-link>
</a-menu-item> </a-menu-item>
@ -63,5 +66,18 @@ export default {
width: 2.5em; width: 2.5em;
height: 2.5em; height: 2.5em;
} }
.topAction {
display: flex;
align-items: center;
.bookmarkIcon {
font-size: 2em;
background-color: rgb(74, 74, 74, 0.5);
color: rgba(255, 255, 255, 0.8);
margin-right: 1em;
cursor: pointer;
}
}
} }
</style> </style>

View File

@ -5,7 +5,7 @@
<search :style="{ width: isPhone ? '100%' : '60%' }" /> <search :style="{ width: isPhone ? '100%' : '60%' }" />
<div :style="{ width: isPhone ? '100%' : '70%' }"><pin-bookmark /></div> <div :style="{ width: isPhone ? '100%' : '70%' }"><pin-bookmark /></div>
</div> </div>
<bottom /> <bottom :bgSrc="serverConfig.bingImgSrc" />
</div> </div>
</template> </template>