Skip to content

Commit ee9bbf0

Browse files
committed
🌈 style: 修复部分样式显示错误
1 parent 693dc65 commit ee9bbf0

File tree

8 files changed

+68
-57
lines changed

8 files changed

+68
-57
lines changed

src/components/Global/Menu.vue

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -148,20 +148,6 @@ const menuOptions = computed(() => [
148148
key: "record",
149149
icon: renderIcon("record"),
150150
},
151-
{
152-
label: () =>
153-
h(
154-
RouterLink,
155-
{
156-
to: {
157-
name: "videos",
158-
},
159-
},
160-
() => ["视频"],
161-
),
162-
key: "videos",
163-
icon: renderIcon("video"),
164-
},
165151
{
166152
key: "divider-1",
167153
type: "divider",

src/components/Global/Provider.vue

Lines changed: 21 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -87,20 +87,27 @@ const changeThemeColor = (val, isCover = false) => {
8787
themeOverrides.value = {
8888
common:
8989
isCover && Object.keys(val)?.length
90-
? {
91-
primaryColor,
92-
primaryColorHover,
93-
primaryColorPressed,
94-
primaryColorSuppl,
95-
textColor1: `rgba(${mainColorData.bg}, 0.9)`,
96-
textColor2: `rgba(${mainColorData.bg}, 0.82)`,
97-
textColor3: `rgba(${mainColorData.bg}, 0.52)`,
98-
bodyColor: `rgb(${val.dark.mainBg})`,
99-
cardColor: `rgb(${coverAutobgCover})`,
100-
tagColor: `rgb(${coverAutobgCover})`,
101-
modalColor: `rgb(${coverAutobgCover})`,
102-
popoverColor: `rgb(${coverAutobgCover})`,
103-
}
90+
? themeType.value === "dark"
91+
? {
92+
primaryColor,
93+
primaryColorHover,
94+
primaryColorPressed,
95+
primaryColorSuppl,
96+
textColor1: `rgba(${mainColorData.bg}, 0.9)`,
97+
textColor2: `rgba(${mainColorData.bg}, 0.82)`,
98+
textColor3: `rgba(${mainColorData.bg}, 0.52)`,
99+
bodyColor: `rgb(${val.dark.mainBg})`,
100+
cardColor: `rgb(${coverAutobgCover})`,
101+
tagColor: `rgb(${coverAutobgCover})`,
102+
modalColor: `rgb(${coverAutobgCover})`,
103+
popoverColor: `rgb(${coverAutobgCover})`,
104+
}
105+
: {
106+
primaryColor,
107+
primaryColorHover,
108+
primaryColorPressed,
109+
primaryColorSuppl,
110+
}
104111
: mainColorData,
105112
Icon: { color: isCover ? primaryColor : null },
106113
};

src/components/List/SongList.vue

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,25 @@
139139
</n-text>
140140
<n-text v-else class="album">未知专辑</n-text>
141141
</template>
142+
<!-- 操作 -->
143+
<div class="action">
144+
<!-- 喜欢歌曲 -->
145+
<n-icon
146+
:depth="dataStore.getSongIsLike(item?.id) ? 0 : 3"
147+
class="favorite"
148+
size="20"
149+
@click.stop="
150+
dataStore.changeLikeList(item?.id, !dataStore.getSongIsLike(item?.id), item?.path)
151+
"
152+
@dblclick.stop
153+
>
154+
<SvgIcon
155+
:icon="
156+
dataStore.getSongIsLike(item?.id) ? 'favorite-rounded' : 'favorite-outline-rounded'
157+
"
158+
/>
159+
</n-icon>
160+
</div>
142161
<!-- 时长 -->
143162
<n-text v-if="item.duration" class="duration" depth="3">{{ item.duration }}</n-text>
144163
<n-text v-else class="duration"> -- </n-text>
@@ -483,6 +502,23 @@ onBeforeUnmount(() => {
483502
color: var(--main-color);
484503
}
485504
}
505+
.action {
506+
width: 40px;
507+
display: flex;
508+
align-items: center;
509+
justify-content: space-evenly;
510+
.favorite {
511+
padding-top: 1px;
512+
transition: transform 0.3s;
513+
cursor: pointer;
514+
&:hover {
515+
transform: scale(1.15);
516+
}
517+
&:active {
518+
transform: scale(1);
519+
}
520+
}
521+
}
486522
.duration {
487523
width: 40px;
488524
text-align: center;

src/router/routes.js

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -80,31 +80,14 @@ const routes = [
8080
},
8181
],
8282
},
83-
// 视频
84-
{
85-
path: "/videos",
86-
name: "videos",
87-
meta: {
88-
title: "视频",
89-
},
90-
component: () => import("@/views/Videos/index.vue"),
91-
redirect: "/videos/list",
92-
children: [
93-
{
94-
path: "list",
95-
name: "video-list",
96-
component: () => import("@/views/Videos/list.vue"),
97-
},
98-
],
99-
},
10083
// 视频播放
10184
{
10285
path: "/videos-player",
10386
name: "videos-player",
10487
meta: {
10588
title: "视频播放器",
10689
},
107-
component: () => import("@/views/Videos/player.vue"),
90+
component: () => import("@/views/player.vue"),
10891
},
10992
// 评论
11093
{

src/views/Discover/artists.vue

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@
88
v-for="item in artistInitials"
99
:key="item"
1010
:bordered="false"
11-
:type="item.key == artistInitialChoose ? 'primary' : 'default'"
12-
class="tag"
11+
:class="['tag', { choose: item.key == artistInitialChoose }]"
1312
round
1413
@click="artistInitialChange(item.key)"
1514
>
@@ -21,10 +20,12 @@
2120
<n-tag
2221
v-for="(item, index) in artistTypeNames"
2322
:key="item"
24-
:class="['tag', item.length > 2 ? 'hidden' : 'show']"
23+
:class="[
24+
'tag',
25+
item.length > 2 ? 'hidden' : 'show',
26+
{ choose: index == artistTypeNamesChoose },
27+
]"
2528
:bordered="false"
26-
:type="index == artistTypeNamesChoose ? 'primary' : 'default'"
27-
class="tag"
2829
round
2930
@click="artistTypeChange(index)"
3031
>
@@ -199,6 +200,10 @@ onMounted(() => {
199200
&:active {
200201
transform: scale(0.95);
201202
}
203+
&.choose {
204+
background-color: var(--main-second-color);
205+
color: var(--main-color);
206+
}
202207
}
203208
.category {
204209
margin-top: 18px;

src/views/Videos/index.vue

Lines changed: 0 additions & 3 deletions
This file was deleted.

src/views/Videos/list.vue

Lines changed: 0 additions & 3 deletions
This file was deleted.
File renamed without changes.

0 commit comments

Comments
 (0)