Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
2
2024-HCI-Mirror
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to JiHu GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
米 天为
2024-HCI-Mirror
Commits
d0c793cd
Unverified
Commit
d0c793cd
authored
3 months ago
by
daify
Committed by
GitHub
3 months ago
Browse files
Options
Downloads
Plain Diff
Merge pull request #12 from CosineSky/daify
fix:修复home按钮功能
parents
8d913efb
c07e7f5b
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/components/Header.vue
+7
-3
7 additions, 3 deletions
src/components/Header.vue
src/views/HomePage.vue
+9
-2
9 additions, 2 deletions
src/views/HomePage.vue
with
16 additions
and
5 deletions
src/components/Header.vue
+
7
−
3
View file @
d0c793cd
...
@@ -4,7 +4,7 @@ import {ref} from "vue";
...
@@ -4,7 +4,7 @@ import {ref} from "vue";
import
{
searchSongByKeyword
,
searchPlaylistByKeyword
}
from
"
../api/search
"
;
import
{
searchSongByKeyword
,
searchPlaylistByKeyword
}
from
"
../api/search
"
;
const
router
=
useRouter
();
const
router
=
useRouter
();
const
emit
=
defineEmits
([
'
headData
'
]);
const
emit
=
defineEmits
([
'
headData
'
,
'
home
'
]);
const
props
=
defineProps
({
const
props
=
defineProps
({
allowSearch
:
{
allowSearch
:
{
...
@@ -80,6 +80,10 @@ function callSearch() {
...
@@ -80,6 +80,10 @@ function callSearch() {
console
.
log
(
"
Failed to fetch playlists!
"
)
console
.
log
(
"
Failed to fetch playlists!
"
)
})
})
}
}
function
callHome
()
{
emit
(
'
home
'
);
}
</
script
>
</
script
>
<
template
>
<
template
>
...
@@ -105,14 +109,14 @@ function callSearch() {
...
@@ -105,14 +109,14 @@ function callSearch() {
d=
"M480 480V128a32 32 0 0 1 64 0v352h352a32 32 0 1 1 0 64H544v352a32 32 0 1 1-64 0V544H128a32 32 0 0 1 0-64z"
></path>
d=
"M480 480V128a32 32 0 0 1 64 0v352h352a32 32 0 1 1 0 64H544v352a32 32 0 1 1-64 0V544H128a32 32 0 0 1 0-64z"
></path>
</svg>
</svg>
</router-link>
</router-link>
<
router-link
to=
"/h
ome"
class=
"home-btn"
>
<
div
@
click=
"callH
ome"
class=
"home-btn"
>
<svg
xmlns=
"http://www.w3.org/2000/svg"
width=
"24"
height=
"24"
viewBox=
"0 0 24 24"
fill=
"none"
<svg
xmlns=
"http://www.w3.org/2000/svg"
width=
"24"
height=
"24"
viewBox=
"0 0 24 24"
fill=
"none"
stroke=
"currentColor"
stroke-width=
"2"
stroke-linecap=
"round"
stroke-linejoin=
"round"
stroke=
"currentColor"
stroke-width=
"2"
stroke-linecap=
"round"
stroke-linejoin=
"round"
class=
"feather feather-home"
>
class=
"feather feather-home"
>
<path
d=
"M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"
></path>
<path
d=
"M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"
></path>
<polyline
points=
"9 22 9 12 15 12 15 22"
></polyline>
<polyline
points=
"9 22 9 12 15 12 15 22"
></polyline>
</svg>
</svg>
</
router-link
>
</
div
>
<div
@
click=
"toggleIcons"
class=
"more-btn"
>
<div
@
click=
"toggleIcons"
class=
"more-btn"
>
<svg
xmlns=
"http://www.w3.org/2000/svg"
viewBox=
"0 0 1024 1024"
>
<svg
xmlns=
"http://www.w3.org/2000/svg"
viewBox=
"0 0 1024 1024"
>
<path
fill=
"currentColor"
<path
fill=
"currentColor"
...
...
This diff is collapsed.
Click to expand it.
src/views/HomePage.vue
+
9
−
2
View file @
d0c793cd
...
@@ -466,8 +466,15 @@ function receiveDataFromHeader(data) {
...
@@ -466,8 +466,15 @@ function receiveDataFromHeader(data) {
setMidComponents
(
3
);
setMidComponents
(
3
);
}
}
/*
HOME
*/
function
receiveDataFromHome
()
{
setMidComponents
(
0
);
}
/*
/*
MID COMPONENTS
MID COMPONENTS
0 - Main View
1 - Music Albums
1 - Music Albums
2 - Comments
2 - Comments
3 - Search Results
3 - Search Results
...
@@ -528,7 +535,7 @@ let playFromLeftBarAlbum = ref(null);
...
@@ -528,7 +535,7 @@ let playFromLeftBarAlbum = ref(null);
<div
class=
"body"
v-show=
"!isPlayingPage"
@
click=
"unSelectAlbum"
>
<div
class=
"body"
v-show=
"!isPlayingPage"
@
click=
"unSelectAlbum"
>
<!-- MAIN & RIGHT CONTENT -->
<!-- MAIN & RIGHT CONTENT -->
<Header
class=
"header"
@
headData=
"receiveDataFromHeader"
allow-search
></Header>
<Header
class=
"header"
@
headData=
"receiveDataFromHeader"
@
home=
"receiveDataFromHome"
allow-search
></Header>
<img
class=
"logo"
src=
"../assets/pictures/logos/logo3.png"
alt=
""
>
<img
class=
"logo"
src=
"../assets/pictures/logos/logo3.png"
alt=
""
>
<left-side-bar
class=
"left-side-bar"
@
playFromLeftBar=
"(id)=>
{playFromLeftBarAlbum = id }"
<left-side-bar
class=
"left-side-bar"
@
playFromLeftBar=
"(id)=>
{playFromLeftBarAlbum = id }"
@setCurrentPlaylist="receiveDisplayingPlaylist"/>
@setCurrentPlaylist="receiveDisplayingPlaylist"/>
...
@@ -1691,7 +1698,7 @@ footer {
...
@@ -1691,7 +1698,7 @@ footer {
/* 退出搜索图标 */
/* 退出搜索图标 */
.exit-search
{
.exit-search
{
position
:
absolute
;
position
:
absolute
;
top
:
9
0px
;
top
:
11
0px
;
right
:
10px
;
right
:
10px
;
width
:
30px
;
width
:
30px
;
height
:
30px
;
height
:
30px
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment