Skip to content

Commit

Permalink
feat:新增个人中心部分样式 (#79)
Browse files Browse the repository at this point in the history
  • Loading branch information
anguoo authored Feb 22, 2024
1 parent 11530d8 commit 41b6c3e
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/components/header.vue
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ import { getAllNotificationCount } from '@/utils/public'
import Search from '@/components/search.vue'
import Avatar from '@/components/avatar.vue'
import Nav from '@/components/navigation.vue'
import popup from '@/views/home/popup.vue'
import popup from './popup.vue'
const isLogin = ref(false)
const isPopup = ref(false)
Expand Down
22 changes: 19 additions & 3 deletions src/views/home/popup.vue → src/components/popup.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
<template>
<div class="main-box">
<router-link
to="user/center"
class="center"
v-if="isLogin"
>个人中心</router-link>
<router-link
to="/user"
class="user"
Expand Down Expand Up @@ -27,7 +32,7 @@
import { useStore } from '@/store/index'
import { onMounted, ref } from 'vue'
import { successMsg } from '@/utils/message';
import { getUserDetail } from '../information/utils';
import { getUserDetail } from '@/views/information/utils';
import { judgeHasLogin } from '@/utils/judge';
const store = useStore()
Expand Down Expand Up @@ -55,7 +60,8 @@ const logout = () => {
flex-direction: column;
.user,
.login {
.login,
.center {
height: 20px;
text-decoration: none;
font-size: 14px;
Expand All @@ -80,9 +86,19 @@ const logout = () => {
.user:hover,
.login:hover,
.logout:hover {
.logout:hover,
.center:hover{
color: rgb(59, 93, 155);
font-weight: 600;
}
.user:active,
.login:active,
.center:active {
div {
color: rgb(59, 93, 155);
font-weight: 600;
}
}
}
</style>
4 changes: 4 additions & 0 deletions src/router/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ const routes: RouteRecordRaw[] = [
path: '/user',
component: () => import('../views/information/user.vue'),
},
{
path: '/user/center',
component: () => import('../views/information/center.vue'),
},
{
path: '/notification',
component: () => import('../views/notification/notification.vue'),
Expand Down
12 changes: 12 additions & 0 deletions src/views/information/center.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<template>
<div>
<CHeader></CHeader>
</div>
</template>

<script setup lang="ts">
import CHeader from '@/components/header.vue'
</script>

<style scoped lang="css">
</style>

0 comments on commit 41b6c3e

Please sign in to comment.