Skip to content

Commit

Permalink
feat: 新增github跳转
Browse files Browse the repository at this point in the history
  • Loading branch information
sl1673495 committed Jul 31, 2019
1 parent f51842e commit dfd16c0
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 33 deletions.
2 changes: 1 addition & 1 deletion public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<meta name="renderer" content="webkit" />
<meta http-equiv="X-UA-Compatible" content="IE=edge, chrome=1">
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
<link rel="stylesheet" type="text/css" href="//at.alicdn.com/t/font_777085_11qgo6xgqgek.css">
<link rel="stylesheet" type="text/css" href="//at.alicdn.com/t/font_777085_kun0k5ghypf.css">
<title>vue-netease-muisc</title>
</head>

Expand Down
6 changes: 5 additions & 1 deletion src/base/icon.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<template>
<i
@click="onClick"
class="iconfont icon-component"
:class="getIconCls()"
:style="{fontSize: `${size}px`}"
Expand All @@ -8,7 +9,7 @@

<script type="text/ecmascript-6">
export default {
name: 'Icon',
name: "Icon",
props: ["size", "type", "color"],
methods: {
getIconCls() {
Expand All @@ -17,6 +18,9 @@ export default {
cls += ` icon-color-${this.color}`
}
return cls
},
onClick(e) {
this.$emit("click", e)
}
}
}
Expand Down
3 changes: 1 addition & 2 deletions src/base/volume.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
:size="20"
class="icon"
:type="getIconType()"
@click.native="toggleSilence"
@click="toggleSilence"
/>
<div class="progress-wrap">
<ProgressBar
Expand Down Expand Up @@ -66,7 +66,6 @@ export default {
display: flex;
align-items: center;
width: 150px;
padding: 0 16px;
.icon {
color: var(--font-color);
Expand Down
18 changes: 15 additions & 3 deletions src/components/mini-player.vue
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
class="icon"
type="prev"
:size="24"
@click.native="prev"
@click="prev"
/>
<div
@click="togglePlaying"
Expand All @@ -59,11 +59,16 @@
class="icon"
type="next"
:size="24"
@click.native="next"
@click="next"
/>
</div>

<div class="mode">
<Icon
class="icon"
type="github"
@click="goGitHub"
/>
<el-popover
placement="top"
width="160"
Expand All @@ -76,7 +81,7 @@
class="icon"
type="playlist"
:size="18"
@click.native="togglePlaylistShow"
@click="togglePlaylistShow"
/>
</el-popover>
<!-- 音量 -->
Expand Down Expand Up @@ -161,6 +166,9 @@ export default {
togglePlayerShow() {
this.setPlayerShow(!this.isPlayerShow)
},
goGitHub() {
window.open('https://github.com/sl1673495/vue-netease-music')
},
...mapMutations(["setCurrentTime", "setPlayingState", "setPlaylistShow", "setPlayerShow"]),
...mapActions(["startSong"])
},
Expand Down Expand Up @@ -341,6 +349,10 @@ export default {
align-items: center;
justify-content: flex-end;
flex: 6;
.icon {
margin-right: 16px;
}
}
.progress-bar-wrap {
Expand Down
26 changes: 0 additions & 26 deletions src/layout/header.vue
Original file line number Diff line number Diff line change
@@ -1,16 +1,6 @@
<template>
<div class="header">
<div class="left">
<div
@click="onClickLogo"
class="logo-wrap"
>
<img
class="logo"
:src="logo"
/>
<span>云音乐</span>
</div>
<div
@click="onClickDown"
v-if="isPlayerShow"
Expand Down Expand Up @@ -87,22 +77,6 @@ export default {
display: flex;
align-items: center;
.logo-wrap {
display: flex;
align-items: center;
margin-right: 36px;
font-size: $font-size-title;
color: var(--font-color-white);
white-space: nowrap;
cursor: pointer;
.logo {
width: 30px;
height: 30px;
margin-right: 8px;
}
}
.font-weight {
white-space: nowrap;
}
Expand Down

0 comments on commit dfd16c0

Please sign in to comment.