Skip to content

Commit

Permalink
style(SPA): 点赞后相应的标签也变红
Browse files Browse the repository at this point in the history
issue #514
  • Loading branch information
mutoe committed Dec 13, 2018
1 parent aad0d97 commit 424f17d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
6 changes: 5 additions & 1 deletion resources/spa/src/components/FeedCard/FeedCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
<svg class="m-style-svg m-svg-def">
<use :xlink:href="liked ? '#icon-like' :'#icon-unlike'" />
</svg>
<span>{{ likeCount | formatNum }}</span>
<span :class="{liked}">{{ likeCount | formatNum }}</span>
</a>
<a class="m-box m-aln-center" @click.prevent="handleComment">
<svg class="m-style-svg m-svg-def">
Expand Down Expand Up @@ -493,6 +493,10 @@ export default {
margin-left: -20px;
margin-right: -20px;
padding: 0 20px 0 120px;
.liked {
color: @error;
}
}
&-tools {
padding: 30px 0;
Expand Down
6 changes: 5 additions & 1 deletion resources/spa/src/page/article/ArticleCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<svg class="m-style-svg m-svg-def">
<use :xlink:href="liked ? '#icon-like' :'#icon-unlike'" />
</svg>
<span>喜欢</span>
<span :class="{liked}">喜欢</span>
</a>
<a class="m-box-model m-aln-center" @click.prevent="handelComment">
<svg class="m-style-svg m-svg-def">
Expand Down Expand Up @@ -172,6 +172,10 @@ export default {
span {
margin-top: 4px;
}
.liked {
color: @error;
}
}
}
}
Expand Down

0 comments on commit 424f17d

Please sign in to comment.