Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
zacharyzlj
Yz Music
提交
6cbf51de
Y
Yz Music
项目概览
zacharyzlj
/
Yz Music
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
Y
Yz Music
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
6cbf51de
编写于
2月 20, 2021
作者:
Z
Zachary
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat: add ModListMenu component
上级
203ee223
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
79 addition
and
129 deletion
+79
-129
src/components/common/ModListMenu.vue
src/components/common/ModListMenu.vue
+59
-0
src/views/musicLibrary/AlbumDetail.vue
src/views/musicLibrary/AlbumDetail.vue
+7
-45
src/views/musicLibrary/Ranking.vue
src/views/musicLibrary/Ranking.vue
+7
-47
src/views/musicLibrary/SongerDetail.vue
src/views/musicLibrary/SongerDetail.vue
+6
-37
未找到文件。
src/components/common/ModListMenu.vue
0 → 100644
浏览文件 @
6cbf51de
<
template
>
<div
class=
"mod_list_menu"
>
<a
class=
"list_menu__item list_menu__play js_play"
title=
"播放"
@
click=
"play"
>
<i
class=
"list_menu__icon_play"
></i>
<span
class=
"icon_txt"
>
播放
</span>
</a>
<a
class=
"list_menu__item list_menu__add js_fav"
title=
"添加到歌单"
aria-haspopup=
"true"
>
<i
class=
"list_menu__icon_add"
></i>
<span
class=
"icon_txt"
>
添加到歌单
</span>
</a>
<a
class=
"list_menu__item list_menu__down js_down"
title=
"下载"
aria-haspopup=
"true"
>
<i
class=
"list_menu__icon_down"
></i>
<span
class=
"icon_txt"
>
下载
</span>
</a>
<a
class=
"list_menu__item list_menu__share js_share"
title=
"分享"
aria-haspopup=
"true"
>
<i
class=
"list_menu__icon_share"
></i>
<span
class=
"icon_txt"
>
分享
</span>
</a>
</div>
</
template
>
<
script
>
import
{
playTheSong
}
from
"
common/utils
"
;
export
default
{
props
:
{
song
:
{
type
:
Object
,
default
:
{},
},
},
methods
:
{
play
()
{
if
(
this
.
song
)
{
playTheSong
(
this
.
song
);
}
console
.
log
(
this
.
song
);
},
},
};
</
script
>
<
style
scoped
>
</
style
>
src/views/musicLibrary/AlbumDetail.vue
浏览文件 @
6cbf51de
...
...
@@ -102,48 +102,9 @@
<span
class=
"songlist__songname_txt"
>
<a
:title=
"song.name"
>
{{
song
.
name
}}
</a>
</span>
<div
class=
"mod_list_menu"
>
<a
class=
"list_menu__item list_menu__play js_play"
title=
"播放"
@
click=
"playOne(idx)"
>
<i
class=
"list_menu__icon_play"
></i>
<span
class=
"icon_txt"
>
播放
</span>
</a>
<a
href=
"javascript:;"
class=
"list_menu__item list_menu__add js_fav"
title=
"添加到歌单"
aria-haspopup=
"true"
data-target=
"menu_add"
>
<i
class=
"list_menu__icon_add"
></i>
<span
class=
"icon_txt"
>
添加到歌单
</span>
</a>
<a
href=
"javascript:;"
class=
"list_menu__item list_menu__down js_down"
title=
"下载"
aria-haspopup=
"true"
data-target=
"menu_down"
>
<i
class=
"list_menu__icon_down"
></i>
<span
class=
"icon_txt"
>
下载
</span>
</a>
<a
href=
"javascript:;"
class=
"list_menu__item list_menu__share js_share"
title=
"分享"
aria-haspopup=
"true"
data-aria=
"menu_share"
>
<i
class=
"list_menu__icon_share"
></i>
<span
class=
"icon_txt"
>
分享
</span>
</a>
</div>
<!-- mod list menu -->
<mod-list-menu
:song=
"song"
/>
</div>
<div
class=
"songlist__artist"
>
<a
:title=
"song.artistsText"
class=
"singer_name"
>
{{
...
...
@@ -308,8 +269,9 @@
</
template
>
<
script
>
import
ModListMenu
from
"
components/common/ModListMenu
"
;
import
{
getAlbum
}
from
"
api
"
;
import
{
createSong
,
playSonglist
,
playTheSong
}
from
"
common/utils
"
;
import
{
createSong
,
playSonglist
}
from
"
common/utils
"
;
export
default
{
data
()
{
...
...
@@ -359,9 +321,9 @@ export default {
playAll
()
{
playSonglist
(
this
.
songs
);
},
playOne
(
id
)
{
playTheSong
(
this
.
songs
[
id
]);
}
,
},
components
:
{
ModListMenu
,
},
};
</
script
>
...
...
src/views/musicLibrary/Ranking.vue
浏览文件 @
6cbf51de
...
...
@@ -181,49 +181,8 @@
{{
song
.
name
}}
</a>
</span>
<div
class=
"mod_list_menu"
>
<a
href=
"javascript:;"
class=
"list_menu__item list_menu__play js_play"
title=
"播放"
@
click=
"playOne(idx)"
>
<i
class=
"list_menu__icon_play"
></i>
<span
class=
"icon_txt"
>
播放
</span>
</a>
<a
href=
"javascript:;"
class=
"list_menu__item list_menu__add js_fav"
title=
"添加到歌单"
aria-haspopup=
"true"
data-target=
"menu_add"
>
<i
class=
"list_menu__icon_add"
></i>
<span
class=
"icon_txt"
>
添加到歌单
</span>
</a>
<a
href=
"javascript:;"
class=
"list_menu__item list_menu__down js_down"
title=
"VIP下载"
aria-haspopup=
"true"
data-target=
"menu_down"
>
<i
class=
"list_menu__icon_down_vip"
></i>
<span
class=
"icon_txt"
>
VIP下载
</span>
</a>
<a
href=
"javascript:;"
class=
"list_menu__item list_menu__share js_share"
title=
"分享"
aria-haspopup=
"true"
data-aria=
"menu_share"
>
<i
class=
"list_menu__icon_share"
></i>
<span
class=
"icon_txt"
>
分享
</span>
</a>
</div>
<!-- mod list menu -->
<mod-list-menu
:song=
"song"
/>
</div>
<div
class=
"songlist__artist"
title=
"陆海涛"
>
...
...
@@ -244,8 +203,9 @@
</
template
>
<
script
>
import
ModListMenu
from
"
components/common/ModListMenu
"
;
import
{
getPlaylistDetial
,
getSongDetail
}
from
"
api
"
;
import
{
isDef
,
createSong
,
playSonglist
,
playTheSong
}
from
"
common/utils
"
;
import
{
isDef
,
createSong
,
playSonglist
}
from
"
common/utils
"
;
export
default
{
data
()
{
...
...
@@ -332,15 +292,15 @@ export default {
playAll
()
{
playSonglist
(
this
.
listDatas
);
},
playOne
(
id
)
{
playTheSong
(
this
.
listDatas
[
id
]);
},
},
watch
:
{
seletedType
(
newType
)
{
this
.
updatedTopList
();
},
},
components
:
{
ModListMenu
,
},
};
</
script
>
...
...
src/views/musicLibrary/SongerDetail.vue
浏览文件 @
6cbf51de
...
...
@@ -121,44 +121,9 @@
<span
class=
"songlist__song_txt"
></span>
</a>
</span>
<div
class=
"mod_list_menu"
>
<a
class=
"list_menu__item list_menu__play js_play"
title=
"播放"
>
<i
class=
"list_menu__icon_play"
></i>
<span
class=
"icon_txt"
>
播放
</span>
</a>
<a
href=
"javascript:;"
class=
"list_menu__item list_menu__add js_fav"
title=
"添加到歌单"
aria-haspopup=
"true"
>
<i
class=
"list_menu__icon_add"
></i>
<span
class=
"icon_txt"
>
添加到歌单
</span>
</a>
<a
href=
"javascript:;"
class=
"list_menu__item list_menu__down js_down"
title=
"VIP下载"
aria-haspopup=
"true"
>
<i
class=
"list_menu__icon_down_vip"
></i>
<span
class=
"icon_txt"
>
VIP下载
</span>
</a>
<a
href=
"javascript:;"
class=
"list_menu__item list_menu__share js_share"
title=
"分享"
aria-haspopup=
"true"
>
<i
class=
"list_menu__icon_share"
></i>
<span
class=
"icon_txt"
>
分享
</span>
</a>
</div>
<!-- mod list menu -->
<mod-list-menu
:song=
"song"
/>
</div>
<div
class=
"songlist__album"
>
<a
:title=
"song.albumName"
>
{{
song
.
albumName
}}
</a>
...
...
@@ -291,6 +256,7 @@
</
template
>
<
script
>
import
ModListMenu
from
"
components/common/ModListMenu
"
;
import
{
getUserDetail
,
getSongerDetail
,
...
...
@@ -390,6 +356,9 @@ export default {
playSonglist
(
this
.
hotSongs
);
},
},
components
:
{
ModListMenu
,
},
};
</
script
>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录